From 60c294df8efa73c24f4c7b304479f646d5d17b2a Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Thu, 8 Jul 2010 16:00:54 +0000 Subject: add accessor to test whether a client is connected --- source/QXmppClient.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/QXmppClient.cpp') 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. -- cgit v1.2.3