From 22be2464b5d253e840d4731fbc86e9633a394e8c Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Sun, 5 Sep 2021 16:02:37 +0200 Subject: QXmppStream: Allow to use existing future interface --- src/base/QXmppStream.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/base/QXmppStream.h') diff --git a/src/base/QXmppStream.h b/src/base/QXmppStream.h index e1fd31ac..3c321921 100644 --- a/src/base/QXmppStream.h +++ b/src/base/QXmppStream.h @@ -29,6 +29,7 @@ #include "QXmppSendResult.h" #include +#include #include #include @@ -36,6 +37,8 @@ class QDomElement; template class QFuture; +template +class QFutureInterface; class QSslSocket; class QXmppIq; class QXmppNonza; @@ -58,10 +61,13 @@ public: bool sendPacket(const QXmppNonza &); QFuture send(QXmppNonza &&); + QFuture send(QXmppPacket &&); using IqResult = std::variant; QFuture sendIq(QXmppIq &&); + QFuture sendIq(QXmppPacket &&, const QString &id); void cancelOngoingIqs(); + bool hasIqId(const QString &id) const; void resetPacketCache(); @@ -110,7 +116,7 @@ private: friend class tst_QXmppStream; friend class TestClient; - QFuture send(QXmppNonza &&, bool &); + QFuture send(QXmppPacket &&, bool &); void processData(const QString &data); bool handleIqResponse(const QDomElement &); -- cgit v1.2.3