diff options
| author | Linus Jahn <lnj@kaidan.im> | 2020-09-09 15:32:01 +0200 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2021-01-09 14:37:47 +0100 |
| commit | af22e07a2300dc18ec62eee30508569062d918b3 (patch) | |
| tree | 753c28084811c1beac0d1657eb193aa756703e4d /src/client/QXmppClient.cpp | |
| parent | 8570b4c56616547e5fa2530e6b9733fb37cf02a3 (diff) | |
| download | qxmpp-af22e07a2300dc18ec62eee30508569062d918b3.tar.gz | |
QXmppClient: Advertise stream management state
Diffstat (limited to 'src/client/QXmppClient.cpp')
| -rw-r--r-- | src/client/QXmppClient.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/client/QXmppClient.cpp b/src/client/QXmppClient.cpp index 926a9463..6f3c2d57 100644 --- a/src/client/QXmppClient.cpp +++ b/src/client/QXmppClient.cpp @@ -350,6 +350,24 @@ void QXmppClient::setActive(bool active) } } +/// +/// Returns the current \xep{0198}: Stream Management state of the connection. +/// +/// Upon connection of the client this can be used to check whether the +/// previous stream has been resumed. +/// +/// \since QXmpp 1.4 +/// +QXmppClient::StreamManagementState QXmppClient::streamManagementState() const +{ + if (d->stream->isStreamManagementEnabled()) { + if (d->stream->isStreamResumed()) + return ResumedStream; + return NewStream; + } + return NoStreamManagement; +} + /// Returns the reference to QXmppRosterManager object of the client. /// /// \return Reference to the roster object of the connected client. Use this to |
