diff options
| author | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2009-09-20 03:21:10 +0000 |
|---|---|---|
| committer | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2009-09-20 03:21:10 +0000 |
| commit | ce1ab59604a8f430f8f0d293ca28072020b22235 (patch) | |
| tree | 26edcbc1840204f96d3c9b58ff3086211ddd41db /source | |
| parent | 93f275fa9abd0a95f4a915417bec9ac25bc1cd23 (diff) | |
| download | qxmpp-ce1ab59604a8f430f8f0d293ca28072020b22235.tar.gz | |
setReconnectionManager bug and documentation update
Diffstat (limited to 'source')
| -rw-r--r-- | source/QXmppClient.cpp | 11 | ||||
| -rw-r--r-- | source/QXmppClient.h | 21 |
2 files changed, 27 insertions, 5 deletions
diff --git a/source/QXmppClient.cpp b/source/QXmppClient.cpp index 5940860a..e139476b 100644 --- a/source/QXmppClient.cpp +++ b/source/QXmppClient.cpp @@ -285,12 +285,15 @@ QXmppReconnectionManager* QXmppClient::getReconnectionManager() /// Sets the user defined reconnection manager.
///
-/// \return true if all the signal-slot connections are done correctly.
+/// \return true if all the signal-slot connections are made correctly.
///
bool QXmppClient::setReconnectionManager(QXmppReconnectionManager*
reconnectionManager)
{
+ if(!reconnectionManager)
+ return false;
+
if(m_reconnectionManager)
delete m_reconnectionManager;
@@ -299,11 +302,15 @@ bool QXmppClient::setReconnectionManager(QXmppReconnectionManager* bool check = connect(this, SIGNAL(connected()), m_reconnectionManager,
SLOT(connected()));
Q_ASSERT(check);
+ if(!check)
+ return false;
check = connect(this, SIGNAL(error(QXmppClient::Error)),
m_reconnectionManager, SLOT(error(QXmppClient::Error)));
Q_ASSERT(check);
-
+ if(!check)
+ return false;
+
return true;
}
diff --git a/source/QXmppClient.h b/source/QXmppClient.h index 2f3934bb..04fbd196 100644 --- a/source/QXmppClient.h +++ b/source/QXmppClient.h @@ -21,6 +21,20 @@ *
*/
+/// \class QXmppClient
+/// \brief The QXmppClient is the main class for using QXmpp.
+///
+/// It provides the user all the required functionality to connect to the server
+/// and perform operations afterwards.
+///
+/// This class will provide the handle/reference to QXmppRoster (roster management),
+/// QXmppVCardManager (vCard manager) and QXmppReconnectionManager (reconnection
+/// mechanism).
+///
+/// By default, a reconnection mechanism exists, which makes sure of reconnecting
+/// to the server on dissconnections due to an error. User can have a custom
+/// reconnection mechanism as well.
+///
#ifndef QXMPPCLIENT_H
#define QXMPPCLIENT_H
@@ -137,9 +151,10 @@ public slots: private:
QXmppStream* m_stream; ///< Pointer to QXmppStream object a wrapper over
///< TCP socket and XMPP protocol
- QXmppConfiguration m_config; ///<
- QXmppPresence m_clientPrecence;
- QXmppReconnectionManager* m_reconnectionManager;
+ QXmppConfiguration m_config; ///< This object provides the configuration
+ ///< required for connecting to the XMPP server.
+ QXmppPresence m_clientPrecence; ///< Stores the current presence of connected client
+ QXmppReconnectionManager* m_reconnectionManager; ///< Pointer to the reconnection manager
};
#endif // QXMPPCLIENT_H
|
