gloox  1.0.27
Public Member Functions | Protected Attributes | List of all members
RosterItemData Class Reference

#include <rosteritemdata.h>

Public Member Functions

 RosterItemData (const JID &jid, const std::string &name, const StringList &groups)
 
 RosterItemData (const JID &jid)
 
 RosterItemData (const RosterItemData &right)
 
GLOOX_DEPRECATED_CTOR RosterItemData (const std::string &jid, const std::string &name, const StringList &groups)
 
GLOOX_DEPRECATED_CTOR RosterItemData (const std::string &jid)
 
virtual ~RosterItemData ()
 
GLOOX_DEPRECATED const std::string & jid () const
 
const JIDjidJID () const
 
void setName (const std::string &name)
 
const std::string & name () const
 
void setSubscription (const std::string &subscription, const std::string &ask)
 
SubscriptionType subscription () const
 
void setGroups (const StringList &groups)
 
const StringListgroups () const
 
bool changed () const
 
bool remove () const
 
void setSynchronized ()
 
Tagtag () const
 

Protected Attributes

GLOOX_DEPRECATED std::string m_jid
 
JID m_jidJID
 

Detailed Description

A class holding roster item data.

You should not need to use this class directly.

Author
Jakob Schröter js@ca.nosp@m.maya.nosp@m..net
Since
1.0

Definition at line 36 of file rosteritemdata.h.

Constructor & Destructor Documentation

◆ RosterItemData() [1/5]

RosterItemData ( const JID jid,
const std::string &  name,
const StringList groups 
)
inline

Constructs a new item of the roster.

Parameters
jidThe JID of the contact.
nameThe displayed name of the contact.
groupsA list of groups the contact belongs to.

Definition at line 46 of file rosteritemdata.h.

◆ RosterItemData() [2/5]

RosterItemData ( const JID jid)
inline

Constructs a new item of the roster, scheduled for removal.

Parameters
jidThe JID of the contact to remove.

Definition at line 56 of file rosteritemdata.h.

◆ RosterItemData() [3/5]

RosterItemData ( const RosterItemData right)
inline

Copy constructor.

Parameters
rightThe RosterItemData to copy.

Definition at line 65 of file rosteritemdata.h.

◆ RosterItemData() [4/5]

GLOOX_DEPRECATED_CTOR RosterItemData ( const std::string &  jid,
const std::string &  name,
const StringList groups 
)
inline

Constructs a new item of the roster.

Parameters
jidThe JID of the contact.
nameThe displayed name of the contact.
groupsA list of groups the contact belongs to.
Deprecated:
Will be removed for 1.1.

Definition at line 78 of file rosteritemdata.h.

◆ RosterItemData() [5/5]

GLOOX_DEPRECATED_CTOR RosterItemData ( const std::string &  jid)
inline

Constructs a new item of the roster, scheduled for removal.

Parameters
jidThe JID of the contact to remove.
Deprecated:
Will be removed for 1.1.

Definition at line 89 of file rosteritemdata.h.

◆ ~RosterItemData()

virtual ~RosterItemData ( )
inlinevirtual

Virtual destructor.

Definition at line 97 of file rosteritemdata.h.

Member Function Documentation

◆ changed()

bool changed ( ) const
inline

Whether the item has unsynchronized changes.

Returns
True if the item has unsynchronized changes, false otherwise.

Definition at line 181 of file rosteritemdata.h.

◆ groups()

const StringList& groups ( ) const
inline

Returns the groups this RosterItem belongs to.

Returns
The groups this item belongs to.

Definition at line 175 of file rosteritemdata.h.

◆ jid()

GLOOX_DEPRECATED const std::string& jid ( ) const
inline

Returns the contact's bare JID.

Returns
The contact's bare JID.
Deprecated:
Will be removed for 1.1.

Definition at line 104 of file rosteritemdata.h.

◆ jidJID()

const JID& jidJID ( ) const
inline

Returns the contact's bare JID.

Returns
The contact's bare JID.
Todo:
Rename to jid() for 1.1.

Definition at line 111 of file rosteritemdata.h.

◆ name()

const std::string& name ( ) const
inline

Retrieves the displayed name of a contact/roster item.

Returns
The contact's name.

Definition at line 127 of file rosteritemdata.h.

◆ remove()

bool remove ( ) const
inline

Whether the item is scheduled for removal.

Returns
True if the item is subject to a removal or scheduled for removal, false otherwise.

Definition at line 188 of file rosteritemdata.h.

◆ setGroups()

void setGroups ( const StringList groups)
inline

Sets the groups this RosterItem belongs to.

Parameters
groupsThe groups to set for this item.

Definition at line 165 of file rosteritemdata.h.

◆ setName()

void setName ( const std::string &  name)
inline

Sets the displayed name of a contact/roster item.

Parameters
nameThe contact's new name.

Definition at line 117 of file rosteritemdata.h.

◆ setSubscription()

void setSubscription ( const std::string &  subscription,
const std::string &  ask 
)
inline

Sets the current subscription status of the contact.

Parameters
subscriptionThe current subscription.
askWhether a subscription request is pending.

Definition at line 134 of file rosteritemdata.h.

◆ setSynchronized()

void setSynchronized ( )
inline

Removes the 'changed' flag from the item.

Definition at line 193 of file rosteritemdata.h.

◆ subscription()

SubscriptionType subscription ( ) const
inline

Returns the current subscription type between the remote and the local entity.

Returns
The subscription type.

Definition at line 159 of file rosteritemdata.h.

◆ tag()

Tag* tag ( ) const
inline

Retruns a Tag representation of the roster item data.

Returns
A Tag representation.

Definition at line 199 of file rosteritemdata.h.

Member Data Documentation

◆ m_jid

GLOOX_DEPRECATED std::string m_jid
protected
Deprecated:
Will be removed for 1.1.

Definition at line 218 of file rosteritemdata.h.

◆ m_jidJID

JID m_jidJID
protected
Todo:
Rename to m_jid for 1.1.

Definition at line 219 of file rosteritemdata.h.


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