QXmpp Version: 1.15.1
Loading...
Searching...
No Matches
QXmppAtmManager.h
1// SPDX-FileCopyrightText: 2021 Melvin Keskin <melvo@olomono.de>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPATMMANAGER_H
6#define QXMPPATMMANAGER_H
7
8#include "QXmppAtmTrustStorage.h"
9#include "QXmppSendResult.h"
10#include "QXmppTrustManager.h"
11
12class QXmppMessage;
14template<typename T>
15class QXmppTask;
16
17class QXMPP_EXPORT QXmppAtmManager : public QXmppTrustManager
18{
19 Q_OBJECT
20
21public:
23 QXmppTask<void> makeTrustDecisions(QString encryption, QString keyOwnerJid, QList<QByteArray> keyIdsForAuthentication, QList<QByteArray> keyIdsForDistrusting = {});
24
25protected:
27 void onRegistered(QXmppClient *client) override;
28 void onUnregistered(QXmppClient *client) override;
30
31private:
32 QXmppTask<void> makeTrustDecisions(QString encryption, QMultiHash<QString, QByteArray> keyIdsForAuthentication, QMultiHash<QString, QByteArray> keyIdsForDistrusting);
33 QXmppTask<void> handleMessage(const QXmppMessage &message);
34
35 QXmppTask<void> distrustAutomaticallyTrustedKeys(const QString &encryption, const QList<QString> &keyOwnerJids);
36 QXmppTask<void> makePostponedTrustDecisions(QString encryption, const QList<QByteArray> &senderKeyIds);
37
38 QXmppTask<QXmpp::SendResult> sendTrustMessage(const QString &encryption, const QList<QXmppTrustMessageKeyOwner> &keyOwners, const QString &recipientJid);
39
41 inline QXmppAtmTrustStorage *trustStorage() const
42 {
43 return dynamic_cast<QXmppAtmTrustStorage *>(QXmppTrustManager::trustStorage());
44 }
46
47 friend class tst_QXmppTrustManager;
48};
49
50#endif // QXMPPATMMANAGER_H
The QXmppAtmManager class represents a manager for XEP-0450: Automatic Trust Management (ATM).
Definition QXmppAtmManager.h:18
The QXmppAtmTrustStorage class stores trust data for XEP-0450: Automatic Trust Management (ATM).
Definition QXmppAtmTrustStorage.h:15
virtual void onUnregistered(QXmppClient *client)
Definition QXmppClientExtension.cpp:95
virtual void onRegistered(QXmppClient *client)
Definition QXmppClientExtension.cpp:85
Main class for starting and managing connections to XMPP servers.
Definition QXmppClient.h:62
The QXmppMessage class represents an XMPP message.
Definition QXmppMessage.h:64
Definition QXmppTask.h:330
The QXmppTrustManager manages end-to-end encryption trust decisions.
Definition QXmppTrustManager.h:18
The QXmppTrustMessageKeyOwner class represents a key owner of the trust message as defined by XEP-043...
Definition QXmppTrustMessageKeyOwner.h:18