|
|
This class holds an account list
inline explicit ClientAccountList (const char* name, ClientAccount* localContacts = 0)
| ClientAccountList |
Constructor
Parameters:
name | List's name used for debug purposes |
localContacts | Optional 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:
c | The 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:
id | Contact 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:
id | The account's id |
ref | True 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:
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
ClientContact* findContact (const String& account, const String& id, bool ref = false)
| findContact |
[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
ClientContact* findContact (const String& builtId, bool ref = false)
| findContact |
[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
ClientContact* findContactByInstance (const String& id, String* instance = 0,
bool ref = false)
| findContactByInstance |
[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
MucRoom* findRoom (const String& id, bool ref = false)
| findRoom |
[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
MucRoom* findRoomByMember (const String& id, bool ref = false)
| findRoomByMember |
[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
ClientContact* findAnyContact (const String& id, bool ref = false)
| findAnyContact |
[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
ClientAccount* findSingleRegAccount (const String* skipProto = 0,
bool ref = false)
| findSingleRegAccount |
[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
bool appendAccount (ClientAccount* account)
| appendAccount |
[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
void removeAccount (const String& id)
| removeAccount |
[virtual]
Remove an account
Parameters:
id | The 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. |