// SPDX-FileCopyrightText: 2021 Melvin Keskin // // SPDX-License-Identifier: LGPL-2.1-or-later #ifndef QXMPPATMMANAGER_H #define QXMPPATMMANAGER_H #include "QXmppAtmTrustStorage.h" #include "QXmppClientExtension.h" #include "QXmppSendResult.h" class QXmppMessage; class QXmppTrustMessageKeyOwner; class QXMPP_EXPORT QXmppAtmManager : public QXmppClientExtension { Q_OBJECT public: QXmppAtmManager(QXmppAtmTrustStorage *trustStorage); QFuture makeTrustDecisions(const QString &encryption, const QString &keyOwnerJid, const QList &keyIdsForAuthentication, const QList &keyIdsForDistrusting = {}); /// \cond bool handleStanza(const QDomElement &stanza) override; protected: void setClient(QXmppClient *client) override; private slots: void handleMessageReceived(const QXmppMessage &message); /// \endcond private: QFuture makeTrustDecisions(const QString &encryption, const QMultiHash &keyIdsForAuthentication, const QMultiHash &keyIdsForDistrusting); QFuture handleMessage(const QXmppMessage &message); QFuture authenticate(const QString &encryption, const QMultiHash &keyIds); QFuture distrust(const QString &encryption, const QMultiHash &keyIds); QFuture distrustAutomaticallyTrustedKeys(const QString &encryption, const QList &keyOwnerJids); QFuture makePostponedTrustDecisions(const QString &encryption, const QList &senderKeyIds); QFuture sendTrustMessage(const QString &encryption, const QList &keyOwners, const QString &recipientJid); QXmppAtmTrustStorage *m_trustStorage; friend class tst_QXmppAtmManager; }; #endif // QXMPPATMMANAGER_H