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>;
75 struct DevicesResult {
92 int maximumDevicesPerJid()
const;
93 void setMaximumDevicesPerJid(
int maximum);
95 int maximumDevicesPerStanza()
const;
96 void setMaximumDevicesPerStanza(
int maximum);
107 void setAcceptedSessionBuildingTrustLevels(QXmpp::TrustLevels trustLevels);
108 QXmpp::TrustLevels acceptedSessionBuildingTrustLevels();
110 void setNewDeviceAutoSessionBuildingEnabled(
bool isNewDeviceAutoSessionBuildingEnabled);
111 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;
152 bool handlePubSubEvent(
const QDomElement &element,
const QString &pubSubService,
const QString &nodeName)
override;
156 std::unique_ptr<QXmppOmemoManagerPrivate> d;
158 friend class QXmppOmemoManagerPrivate;
159 friend class tst_QXmppOmemoManager;
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition: QXmppClientExtension.h:32
Main class for starting and managing connections to XMPP servers.
Definition: QXmppClient.h:62
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:64
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
Definition: Algorithms.h:12
TrustLevel
Definition: QXmppTrustLevel.h:19
TrustSecurityPolicy
Definition: QXmppTrustSecurityPolicy.h:18