QXmpp: QXmppTrustMessageElement.h Source File

QXmpp Version: 1.14.4

Loading...
Searching...
No Matches
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 "QXmppConstants_p.h"
9#include "QXmppGlobal.h"
10
11#include <QSharedDataPointer>
12
13class QDomElement;
14class QXmlStreamWriter;
15class QXmppTrustMessageElementPrivate;
16class QXmppTrustMessageKeyOwner;
17
18 class QXMPP_EXPORT QXmppTrustMessageElement
19{
20public:
21 QXmppTrustMessageElement();
22 QXmppTrustMessageElement(const QXmppTrustMessageElement &other);
23 QXmppTrustMessageElement(QXmppTrustMessageElement &&);
24 ~QXmppTrustMessageElement();
25
26 QXmppTrustMessageElement &operator=(const QXmppTrustMessageElement &other);
27 QXmppTrustMessageElement &operator=(QXmppTrustMessageElement &&);
28
29 QString usage() const;
30 void setUsage(const QString &usage);
31
32 QString encryption() const;
33 void setEncryption(const QString &encryption);
34
35 QList<QXmppTrustMessageKeyOwner> keyOwners() const;
36 void setKeyOwners(const QList<QXmppTrustMessageKeyOwner> &keyOwners);
37 void addKeyOwner(const QXmppTrustMessageKeyOwner &keyOwner);
38
40 static constexpr std::tuple XmlTag = { u"trust-message", QXmpp::Private::ns_tm };
41 void parse(const QDomElement &element);
42 void toXml(QXmlStreamWriter *writer) const;
44
45 static bool isTrustMessageElement(const QDomElement &element);
46
47private:
48 QSharedDataPointer<QXmppTrustMessageElementPrivate> d;
49};
50
51Q_DECLARE_TYPEINFO(QXmppTrustMessageElement, Q_MOVABLE_TYPE);
52
53#endif // QXMPPTRUSTMESSAGEELEMENT_H
QXmppTrustMessageElement
The QXmppTrustMessageElement class represents a trust message element as defined by XEP-0434: Trust M...
Definition QXmppTrustMessageElement.h:19
QXmppTrustMessageElement::QXmppTrustMessageElement
QXmppTrustMessageElement(QXmppTrustMessageElement &&)
Move-constructor.
QXmppTrustMessageElement::usage
QString usage() const
Definition QXmppTrustMessages.cpp:58
QXmppTrustMessageElement::QXmppTrustMessageElement
QXmppTrustMessageElement(const QXmppTrustMessageElement &other)
Copy-constructor.
QXmppTrustMessageElement::operator=
QXmppTrustMessageElement & operator=(QXmppTrustMessageElement &&)
Move-assignment operator.
QXmppTrustMessageElement::QXmppTrustMessageElement
QXmppTrustMessageElement()
Definition QXmppTrustMessages.cpp:38
QXmppTrustMessageElement::keyOwners
QList< QXmppTrustMessageKeyOwner > keyOwners() const
Definition QXmppTrustMessages.cpp:99
QXmppTrustMessageElement::setUsage
void setUsage(const QString &usage)
Definition QXmppTrustMessages.cpp:68
QXmppTrustMessageElement::encryption
QString encryption() const
Definition QXmppTrustMessages.cpp:78
QXmppTrustMessageElement::operator=
QXmppTrustMessageElement & operator=(const QXmppTrustMessageElement &other)
Assignment operator.
QXmppTrustMessageElement::addKeyOwner
void addKeyOwner(const QXmppTrustMessageKeyOwner &keyOwner)
Definition QXmppTrustMessages.cpp:121
QXmppTrustMessageElement::setEncryption
void setEncryption(const QString &encryption)
Definition QXmppTrustMessages.cpp:88
QXmppTrustMessageElement::setKeyOwners
void setKeyOwners(const QList< QXmppTrustMessageKeyOwner > &keyOwners)
Definition QXmppTrustMessages.cpp:110
QXmppTrustMessageKeyOwner
The QXmppTrustMessageKeyOwner class represents a key owner of the trust message as defined by XEP-043...
Definition QXmppTrustMessageKeyOwner.h:18