// SPDX-FileCopyrightText: 2021 Melvin Keskin // // 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 class QXmppTask; class QXMPP_EXPORT QXmppAtmManager : public QXmppTrustManager { Q_OBJECT public: QXmppAtmManager(QXmppAtmTrustStorage *trustStorage); QXmppTask makeTrustDecisions(const QString &encryption, const QString &keyOwnerJid, const QList &keyIdsForAuthentication, const QList &keyIdsForDistrusting = {}); protected: /// \cond void setClient(QXmppClient *client) override; private: Q_SLOT void handleMessageReceived(const QXmppMessage &message); /// \endcond QXmppTask makeTrustDecisions(const QString &encryption, const QMultiHash &keyIdsForAuthentication, const QMultiHash &keyIdsForDistrusting); QXmppTask handleMessage(const QXmppMessage &message); QXmppTask authenticate(const QString &encryption, const QMultiHash &keyIds); QXmppTask distrust(const QString &encryption, const QMultiHash &keyIds); QXmppTask distrustAutomaticallyTrustedKeys(const QString &encryption, const QList &keyOwnerJids); QXmppTask makePostponedTrustDecisions(const QString &encryption, const QList &senderKeyIds); QXmppTask sendTrustMessage(const QString &encryption, const QList &keyOwners, const QString &recipientJid); /// \cond inline QXmppAtmTrustStorage *trustStorage() const { return dynamic_cast(QXmppTrustManager::trustStorage()); } /// \endcond friend class tst_QXmppAtmManager; }; #endif // QXMPPATMMANAGER_H