class ClientAccountList

A client account list. More...

Full nameTelEngine::ClientAccountList
Definition#include <yatecbase.h>
InheritsTelEngine::Mutex [public ], TelEngine::String [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Members


Detailed Description

This class holds an account list

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

ClientAccountList

Constructor

Parameters:
nameList's name used for debug purposes
localContactsOptional account owning locally stored contacts

 ~ClientAccountList ()

~ClientAccountList

Destructor

inline ObjList&  accounts ()

accounts

Get the accounts list

Returns: The accounts list

inline ClientAccount*  localContacts ()

localContacts

[const]

Retrieve the account owning locally stored contacts

Returns: ClientAccount pointer or 0

bool  isLocalContact (ClientContact* c)

isLocalContact

[const]

Check if a contact is locally stored

Parameters:
cThe contact to check

Returns: True if the contact owner is the account owning locally stored contacts

inline bool  isLocalContact (const String& id)

isLocalContact

[const]

Check if a contact is locally stored

Parameters:
idContact id to check

Returns: True if the contact owner is the account owning locally stored contacts

ClientAccount*  findAccount (const String& id, bool ref = false)

findAccount

[virtual]

Find an account

Parameters:
idThe account's id
refTrue to get a referenced pointer

Returns: ClientAccount pointer or 0 if not found

ClientContact*  findContactByUri (const String& account, const String& uri, bool ref = false)

findContactByUri

[virtual]

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

Parameters:
accountThe account's id
uriThe contact's uri
refTrue to get a referenced pointer

Returns: ClientContact pointer or 0 if not found

ClientContact*  findContact (const String& account, const String& id, bool ref = false)

findContact

[virtual]

Find an account's contact

Parameters:
accountThe account's id
idThe contact's id
refTrue to get a referenced pointer

Returns: ClientContact pointer or 0 if not found

ClientContact*  findContact (const String& builtId, bool ref = false)

findContact

[virtual]

Find an account's contact from a built id

Parameters:
builtIdThe string containign the account and the contact
refTrue to get a referenced pointer

Returns: ClientContact pointer or 0 if not found

ClientContact*  findContactByInstance (const String& id, String* instance = 0, bool ref = false)

findContactByInstance

[virtual]

Find a contact an instance id

Parameters:
idThe id
instanceOptional pointer to String to be filled with instance id
refTrue to get a referenced pointer

Returns: ClientContact pointer or 0 if not found

MucRoom*  findRoom (const String& id, bool ref = false)

findRoom

[virtual]

Find a MUC room by its id

Parameters:
idRoom id
refTrue to obtain a referenced pointer

Returns: MucRoom pointer or 0 if not found

MucRoom*  findRoomByMember (const String& id, bool ref = false)

findRoomByMember

[virtual]

Find a MUC room by member id

Parameters:
idRoom member id
refTrue to obtain a referenced pointer

Returns: MucRoom pointer or 0 if not found

ClientContact*  findAnyContact (const String& id, bool ref = false)

findAnyContact

[virtual]

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

Parameters:
idThe id of the desired contact
refTrue to obtain a referenced pointer

Returns: ClientContact pointer (may be account's own contact) or 0 if not found

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

findSingleRegAccount

[virtual]

Check if there is a single registered account and return it

Parameters:
skipProtoOptional account protocol to skip
refTrue to get a referenced pointer

Returns: ClientAccount pointer or 0 if not found

bool  appendAccount (ClientAccount* account)

appendAccount

[virtual]

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

Parameters:
accountThe account to append

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

void  removeAccount (const String& id)

removeAccount

[virtual]

Remove an account

Parameters:
idThe account's id

ObjList m_accounts

m_accounts

[protected]


Generated by: paulc on bussard on Fri Dec 21 16:28:34 2012, using kdoc 2.0a54.