Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members  

jabberoo::Roster::Item Class Reference

An individual Roster Item. More...

#include <roster.hh>

List of all members.

Public Member Functions

 Item (const judo::Element &t)
 Create a Roster Item from a judo::Element.

 Item (Roster &r, const judo::Element &t)
 Create a Roster Item for a particular Roster, given a judo::Element.

 Item (const std::string &jid, const std::string &nickname)
 Create a Roster Item based on a JabberID and a nickname.

 ~Item ()
 Roster Item destructor.

void addToGroup (const std::string &group)
 Add this Roster Item to a group.

void delFromGroup (const std::string &group)
 Delete this Roster Item from a group.

void clearGroups ()
 Remove this Roster Item from all groups it is in.

void setNickname (const std::string &nickname)
 Set the nickname for this Roster Item.

void setJID (const std::string &jid)
 Set the JabberID for this Roster Item.

bool isAvailable () const
 Whether or not this Roster Item is online.

std::string getNickname () const
 Get the nickname for this Roster Item.

std::string getJID () const
 Get the JabberID for this Roster Item.

Subscription getSubsType () const
 Get the Subscription to this Roster Item.

bool isPending () const
 Whether or not this Roster Item is pending a subscription approval.

iterator begin () const
 Get the first group this item belongs to.

iterator end () const
 Get the last group this item belongs to.

bool empty () const
 Whether this item has any groups.


Detailed Description

An individual Roster Item.

Definition at line 74 of file roster.hh.


Constructor & Destructor Documentation

jabberoo::Roster::Item::Item const judo::Element   t
 

Create a Roster Item from a judo::Element.

Parameters:
t A judo::Element.
See also:
judo::Element

Definition at line 318 of file jabberoo-roster.cpp.

References jabberoo::Roster::update().

jabberoo::Roster::Item::Item Roster   r,
const judo::Element   t
 

Create a Roster Item for a particular Roster, given a judo::Element.

Parameters:
r A Roster.
t A judo::Element.
See also:
Roster

judo::Element

Definition at line 324 of file jabberoo-roster.cpp.

References jabberoo::Roster::update().

jabberoo::Roster::Item::Item const std::string &    jid,
const std::string &    nickname
 

Create a Roster Item based on a JabberID and a nickname.

Parameters:
jid The JabberID.
nickname The nickname.

Definition at line 330 of file jabberoo-roster.cpp.

jabberoo::Roster::Item::~Item  
 

Roster Item destructor.

Definition at line 334 of file jabberoo-roster.cpp.


Member Function Documentation

void jabberoo::Roster::Item::addToGroup const std::string &    group
 

Add this Roster Item to a group.

Roster Items can be in multiple groups.

Parameters:
group The name of the group.

Definition at line 337 of file jabberoo-roster.cpp.

iterator jabberoo::Roster::Item::begin   const [inline]
 

Get the first group this item belongs to.

Returns:
An iterator to the first group.

Definition at line 162 of file roster.hh.

Referenced by jabberoo::Roster::update().

void jabberoo::Roster::Item::clearGroups  
 

Remove this Roster Item from all groups it is in.

Definition at line 347 of file jabberoo-roster.cpp.

void jabberoo::Roster::Item::delFromGroup const std::string &    group
 

Delete this Roster Item from a group.

Roster Items can be in multiple groups.

Parameters:
group The name of the group.

Definition at line 342 of file jabberoo-roster.cpp.

bool jabberoo::Roster::Item::empty   const [inline]
 

Whether this item has any groups.

Returns:
False if this item belongs to any groups.

Definition at line 172 of file roster.hh.

iterator jabberoo::Roster::Item::end   const [inline]
 

Get the last group this item belongs to.

Returns:
An iterator to the end group.

Definition at line 167 of file roster.hh.

Referenced by jabberoo::Roster::update().

std::string jabberoo::Roster::Item::getJID   const
 

Get the JabberID for this Roster Item.

Definition at line 444 of file jabberoo-roster.cpp.

Referenced by jabberoo::Roster::update().

std::string jabberoo::Roster::Item::getNickname   const
 

Get the nickname for this Roster Item.

Definition at line 434 of file jabberoo-roster.cpp.

Referenced by jabberoo::Roster::update().

Roster::Subscription jabberoo::Roster::Item::getSubsType   const
 

Get the Subscription to this Roster Item.

See also:
Subscription

Definition at line 454 of file jabberoo-roster.cpp.

bool jabberoo::Roster::Item::isAvailable   const
 

Whether or not this Roster Item is online.

Definition at line 429 of file jabberoo-roster.cpp.

bool jabberoo::Roster::Item::isPending   const
 

Whether or not this Roster Item is pending a subscription approval.

Definition at line 459 of file jabberoo-roster.cpp.

void jabberoo::Roster::Item::setJID const std::string &    jid
 

Set the JabberID for this Roster Item.

This will NOT modify an existing Roster Item. By changing the JabberID, you are essentially creating a new Roster Item.

Parameters:
jid The JabberID.

Definition at line 449 of file jabberoo-roster.cpp.

void jabberoo::Roster::Item::setNickname const std::string &    nickname
 

Set the nickname for this Roster Item.

Parameters:
nickname The nickname.

Definition at line 439 of file jabberoo-roster.cpp.


The documentation for this class was generated from the following files:
Generated on Thu Jul 24 13:31:54 2003 for jabberoo by doxygen1.3-rc3