aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppTrustMessageElement.h
diff options
context:
space:
mode:
authorMelvin Keskin <melvo@olomono.de>2021-06-30 17:38:47 +0200
committerLinus Jahn <lnj@kaidan.im>2021-07-06 22:35:53 +0200
commit0b947c682c27091dd4afd5900d8e339175e1aba0 (patch)
treed880db35de8d3eaefb01ead0043b07901c5cda50 /src/base/QXmppTrustMessageElement.h
parent92427f63b3458fac76f64f2993db81d8c4c5d84c (diff)
downloadqxmpp-0b947c682c27091dd4afd5900d8e339175e1aba0.tar.gz
Add QXmppTrustMessageElement
Diffstat (limited to 'src/base/QXmppTrustMessageElement.h')
-rw-r--r--src/base/QXmppTrustMessageElement.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/src/base/QXmppTrustMessageElement.h b/src/base/QXmppTrustMessageElement.h
new file mode 100644
index 00000000..6cb3b3bc
--- /dev/null
+++ b/src/base/QXmppTrustMessageElement.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2008-2021 The QXmpp developers
+ *
+ * Author:
+ * Melvin Keskin
+ *
+ * Source:
+ * https://github.com/qxmpp-project/qxmpp
+ *
+ * This file is a part of QXmpp library.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ */
+
+#ifndef QXMPPTRUSTMESSAGEELEMENT_H
+#define QXMPPTRUSTMESSAGEELEMENT_H
+
+#include "QXmppGlobal.h"
+
+#include <QDomElement>
+#include <QList>
+#include <QSharedDataPointer>
+#include <QXmlStreamWriter>
+
+class QXmppTrustMessageElementPrivate;
+class QXmppTrustMessageKeyOwner;
+
+class QXMPP_EXPORT QXmppTrustMessageElement
+{
+public:
+ QXmppTrustMessageElement();
+ QXmppTrustMessageElement(const QXmppTrustMessageElement &other);
+ ~QXmppTrustMessageElement();
+
+ QXmppTrustMessageElement &operator=(const QXmppTrustMessageElement &other);
+
+ 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);
+
+ /// \cond
+ void parse(const QDomElement &element);
+ void toXml(QXmlStreamWriter *writer) const;
+ /// \endcond
+
+ static bool isTrustMessageElement(const QDomElement &element);
+
+private:
+ QSharedDataPointer<QXmppTrustMessageElementPrivate> d;
+};
+
+Q_DECLARE_TYPEINFO(QXmppTrustMessageElement, Q_MOVABLE_TYPE);
+
+#endif // QXMPPTRUSTMESSAGEELEMENT_H