From 6ac753d038eac6fbb4985648eb719f39aad489ef Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Fri, 10 Dec 2010 08:39:41 +0000 Subject: improve QXmppDiscoveryManager code documentation --- src/QXmppDiscoveryManager.cpp | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) (limited to 'src/QXmppDiscoveryManager.cpp') diff --git a/src/QXmppDiscoveryManager.cpp b/src/QXmppDiscoveryManager.cpp index ee93babf..e481beb5 100644 --- a/src/QXmppDiscoveryManager.cpp +++ b/src/QXmppDiscoveryManager.cpp @@ -71,6 +71,11 @@ bool QXmppDiscoveryManager::handleStanza(const QDomElement &element) return false; } +/// Requests information from the specified XMPP entity. +/// +/// \param jid The target entity's JID. +/// \param node The target node (optional). + QString QXmppDiscoveryManager::requestInfo(const QString& jid, const QString& node) { QXmppDiscoveryIq request; @@ -86,6 +91,11 @@ QString QXmppDiscoveryManager::requestInfo(const QString& jid, const QString& no return ""; } +/// Requests items from the specified XMPP entity. +/// +/// \param jid The target entity's JID. +/// \param node The target node (optional). + QString QXmppDiscoveryManager::requestItems(const QString& jid, const QString& node) { QXmppDiscoveryIq request; @@ -146,32 +156,61 @@ QXmppDiscoveryIq QXmppDiscoveryManager::capabilities() return iq; } -/// http://xmpp.org/registrar/disco-categories.html#client +/// Sets the category of the local XMPP client. +/// +/// You can find a list of valid categories at: +/// http://xmpp.org/registrar/disco-categories.html +/// +/// \param category + void QXmppDiscoveryManager::setClientCategory(const QString& category) { m_clientCategory = category; } +/// Sets the type of the local XMPP client. +/// +/// You can find a list of valid types at: +/// http://xmpp.org/registrar/disco-categories.html +/// +/// \param type + void QXmppDiscoveryManager::setClientType(const QString& type) { m_clientType = type; } +/// Sets the name of the local XMPP client. +/// +/// \param name + void QXmppDiscoveryManager::setClientName(const QString& name) { m_clientName = name; } +/// Returns the category of the local XMPP client. +/// +/// By default this is "client". + QString QXmppDiscoveryManager::clientCategory() { return m_clientCategory; } +/// Returns the type of the local XMPP client. +/// +/// By default this is "pc". + QString QXmppDiscoveryManager::clientType() { return m_clientType; } +/// Returns the name of the local XMPP client. +/// +/// By default this is "Based on QXmpp x.y.z". + QString QXmppDiscoveryManager::clientName() { return m_clientName; -- cgit v1.2.3