QXmppRosterIq::Item Class

class QXmppRosterIq::Item

The QXmppRosterIq::Item class represents a roster entry. More...

Public Types

enum SubscriptionType { None, From, To, Both, Remove, NotSet }

Public Functions

Item()
Item(const QXmppRosterIq::Item &other)
Item(QXmppRosterIq::Item &&)
QString bareJid() const
QSet<QString> groups() const
(since QXmpp 1.3) bool isApproved() const
(since QXmpp 1.3) bool isMixChannel() const
(since QXmpp 1.3) QString mixParticipantId() const
QString name() const
void setBareJid(const QString &bareJid)
void setGroups(const QSet<QString> &groups)
(since QXmpp 1.3) void setIsApproved(bool approved)
(since QXmpp 1.3) void setIsMixChannel(bool isMixChannel)
(since QXmpp 1.3) void setMixParticipantId(const QString &participantId)
void setName(const QString &name)
void setSubscriptionStatus(const QString &status)
void setSubscriptionType(QXmppRosterIq::Item::SubscriptionType type)
QString subscriptionStatus() const
QXmppRosterIq::Item::SubscriptionType subscriptionType() const
QXmppRosterIq::Item &operator=(QXmppRosterIq::Item &&)
QXmppRosterIq::Item &operator=(const QXmppRosterIq::Item &other)

Detailed Description

Member Type Documentation

enum Item::SubscriptionType

An enumeration for type of subscription with the bareJid in the roster.

ConstantValueDescription
QXmppRosterIq::Item::None0the 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.
QXmppRosterIq::Item::From1the contact has a subscription to the user's presence information, but the user does not have a subscription to the contact's presence information.
QXmppRosterIq::Item::To2the user has a subscription to the contact's presence information, but the contact does not have a subscription to the user's presence information.
QXmppRosterIq::Item::Both3both the user and the contact have subscriptions to each other's presence information.
QXmppRosterIq::Item::Remove4to delete a roster item.
QXmppRosterIq::Item::NotSet8the subscription state was not specified.

Member Function Documentation

Item::Item()

Constructs a new roster entry.

Item::Item(const QXmppRosterIq::Item &other)

Default copy-constructor

Item::Item(QXmppRosterIq::Item &&)

Default move-constructor

QString Item::bareJid() const

Returns the bareJid of the roster entry as a QString.

See also setBareJid().

QSet<QString> Item::groups() const

Returns the groups of the roster entry as a QSet<QString> list of all the groups.

See also setGroups().

[since QXmpp 1.3] bool Item::isApproved() const

Returns whether the item has a pre-approved presence subscription.

This function was introduced in QXmpp 1.3.

See also setIsApproved().

[since QXmpp 1.3] bool Item::isMixChannel() const

Returns whether this is a MIX channel.

This function was introduced in QXmpp 1.3.

See also setIsMixChannel().

[since QXmpp 1.3] QString Item::mixParticipantId() const

Returns the participant id for this MIX channel.

This function was introduced in QXmpp 1.3.

See also setMixParticipantId().

QString Item::name() const

Returns the name of the roster entry as a QString.

See also setName().

void Item::setBareJid(const QString &bareJid)

Sets the bareJid of the roster entry.

See also bareJid().

void Item::setGroups(const QSet<QString> &groups)

Sets the groups of the roster entry as a QSet<QString> list of all the groups.

See also groups().

[since QXmpp 1.3] void Item::setIsApproved(bool approved)

Sets whether the item has a pre-approved presence subscription.

This cannot be used to initiate a pre-approved subscription. For this purpose the client must send a &lt;presence/&gt; stanza of type subscribed to the user.

approved.

This function was introduced in QXmpp 1.3.

See also isApproved().

[since QXmpp 1.3] void Item::setIsMixChannel(bool isMixChannel)

Sets whether this is a MIX channel.

isMixChannel.

This function was introduced in QXmpp 1.3.

See also isMixChannel().

[since QXmpp 1.3] void Item::setMixParticipantId(const QString &participantId)

Sets the participant id for this MIX channel.

participantId.

This function was introduced in QXmpp 1.3.

See also mixParticipantId().

void Item::setName(const QString &name)

Sets the name of the roster entry.

See also name().

void Item::setSubscriptionStatus(const QString &status)

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.

See also subscriptionStatus().

void Item::setSubscriptionType(QXmppRosterIq::Item::SubscriptionType type)

Sets the subscription type of the roster entry.

See also subscriptionType().

QString Item::subscriptionStatus() const

Returns the subscription status of the roster entry as a QString. It is the "ask" attribute in the Roster IQ stanza. Its value can be "subscribe" or "unsubscribe" or empty.

See also setSubscriptionStatus().

QXmppRosterIq::Item::SubscriptionType Item::subscriptionType() const

Returns the subscription type of the roster entry.

See also setSubscriptionType().

QXmppRosterIq::Item &Item::operator=(QXmppRosterIq::Item &&)

Default assignment operator

QXmppRosterIq::Item &Item::operator=(const QXmppRosterIq::Item &other)

Default assignment operator