QXmppRosterIq::Item Class Reference

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

`#include <QXmppRosterIq.h>`

## Public Types

enum | SubscriptionType { None = 0 , From = 1 , To = 2 , Both = 3 , Remove = 4 , NotSet = 8 }
| An enumeration for type of subscription with the bareJid in the roster. More...

## Public Member Functions

| Item ()
| Item (const Item &other)
Item & | operator= (const Item &other)
QString | bareJid () const
QSet< QString > | groups () const
QString | name () const
QString | subscriptionStatus () const
SubscriptionType | subscriptionType () const
bool | isApproved () const
void | setBareJid (const QString &)
void | setGroups (const QSet< QString > &)
void | setName (const QString &)
void | setSubscriptionStatus (const QString &)
void | setSubscriptionType (SubscriptionType)
void | setIsApproved (bool)
bool | isMixChannel () const
void | setIsMixChannel (bool)
QString | mixParticipantId () const
void | setMixParticipantId (const QString &)

## Detailed Description

The QXmppRosterIq::Item class represents a roster entry.

## Member Enumeration Documentation

## SubscriptionType

enum QXmppRosterIq::Item::SubscriptionType

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

Enumerator
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
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
Both | both the user and the contact have subscriptions to each other's presence information
Remove | to delete a roster item
NotSet | the subscription state was not specified

## Constructor & Destructor Documentation

## Item()

QXmppRosterIq::Item::Item | ( |  | ) |

Constructs a new roster entry.

## Member Function Documentation

## bareJid()

QString QXmppRosterIq::Item::bareJid | ( |  | ) | const

Returns the bareJid of the roster entry.

Returns
  bareJid as a QString

## groups()

QSet< QString > QXmppRosterIq::Item::groups | ( |  | ) | const

Returns the groups of the roster entry.

Returns
  QSet<QString> list of all the groups

## isApproved()

bool QXmppRosterIq::Item::isApproved | ( |  | ) | const

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

Since
  QXmpp 1.3

## isMixChannel()

bool QXmppRosterIq::Item::isMixChannel | ( |  | ) | const

Returns whether this is a MIX channel.

Since
  QXmpp 1.3

## mixParticipantId()

QString QXmppRosterIq::Item::mixParticipantId | ( |  | ) | const

Returns the participant id for this MIX channel.

Since
  QXmpp 1.3

## name()

QString QXmppRosterIq::Item::name | ( |  | ) | const

Returns the name of the roster entry.

Returns
  name as a QString

## setBareJid()

void QXmppRosterIq::Item::setBareJid | ( | const QString & | bareJid | ) |

Sets the bareJid of the roster entry.

Parameters

  bareJid | as a QString

## setGroups()

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

Sets the groups of the roster entry.

Parameters

  groups | list of all the groups as a QSet<QString>

## setIsApproved()

void QXmppRosterIq::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 <presence/> stanza of type `subscribed` to the user.

Since
  QXmpp 1.3

## setIsMixChannel()

void QXmppRosterIq::Item::setIsMixChannel | ( | bool | isMixChannel | ) |

Sets whether this is a MIX channel.

Since
  QXmpp 1.3

## setMixParticipantId()

void QXmppRosterIq::Item::setMixParticipantId | ( | const QString & | participantId | ) |

Sets the participant id for this MIX channel.

Since
  QXmpp 1.3

## setName()

void QXmppRosterIq::Item::setName | ( | const QString & | name | ) |

Sets the name of the roster entry.

Parameters

  name | as a QString

## setSubscriptionStatus()

void QXmppRosterIq::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.

Parameters

  status | as a QString

## setSubscriptionType()

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

Sets the subscription type of the roster entry.

Parameters

  type |

## subscriptionStatus()

QString QXmppRosterIq::Item::subscriptionStatus | ( |  | ) | const

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.

Returns
  subscription status as a QString

## subscriptionType()

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

Returns the subscription type of the roster entry.

The documentation for this class was generated from the following files:

- QXmppRosterIq.h
- QXmppRosterIq.cpp