XMPPUserRoster Class Reference

The roster of a local user. More...

#include <yatejabber.h>

Inheritance diagram for XMPPUserRoster:

RefObject Mutex GenObject

List of all members.

Public Member Functions

virtual ~XMPPUserRoster ()
const JabberIDjid () const
JBPresenceengine ()
JIDResourceListresources ()
XMPPUsergetUser (const JabberID &jid, bool add=false, bool *added=0)
bool removeUser (const JabberID &remote)
void cleanup ()
bool timeout (u_int64_t time)
XMLElementcreateDiscoInfoResult (const char *from, const char *to, const char *id)

Protected Member Functions

 XMPPUserRoster (JBPresence *engine, const char *node, const char *domain, JBEngine::Protocol proto=JBEngine::Component)

Friends

class JBPresence
class JBClientStream
class XMPPUser


Detailed Description

The roster of a local user.

This class holds the roster for a local user.


Constructor & Destructor Documentation

virtual ~XMPPUserRoster (  )  [virtual]

Destructor. Remove this roster from engine's queue.

XMPPUserRoster ( JBPresence engine,
const char *  node,
const char *  domain,
JBEngine::Protocol  proto = JBEngine::Component 
) [protected]

Constructor.

Parameters:
engine Pointer to the presence engine this user belongs to
node User's name
domain User's domain
proto Protocol. Used to create identity


Member Function Documentation

const JabberID& jid (  )  const [inline]

Get the local user's jid.

Returns:
The local user's jid.

JBPresence* engine (  )  [inline]

Get the presence engine this user belongs to.

Returns:
Pointer to the presence engine this user belongs to.

JIDResourceList& resources (  )  [inline]

Get the list of available resources belonging to the same user

Returns:
The list of available resources

XMPPUser* getUser ( const JabberID jid,
bool  add = false,
bool *  added = 0 
)

Get a remote user. This method is thread safe.

Parameters:
jid User's jid.
add True to add if not found.
added Optional flag to set if added a new user.
Returns:
Referenced pointer to the user or 0.

bool removeUser ( const JabberID remote  ) 

Remove a remote user. This method is thread safe.

Parameters:
remote The user to remove.
Returns:
False if no more users.

void cleanup (  )  [inline]

() Clear remote user list.

bool timeout ( u_int64_t  time  ) 

Check timeout. This method is thread safe.

Parameters:
time Current time.
Returns:
True to remove the roster.

XMLElement* createDiscoInfoResult ( const char *  from,
const char *  to,
const char *  id 
) [inline]

Create an iq result to respond to disco info. Add user's features and identity

Parameters:
from The from attribute
to The to attribute
id The id attribute
Returns:
XMLElement pointer

References XMPPUtils::createDiscoInfoRes().


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

Generated on Mon Aug 11 16:18:53 2008 for Yate by  doxygen 1.5.6