diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-07-08 16:00:54 +0000 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-07-08 16:00:54 +0000 |
| commit | 60c294df8efa73c24f4c7b304479f646d5d17b2a (patch) | |
| tree | 05225d7a4c752fe7173ad4479ac0cb1103235f19 /source/QXmppClient.cpp | |
| parent | ad6dbbdf512d664a64dd67db81341d6beb16a117 (diff) | |
| download | qxmpp-60c294df8efa73c24f4c7b304479f646d5d17b2a.tar.gz | |
add accessor to test whether a client is connected
Diffstat (limited to 'source/QXmppClient.cpp')
| -rw-r--r-- | source/QXmppClient.cpp | 8 |
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. |
