QXmpp: QXmppTrustMessageKeyOwner.h Source File

QXmpp Version: 1.14.2

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
17 class QXMPP_EXPORT QXmppTrustMessageKeyOwner
18{
19public:
20 QXmppTrustMessageKeyOwner();
21 QXmppTrustMessageKeyOwner(const QXmppTrustMessageKeyOwner &other);
22 QXmppTrustMessageKeyOwner(QXmppTrustMessageKeyOwner &&);
23 ~QXmppTrustMessageKeyOwner();
24
25 QXmppTrustMessageKeyOwner &operator=(const QXmppTrustMessageKeyOwner &other);
26 QXmppTrustMessageKeyOwner &operator=(QXmppTrustMessageKeyOwner &&);
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
QXmppTrustMessageKeyOwner
The QXmppTrustMessageKeyOwner class represents a key owner of the trust message as defined by XEP-043...
Definition QXmppTrustMessageKeyOwner.h:18
QXmppTrustMessageKeyOwner::setTrustedKeys
void setTrustedKeys(const QList< QByteArray > &keyIds)
Definition QXmppTrustMessages.cpp:230
QXmppTrustMessageKeyOwner::distrustedKeys
QList< QByteArray > distrustedKeys() const
Definition QXmppTrustMessages.cpp:240
QXmppTrustMessageKeyOwner::operator=
QXmppTrustMessageKeyOwner & operator=(QXmppTrustMessageKeyOwner &&)
Assignment operator.
QXmppTrustMessageKeyOwner::operator=
QXmppTrustMessageKeyOwner & operator=(const QXmppTrustMessageKeyOwner &other)
Assignment operator.
QXmppTrustMessageKeyOwner::jid
QString jid() const
Definition QXmppTrustMessages.cpp:198
QXmppTrustMessageKeyOwner::QXmppTrustMessageKeyOwner
QXmppTrustMessageKeyOwner()
Definition QXmppTrustMessages.cpp:178
QXmppTrustMessageKeyOwner::QXmppTrustMessageKeyOwner
QXmppTrustMessageKeyOwner(QXmppTrustMessageKeyOwner &&)
Copy constructor.
QXmppTrustMessageKeyOwner::setDistrustedKeys
void setDistrustedKeys(const QList< QByteArray > &keyIds)
Definition QXmppTrustMessages.cpp:250
QXmppTrustMessageKeyOwner::setJid
void setJid(const QString &jid)
Definition QXmppTrustMessages.cpp:210
QXmppTrustMessageKeyOwner::trustedKeys
QList< QByteArray > trustedKeys() const
Definition QXmppTrustMessages.cpp:220
QXmppTrustMessageKeyOwner::QXmppTrustMessageKeyOwner
QXmppTrustMessageKeyOwner(const QXmppTrustMessageKeyOwner &other)
Copy constructor.