QXmpp  Version: 1.6.0
QXmppTrustMessageElement.h
1 // SPDX-FileCopyrightText: 2021 Melvin Keskin <melvo@olomono.de>
2 //
3 // SPDX-License-Identifier: LGPL-2.1-or-later
4 
5 #ifndef QXMPPTRUSTMESSAGEELEMENT_H
6 #define QXMPPTRUSTMESSAGEELEMENT_H
7 
8 #include "QXmppGlobal.h"
9 
10 #include <QSharedDataPointer>
11 
12 class QDomElement;
13 class QXmlStreamWriter;
14 class QXmppTrustMessageElementPrivate;
16 
17 class QXMPP_EXPORT QXmppTrustMessageElement
18 {
19 public:
24 
25  QXmppTrustMessageElement &operator=(const QXmppTrustMessageElement &other);
27 
28  QString usage() const;
29  void setUsage(const QString &usage);
30 
31  QString encryption() const;
32  void setEncryption(const QString &encryption);
33 
34  QList<QXmppTrustMessageKeyOwner> keyOwners() const;
35  void setKeyOwners(const QList<QXmppTrustMessageKeyOwner> &keyOwners);
36  void addKeyOwner(const QXmppTrustMessageKeyOwner &keyOwner);
37 
39  void parse(const QDomElement &element);
40  void toXml(QXmlStreamWriter *writer) const;
42 
43  static bool isTrustMessageElement(const QDomElement &element);
44 
45 private:
46  QSharedDataPointer<QXmppTrustMessageElementPrivate> d;
47 };
48 
49 Q_DECLARE_TYPEINFO(QXmppTrustMessageElement, Q_MOVABLE_TYPE);
50 
51 #endif // QXMPPTRUSTMESSAGEELEMENT_H
The QXmppTrustMessageKeyOwner class represents a key owner of the trust message as defined by XEP-043...
Definition: QXmppTrustMessageKeyOwner.h:16
The QXmppTrustMessageElement class represents a trust message element as defined by XEP-0434: Trust M...
Definition: QXmppTrustMessageElement.h:17