QXmpp  Version: 1.15.1
QXmppTrustMessageKeyOwner.h
1 // SPDX-FileCopyrightText: 2021 Melvin Keskin <melvo@olomono.de>
2 //
3 // SPDX-License-Identifier: LGPL-2.1-or-later
4 
5 #ifndef QXMPPTRUSTMESSAGEKEYOWNER_H
6 #define QXMPPTRUSTMESSAGEKEYOWNER_H
7 
8 #include "QXmppConstants_p.h"
9 #include "QXmppGlobal.h"
10 
11 #include <QSharedDataPointer>
12 
13 class QDomElement;
14 class QXmlStreamWriter;
15 class QXmppTrustMessageKeyOwnerPrivate;
16 
17 class QXMPP_EXPORT QXmppTrustMessageKeyOwner
18 {
19 public:
24 
27 
28  QString jid() const;
29  void setJid(const QString &jid);
30 
31  QList<QByteArray> trustedKeys() const;
32  void setTrustedKeys(const QList<QByteArray> &keyIds);
33 
34  QList<QByteArray> distrustedKeys() const;
35  void setDistrustedKeys(const QList<QByteArray> &keyIds);
36 
38  static constexpr std::tuple XmlTag = { u"key-owner", QXmpp::Private::ns_tm };
39  void parse(const QDomElement &element);
40  void toXml(QXmlStreamWriter *writer) const;
42 
43  static bool isTrustMessageKeyOwner(const QDomElement &element);
44 
45 private:
46  QSharedDataPointer<QXmppTrustMessageKeyOwnerPrivate> d;
47 };
48 
49 Q_DECLARE_TYPEINFO(QXmppTrustMessageKeyOwner, Q_MOVABLE_TYPE);
50 
51 #endif // QXMPPTRUSTMESSAGEKEYOWNER_H
The QXmppTrustMessageKeyOwner class represents a key owner of the trust message as defined by XEP-043...
Definition: QXmppTrustMessageKeyOwner.h:17