QXmpp Version: 1.13.0
Loading...
Searching...
No Matches
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
13class QDomElement;
14class QXmlStreamWriter;
15class QXmppTrustMessageKeyOwnerPrivate;
16
17class QXMPP_EXPORT QXmppTrustMessageKeyOwner
18{
19public:
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
45private:
46 QSharedDataPointer<QXmppTrustMessageKeyOwnerPrivate> d;
47};
48
49Q_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:18
void setTrustedKeys(const QList< QByteArray > &keyIds)
Definition QXmppTrustMessages.cpp:230
QList< QByteArray > distrustedKeys() const
Definition QXmppTrustMessages.cpp:240
QXmppTrustMessageKeyOwner & operator=(QXmppTrustMessageKeyOwner &&)
Assignment operator.
QXmppTrustMessageKeyOwner & operator=(const QXmppTrustMessageKeyOwner &other)
Assignment operator.
QString jid() const
Definition QXmppTrustMessages.cpp:198
QXmppTrustMessageKeyOwner()
Definition QXmppTrustMessages.cpp:178
QXmppTrustMessageKeyOwner(QXmppTrustMessageKeyOwner &&)
Copy constructor.
void setDistrustedKeys(const QList< QByteArray > &keyIds)
Definition QXmppTrustMessages.cpp:250
void setJid(const QString &jid)
Definition QXmppTrustMessages.cpp:210
QList< QByteArray > trustedKeys() const
Definition QXmppTrustMessages.cpp:220
QXmppTrustMessageKeyOwner(const QXmppTrustMessageKeyOwner &other)
Copy constructor.