diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-04-15 08:39:24 +0000 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-04-15 08:39:24 +0000 |
| commit | b04c25917bf5954df0e67855fe5e5bdd657daf9a (patch) | |
| tree | b7b6fe5441cab09accc6f7251389a6af4699d453 /source | |
| parent | fa8d7ed727b892aefb3fc4741c57e0466848b6da (diff) | |
| download | qxmpp-b04c25917bf5954df0e67855fe5e5bdd657daf9a.tar.gz | |
add code documentation for QXmppRosterIq::Item
Diffstat (limited to 'source')
| -rw-r--r-- | source/QXmppRosterIq.cpp | 55 | ||||
| -rw-r--r-- | source/QXmppRosterIq.h | 16 |
2 files changed, 66 insertions, 5 deletions
diff --git a/source/QXmppRosterIq.cpp b/source/QXmppRosterIq.cpp index 320cb8bb..ce608aa2 100644 --- a/source/QXmppRosterIq.cpp +++ b/source/QXmppRosterIq.cpp @@ -70,52 +70,107 @@ void QXmppRosterIq::toXmlElementFromChild(QXmlStreamWriter *writer) const writer->writeEndElement(); } +/// Returns the bareJid of the roster entry. +/// +/// \return bareJid as a QString +/// + QString QXmppRosterIq::Item::bareJid() const { return m_bareJid; } +/// Sets the bareJid of the roster entry. +/// +/// \param bareJid as a QString +/// + void QXmppRosterIq::Item::setBareJid(const QString& str) { m_bareJid = str; } +/// Returns the groups of the roster entry. +/// +/// \return QSet<QString> list of all the groups +/// + QSet<QString> QXmppRosterIq::Item::groups() const { return m_groups; } +/// Sets the groups of the roster entry. +/// +/// \param groups list of all the groups as a QSet<QString> +/// + void QXmppRosterIq::Item::setGroups(const QSet<QString>& groups) { m_groups = groups; } +/// Returns the name of the roster entry. +/// +/// \return name as a QString +/// + QString QXmppRosterIq::Item::name() const { return m_name; } +/// Sets the name of the roster entry. +/// +/// \param name as a QString +/// + void QXmppRosterIq::Item::setName(const QString& str) { m_name = str; } +/// Returns the subscription status of the roster entry. It is the "ask" +/// attribute in the Roster IQ stanza. Its value can be "subscribe" or "unsubscribe" +/// or empty. +/// +/// \return subscription status as a QString +/// +/// + QString QXmppRosterIq::Item::subscriptionStatus() const { return m_subscriptionStatus; } +/// Sets the subscription status of the roster entry. It is the "ask" +/// attribute in the Roster IQ stanza. Its value can be "subscribe" or "unsubscribe" +/// or empty. +/// +/// \param status as a QString +/// + void QXmppRosterIq::Item::setSubscriptionStatus(const QString& str) { m_subscriptionStatus = str; } +/// Returns the subscription type of the roster entry. +/// +/// \return QXmppRosterEntry::SubscriptionType +/// + QXmppRosterIq::Item::SubscriptionType QXmppRosterIq::Item::subscriptionType() const { return m_type; } +/// Sets the subscription type of the roster entry. +/// +/// \param type as a QXmppRosterEntry::SubscriptionType +/// + void QXmppRosterIq::Item::setSubscriptionType(SubscriptionType type) { m_type = type; diff --git a/source/QXmppRosterIq.h b/source/QXmppRosterIq.h index 14624e7c..2ba3e311 100644 --- a/source/QXmppRosterIq.h +++ b/source/QXmppRosterIq.h @@ -36,14 +36,20 @@ public: class Item { public: + /// An enumeration for type of subscription with the bareJid in the roster. enum SubscriptionType { NotSet = 0, - None, - Both, - From, - To, - Remove + None, ///< the user does not have a subscription to the + ///< contact's presence information, and the contact does + ///< not have a subscription to the user's presence information + Both, ///< both the user and the contact have subscriptions to each + ///< other's presence information + From, ///< the contact has a subscription to the user's presence information, + ///< but the user does not have a subscription to the contact's presence information + To, ///< the user has a subscription to the contact's presence information, + ///< but the contact does not have a subscription to the user's presence information + Remove ///< to delete a roster item }; QString bareJid() const; |
