aboutsummaryrefslogtreecommitdiff
path: root/source/QXmppClient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/QXmppClient.cpp')
-rw-r--r--source/QXmppClient.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/QXmppClient.cpp b/source/QXmppClient.cpp
index bdd91cfa..3b674817 100644
--- a/source/QXmppClient.cpp
+++ b/source/QXmppClient.cpp
@@ -260,6 +260,14 @@ void QXmppClient::disconnect()
}
}
+/// Returns true if the client is connected to the XMPP server.
+///
+
+bool QXmppClient::isConnected() const
+{
+ return m_stream && m_stream->isConnected();
+}
+
/// Returns the reference to QXmppRoster object of the client.
/// \return Reference to the roster object of the connected client. Use this to
/// get the list of friends in the roster and their presence information.