Messagelib

dkimkeyrecord.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 <QObject>
11 #include <QString>
12 #include <QStringList>
13 namespace MessageViewer
14 {
15 /**
16  * @brief The DKIMKeyRecord class
17  * @author Laurent Montel <[email protected]>
18  */
19 class MESSAGEVIEWER_EXPORT DKIMKeyRecord
20 {
21 public:
22  DKIMKeyRecord();
23  [[nodiscard]] bool parseKey(const QString &key);
24 
25  [[nodiscard]] QString version() const;
26  void setVersion(const QString &version);
27 
28  [[nodiscard]] QString keyType() const;
29  void setKeyType(const QString &keyType);
30 
31  [[nodiscard]] QString note() const;
32  void setNote(const QString &note);
33 
34  [[nodiscard]] QString publicKey() const;
35  void setPublicKey(const QString &publicKey);
36 
37  [[nodiscard]] QString service() const;
38  void setService(const QString &service);
39 
40  [[nodiscard]] QStringList hashAlgorithm() const;
41  void setHashAlgorithm(const QStringList &hashAlgorithm);
42 
43  [[nodiscard]] QStringList flags() const;
44  void setFlags(const QStringList &flags);
45 
46  [[nodiscard]] bool operator==(const DKIMKeyRecord &other) const;
47 
48 private:
49  QString mVersion;
50  QString mKeyType;
51  QString mNote;
52  QString mPublicKey;
53  QString mService;
54  QStringList mHashAlgorithm;
55  QStringList mFlags;
56 };
57 }
58 Q_DECLARE_METATYPE(MessageViewer::DKIMKeyRecord)
59 MESSAGEVIEWER_EXPORT QDebug operator<<(QDebug d, const MessageViewer::DKIMKeyRecord &t);
The DKIMKeyRecord class.
Definition: dkimkeyrecord.h:19
QDataStream & operator<<(QDataStream &out, const KDateTime &dateTime)
unsigned int version()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Nov 28 2023 04:03:06 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.