ClientAccountList Class Reference

A client account list. More...

#include <yatecbase.h>

Inheritance diagram for ClientAccountList:

String Mutex GenObject Lockable

List of all members.

Public Member Functions

 ClientAccountList (const char *name, ClientAccount *localContacts=0)
 ~ClientAccountList ()
ObjListaccounts ()
ClientAccountlocalContacts () const
bool isLocalContact (ClientContact *c) const
bool isLocalContact (const String &id) const
virtual ClientAccountfindAccount (const String &id, bool ref=false)
virtual ClientContactfindContactByUri (const String &account, const String &uri, bool ref=false)
virtual ClientContactfindContact (const String &account, const String &id, bool ref=false)
virtual ClientContactfindContact (const String &builtId, bool ref=false)
virtual ClientContactfindContactByInstance (const String &id, String *instance=0, bool ref=false)
virtual MucRoomfindRoom (const String &id, bool ref=false)
virtual MucRoomfindRoomByMember (const String &id, bool ref=false)
virtual ClientContactfindAnyContact (const String &id, bool ref=false)
virtual ClientAccountfindSingleRegAccount (const String *skipProto=0, bool ref=false)
virtual bool appendAccount (ClientAccount *account)
virtual void removeAccount (const String &id)

Protected Attributes

ObjList m_accounts


Detailed Description

A client account list.

This class holds an account list


Constructor & Destructor Documentation

ClientAccountList ( const char *  name,
ClientAccount localContacts = 0 
) [inline, explicit]

Constructor

Parameters:
name List's name used for debug purposes
localContacts Optional account owning locally stored contacts

Destructor


Member Function Documentation

ObjList& accounts (  )  [inline]

Get the accounts list

Returns:
The accounts list

ClientAccount* localContacts (  )  const [inline]

Retrieve the account owning locally stored contacts

Returns:
ClientAccount pointer or 0

bool isLocalContact ( ClientContact c  )  const

Check if a contact is locally stored

Parameters:
c The contact to check
Returns:
True if the contact owner is the account owning locally stored contacts

bool isLocalContact ( const String id  )  const [inline]

Check if a contact is locally stored

Parameters:
id Contact id to check
Returns:
True if the contact owner is the account owning locally stored contacts

virtual ClientAccount* findAccount ( const String id,
bool  ref = false 
) [virtual]

Find an account

Parameters:
id The account's id
ref True to get a referenced pointer
Returns:
ClientAccount pointer or 0 if not found

virtual ClientContact* findContactByUri ( const String account,
const String uri,
bool  ref = false 
) [virtual]

Find an account's contact by its URI (build an id from account and uri)

Parameters:
account The account's id
uri The contact's uri
ref True to get a referenced pointer
Returns:
ClientContact pointer or 0 if not found

virtual ClientContact* findContact ( const String account,
const String id,
bool  ref = false 
) [virtual]

Find an account's contact

Parameters:
account The account's id
id The contact's id
ref True to get a referenced pointer
Returns:
ClientContact pointer or 0 if not found

virtual ClientContact* findContact ( const String builtId,
bool  ref = false 
) [virtual]

Find an account's contact from a built id

Parameters:
builtId The string containign the account and the contact
ref True to get a referenced pointer
Returns:
ClientContact pointer or 0 if not found

virtual ClientContact* findContactByInstance ( const String id,
String instance = 0,
bool  ref = false 
) [virtual]

Find a contact an instance id

Parameters:
id The id
instance Optional pointer to String to be filled with instance id
ref True to get a referenced pointer
Returns:
ClientContact pointer or 0 if not found

virtual MucRoom* findRoom ( const String id,
bool  ref = false 
) [virtual]

Find a MUC room by its id

Parameters:
id Room id
ref True to obtain a referenced pointer
Returns:
MucRoom pointer or 0 if not found

virtual MucRoom* findRoomByMember ( const String id,
bool  ref = false 
) [virtual]

Find a MUC room by member id

Parameters:
id Room member id
ref True to obtain a referenced pointer
Returns:
MucRoom pointer or 0 if not found

virtual ClientContact* findAnyContact ( const String id,
bool  ref = false 
) [virtual]

Find any contact (regular or MUC room) by its id

Parameters:
id The id of the desired contact
ref True to obtain a referenced pointer
Returns:
ClientContact pointer (may be account's own contact) or 0 if not found

virtual ClientAccount* findSingleRegAccount ( const String skipProto = 0,
bool  ref = false 
) [virtual]

Check if there is a single registered account and return it

Parameters:
skipProto Optional account protocol to skip
ref True to get a referenced pointer
Returns:
ClientAccount pointer or 0 if not found

virtual bool appendAccount ( ClientAccount account  )  [virtual]

Append a new account. The account's reference counter is increased before

Parameters:
account The account to append
Returns:
True on succes, false if an account with the same id already exists

virtual void removeAccount ( const String id  )  [virtual]

Remove an account

Parameters:
id The account's id


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

Generated on Sat May 28 18:28:24 2011 for Yate by  doxygen 1.5.6