Messagelib

dmarcinfo.h
1 /*
2  SPDX-FileCopyrightText: 2019-2023 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "messageviewer_export.h"
10 #include <QDebug>
11 namespace MessageViewer
12 {
13 /**
14  * @brief The DMARCInfo class
15  * @author Laurent Montel <[email protected]>
16  */
17 class MESSAGEVIEWER_EXPORT DMARCInfo
18 {
19 public:
20  DMARCInfo();
21  Q_REQUIRED_RESULT bool parseDMARC(const QString &key);
22  Q_REQUIRED_RESULT QString version() const;
23  void setVersion(const QString &version);
24 
25  Q_REQUIRED_RESULT QString adkim() const;
26  void setAdkim(const QString &adkim);
27 
28  // TODO enum ?
29  Q_REQUIRED_RESULT QString policy() const;
30  void setPolicy(const QString &policy);
31 
32  Q_REQUIRED_RESULT int percentage() const;
33  void setPercentage(int percentage);
34 
35  Q_REQUIRED_RESULT QString subDomainPolicy() const;
36  void setSubDomainPolicy(const QString &subDomainPolicy);
37 
38  Q_REQUIRED_RESULT bool operator==(const DMARCInfo &other) const;
39 
40 private:
41  QString mVersion;
42  QString mAdkim;
43  QString mPolicy;
44  QString mSubDomainPolicy;
45  int mPercentage = -1;
46 };
47 }
48 Q_DECLARE_METATYPE(MessageViewer::DMARCInfo)
49 MESSAGEVIEWER_EXPORT QDebug operator<<(QDebug d, const MessageViewer::DMARCInfo &t);
KCALENDARCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalendarCore::Alarm::Ptr &)
The DMARCInfo class.
Definition: dmarcinfo.h:17
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Mar 27 2023 04:08:17 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.