5#ifndef QXMPPOMEMOMANAGER_H
6#define QXMPPOMEMOMANAGER_H
8#include "QXmppClientExtension.h"
9#include "QXmppE2eeExtension.h"
10#include "QXmppMessageHandler.h"
11#include "QXmppPubSubEventHandler.h"
12#include "QXmppTrustSecurityPolicy.h"
13#include "qxmppomemo_export.h"
15class QXmppOmemoDevicePrivate;
16class QXmppOmemoManagerPrivate;
17class QXmppOmemoOwnDevicePrivate;
31 QString label() const;
32 void setLabel(const QString &label);
34 QByteArray keyId() const;
35 void setKeyId(const QByteArray &keyId);
38 QSharedDataPointer<QXmppOmemoOwnDevicePrivate> d;
53 void setJid(const QString &jid);
55 QString label() const;
56 void setLabel(const QString &label);
58 QByteArray keyId() const;
59 void setKeyId(const QByteArray &keyId);
61 QXmpp::TrustLevel trustLevel() const;
62 void setTrustLevel(
QXmpp::TrustLevel trustLevel);
65 QSharedDataPointer<QXmppOmemoDevicePrivate> d;
73 using Result = std::variant<QXmpp::Success, QXmppError>;
93 int maximumDevicesPerJid()
const;
94 void setMaximumDevicesPerJid(
int maximum);
96 int maximumDevicesPerStanza()
const;
97 void setMaximumDevicesPerStanza(
int maximum);
108 void setAcceptedSessionBuildingTrustLevels(QXmpp::TrustLevels trustLevels);
109 QXmpp::TrustLevels acceptedSessionBuildingTrustLevels();
111 void setNewDeviceAutoSessionBuildingEnabled(
bool isNewDeviceAutoSessionBuildingEnabled);
112 bool isNewDeviceAutoSessionBuildingEnabled();
132 bool isEncrypted(
const QDomElement &)
override;
135 QStringList discoveryFeatures()
const override;
136 bool handleStanza(
const QDomElement &stanza)
override;
137 bool handleMessage(
const QXmppMessage &message)
override;
151 bool handlePubSubEvent(
const QDomElement &element,
const QString &pubSubService,
const QString &nodeName)
override;
155 std::unique_ptr<QXmppOmemoManagerPrivate> d;
157 friend class QXmppOmemoManagerPrivate;
158 friend class tst_QXmppOmemoManager;
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition QXmppClientExtension.h:33
The QXmppClient class is the main class for using QXmpp.
Definition QXmppClient.h:84
Definition QXmppE2eeExtension.h:23
The QXmppIq class is the base class for all IQs.
Definition QXmppIq.h:23
Definition QXmppMessageHandler.h:16
The QXmppMessage class represents an XMPP message.
Definition QXmppMessage.h:35
The QXmppOmemoDevice class represents a XEP-0384: OMEMO Encryption device.
Definition QXmppOmemoManager.h:42
QXmppOmemoDevice(QXmppOmemoDevice &&) noexcept
Move-constructor.
QXmppOmemoDevice(const QXmppOmemoDevice &other)
Copy-constructor.
Definition QXmppOmemoManager.h:69
Q_SIGNAL void deviceRemoved(const QString &jid, uint32_t deviceId)
std::variant< QXmpp::Success, QXmppError > Result
Definition QXmppOmemoManager.h:73
Q_SIGNAL void allDevicesRemoved()
Q_SIGNAL void devicesRemoved(const QString &jid)
Q_SIGNAL void deviceAdded(const QString &jid, uint32_t deviceId)
Q_SIGNAL void trustLevelsChanged(const QMultiHash< QString, QByteArray > &modifiedKeys)
Q_SIGNAL void deviceChanged(const QString &jid, uint32_t deviceId)
The QXmppOmemoOwnDevice class represents the XEP-0384: OMEMO Encryption device of this client instanc...
Definition QXmppOmemoManager.h:21
QXmppOmemoOwnDevice(const QXmppOmemoOwnDevice &other)
Copy-constructor.
QXmppOmemoOwnDevice(QXmppOmemoOwnDevice &&) noexcept
Move-constructor.
The QXmppOmemoStorage class stores data used by XEP-0384: OMEMO Encryption.
Definition QXmppOmemoStorage.h:17
Definition QXmppPubSubEventHandler.h:15
Definition QXmppTask.h:62
TrustLevel
Definition QXmppTrustLevel.h:19
TrustSecurityPolicy
Definition QXmppTrustSecurityPolicy.h:18