diff options
| author | Linus Jahn <lnj@kaidan.im> | 2022-08-16 21:00:15 +0200 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2023-01-03 22:05:54 +0100 |
| commit | b17284ee7d674416e0d11f1699f73fcc606262d4 (patch) | |
| tree | 86597f2bc2a1ed2d257e0cbf8e7de1ca54080c08 /src/client/QXmppAtmManager.h | |
| parent | 3271c6642439d4d3c0d8c634e2b3f4cf17b908a0 (diff) | |
| download | qxmpp-b17284ee7d674416e0d11f1699f73fcc606262d4.tar.gz | |
Introduce QXmppTask & QXmppPromise
Closes #502.
Co-authored-by: Jonah BrĂ¼chert <jbb@kaidan.im>
Diffstat (limited to 'src/client/QXmppAtmManager.h')
| -rw-r--r-- | src/client/QXmppAtmManager.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/client/QXmppAtmManager.h b/src/client/QXmppAtmManager.h index 9a0ab446..f1630ba4 100644 --- a/src/client/QXmppAtmManager.h +++ b/src/client/QXmppAtmManager.h @@ -11,6 +11,8 @@ class QXmppMessage; class QXmppTrustMessageKeyOwner; +template<typename T> +class QXmppTask; class QXMPP_EXPORT QXmppAtmManager : public QXmppTrustManager { @@ -18,7 +20,7 @@ class QXMPP_EXPORT QXmppAtmManager : public QXmppTrustManager public: QXmppAtmManager(QXmppAtmTrustStorage *trustStorage); - QFuture<void> makeTrustDecisions(const QString &encryption, const QString &keyOwnerJid, const QList<QByteArray> &keyIdsForAuthentication, const QList<QByteArray> &keyIdsForDistrusting = {}); + QXmppTask<void> makeTrustDecisions(const QString &encryption, const QString &keyOwnerJid, const QList<QByteArray> &keyIdsForAuthentication, const QList<QByteArray> &keyIdsForDistrusting = {}); protected: /// \cond @@ -28,16 +30,16 @@ private: Q_SLOT void handleMessageReceived(const QXmppMessage &message); /// \endcond - QFuture<void> makeTrustDecisions(const QString &encryption, const QMultiHash<QString, QByteArray> &keyIdsForAuthentication, const QMultiHash<QString, QByteArray> &keyIdsForDistrusting); - QFuture<void> handleMessage(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); - QFuture<void> authenticate(const QString &encryption, const QMultiHash<QString, QByteArray> &keyIds); - QFuture<void> distrust(const QString &encryption, const QMultiHash<QString, QByteArray> &keyIds); + QXmppTask<void> authenticate(const QString &encryption, const QMultiHash<QString, QByteArray> &keyIds); + QXmppTask<void> distrust(const QString &encryption, const QMultiHash<QString, QByteArray> &keyIds); - QFuture<void> distrustAutomaticallyTrustedKeys(const QString &encryption, const QList<QString> &keyOwnerJids); - QFuture<void> makePostponedTrustDecisions(const QString &encryption, const QList<QByteArray> &senderKeyIds); + QXmppTask<void> distrustAutomaticallyTrustedKeys(const QString &encryption, const QList<QString> &keyOwnerJids); + QXmppTask<void> makePostponedTrustDecisions(const QString &encryption, const QList<QByteArray> &senderKeyIds); - QFuture<QXmpp::SendResult> sendTrustMessage(const QString &encryption, const QList<QXmppTrustMessageKeyOwner> &keyOwners, const QString &recipientJid); + QXmppTask<QXmpp::SendResult> sendTrustMessage(const QString &encryption, const QList<QXmppTrustMessageKeyOwner> &keyOwners, const QString &recipientJid); /// \cond inline QXmppAtmTrustStorage *trustStorage() const |
