ClientAccountList Class Reference
A client account list.
More...
#include <yatecbase.h>
List of all members.
|
Public Member Functions |
| ClientAccountList (const char *name, ClientAccount *localContacts=0) |
| ~ClientAccountList () |
ObjList & | accounts () |
ClientAccount * | localContacts () const |
bool | isLocalContact (ClientContact *c) const |
bool | isLocalContact (const String &id) const |
virtual ClientAccount * | findAccount (const String &id, bool ref=false) |
virtual ClientContact * | findContactByUri (const String &account, const String &uri, bool ref=false) |
virtual ClientContact * | findContact (const String &account, const String &id, bool ref=false) |
virtual ClientContact * | findContact (const String &builtId, bool ref=false) |
virtual ClientContact * | findContactByInstance (const String &id, String *instance=0, bool ref=false) |
virtual MucRoom * | findRoom (const String &id, bool ref=false) |
virtual MucRoom * | findRoomByMember (const String &id, bool ref=false) |
virtual ClientContact * | findAnyContact (const String &id, bool ref=false) |
virtual ClientAccount * | findSingleRegAccount (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
Constructor
- Parameters:
-
| name | List's name used for debug purposes |
| localContacts | Optional account owning locally stored contacts |
Member Function Documentation
Get the accounts list
- Returns:
- The accounts list
Retrieve the account owning locally stored contacts
- Returns:
- ClientAccount pointer or 0
Check if a contact is locally stored
- Parameters:
-
- 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:
-
- Returns:
- True if the contact owner is the account owning locally stored contacts
Find an account
- Parameters:
-
| id | The account's id |
| ref | True to get a referenced pointer |
- Returns:
- ClientAccount pointer or 0 if not found
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
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
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
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
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
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:
-
The documentation for this class was generated from the following file: