Loading...
Searching...
No Matches
QXmppTrustMessageElement.h
// SPDX-FileCopyrightText: 2021 Melvin Keskin <melvo@olomono.de>
//
// SPDX-License-Identifier: LGPL-2.1-or-later
#ifndef QXMPPTRUSTMESSAGEELEMENT_H
#define QXMPPTRUSTMESSAGEELEMENT_H
#include "QXmppConstants_p.h"
#include "QXmppGlobal.h"
#include <QSharedDataPointer>
class QDomElement;
class QXmlStreamWriter;
class QXmppTrustMessageElementPrivate;
class QXmppTrustMessageKeyOwner;
class QXMPP_EXPORT QXmppTrustMessageElement
{
public:
QXmppTrustMessageElement();
QXmppTrustMessageElement(const QXmppTrustMessageElement &other);
QXmppTrustMessageElement(QXmppTrustMessageElement &&);
~QXmppTrustMessageElement();
QXmppTrustMessageElement &operator=(const QXmppTrustMessageElement &other);
QXmppTrustMessageElement &operator=(QXmppTrustMessageElement &&);
QString usage() const;
void setUsage(const QString &usage);
QString encryption() const;
void setEncryption(const QString &encryption);
QList<QXmppTrustMessageKeyOwner> keyOwners() const;
void setKeyOwners(const QList<QXmppTrustMessageKeyOwner> &keyOwners);
void addKeyOwner(const QXmppTrustMessageKeyOwner &keyOwner);
static constexpr std::tuple XmlTag = { u"trust-message", QXmpp::Private::ns_tm };
void parse(const QDomElement &element);
void toXml(QXmlStreamWriter *writer) const;
static bool isTrustMessageElement(const QDomElement &element);
private:
QSharedDataPointer<QXmppTrustMessageElementPrivate> d;
};
Q_DECLARE_TYPEINFO(QXmppTrustMessageElement, Q_MOVABLE_TYPE);
#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