Loading...
Searching...
No Matches
QXmppAtmManager.h
// SPDX-FileCopyrightText: 2021 Melvin Keskin <melvo@olomono.de>
//
// SPDX-License-Identifier: LGPL-2.1-or-later
#ifndef QXMPPATMMANAGER_H
#define QXMPPATMMANAGER_H
#include "QXmppAtmTrustStorage.h"
#include "QXmppSendResult.h"
#include "QXmppTrustManager.h"
class QXmppMessage;
class QXmppTrustMessageKeyOwner;
template<typename T>
class QXmppTask;
class QXMPP_EXPORT QXmppAtmManager : public QXmppTrustManager
{
Q_OBJECT
public:
QXmppAtmManager(QXmppAtmTrustStorage *trustStorage);
QXmppTask<void> makeTrustDecisions(const QString &encryption, const QString &keyOwnerJid, const QList<QByteArray> &keyIdsForAuthentication, const QList<QByteArray> &keyIdsForDistrusting = {});
protected:
void onRegistered(QXmppClient *client) override;
void onUnregistered(QXmppClient *client) override;
private:
Q_SLOT void handleMessageReceived(const QXmppMessage &message);
QXmppTask<void> makeTrustDecisions(const QString &encryption, const QMultiHash<QString, QByteArray> &keyIdsForAuthentication, const QMultiHash<QString, QByteArray> &keyIdsForDistrusting);
QXmppTask<void> handleMessage(const QXmppMessage &message);
QXmppTask<void> authenticate(const QString &encryption, const QMultiHash<QString, QByteArray> &keyIds);
QXmppTask<void> distrust(const QString &encryption, const QMultiHash<QString, QByteArray> &keyIds);
QXmppTask<void> distrustAutomaticallyTrustedKeys(const QString &encryption, const QList<QString> &keyOwnerJids);
QXmppTask<void> makePostponedTrustDecisions(const QString &encryption, const QList<QByteArray> &senderKeyIds);
QXmppTask<QXmpp::SendResult> sendTrustMessage(const QString &encryption, const QList<QXmppTrustMessageKeyOwner> &keyOwners, const QString &recipientJid);
inline QXmppAtmTrustStorage *trustStorage() const
{
return dynamic_cast<QXmppAtmTrustStorage *>(QXmppTrustManager::trustStorage());
}
friend class tst_QXmppTrustManager;
};
#endif // QXMPPATMMANAGER_H
QXmppAtmManager::makePostponedTrustDecisions
QXmppTask< void > makePostponedTrustDecisions(const QString &encryption, const QList< QByteArray > &senderKeyIds)
Definition QXmppAtmManager.cpp:456
QXmppAtmManager::makeTrustDecisions
QXmppTask< void > makeTrustDecisions(const QString &encryption, const QString &keyOwnerJid, const QList< QByteArray > &keyIdsForAuthentication, const QList< QByteArray > &keyIdsForDistrusting={})
Definition QXmppAtmManager.cpp:80
QXmppAtmManager::distrust
QXmppTask< void > distrust(const QString &encryption, const QMultiHash< QString, QByteArray > &keyIds)
Definition QXmppAtmManager.cpp:415
QXmppAtmManager::distrustAutomaticallyTrustedKeys
QXmppTask< void > distrustAutomaticallyTrustedKeys(const QString &encryption, const QList< QString > &keyOwnerJids)
Definition QXmppAtmManager.cpp:441
QXmppAtmManager::handleMessage
QXmppTask< void > handleMessage(const QXmppMessage &message)
Definition QXmppAtmManager.cpp:293
QXmppAtmManager::authenticate
QXmppTask< void > authenticate(const QString &encryption, const QMultiHash< QString, QByteArray > &keyIds)
Definition QXmppAtmManager.cpp:377
QXmppAtmManager::sendTrustMessage
QXmppTask< QXmpp::SendResult > sendTrustMessage(const QString &encryption, const QList< QXmppTrustMessageKeyOwner > &keyOwners, const QString &recipientJid)
Definition QXmppAtmManager.cpp:485
QXmppAtmTrustStorage
The QXmppAtmTrustStorage class stores trust data for XEP-0450: Automatic Trust Management (ATM).
Definition QXmppAtmTrustStorage.h:15
QXmppClientExtension::onUnregistered
virtual void onUnregistered(QXmppClient *client)
Definition QXmppClientExtension.cpp:95
QXmppClientExtension::onRegistered
virtual void onRegistered(QXmppClient *client)
Definition QXmppClientExtension.cpp:85
QXmppClientExtension::client
QXmppClient * client() const
Definition QXmppClientExtension.cpp:57
QXmppMessage
The QXmppMessage class represents an XMPP message.
Definition QXmppMessage.h:64
QXmppTask
Definition QXmppTask.h:46
QXmppTrustManager::QXmppTrustManager
QXmppTrustManager(QXmppTrustStorage *trustStorage)
Definition QXmppTrustManager.cpp:31
QXmppTrustMessageKeyOwner
The QXmppTrustMessageKeyOwner class represents a key owner of the trust message as defined by XEP-043...
Definition QXmppTrustMessageKeyOwner.h:18
QXmppAtmManager::QXmppAtmManager
QXmppAtmManager(QXmppAtmTrustStorage *trustStorage)
Definition QXmppAtmManager.cpp:65