|
|
A client contact The contact is using the owner's mutex to lock it's operations
ClientContact (ClientAccount* owner, const char* id, const char* name = 0,
bool chat = false)
| ClientContact |
Constructor. Append itself to the owner's list
Parameters:
owner | The contact's owner |
id | The contact's id |
name | Optional display name. Defaults to the id's value if 0 |
chat | True to create the chat window |
ClientContact (ClientAccount* owner, NamedList& params, bool chat)
| ClientContact |
Constructor. Build a contact from a list of parameters. . Append itself to the owner's list
Parameters:
owner | The contact's owner |
params | The list of parameters used to build this contact |
chat | True to create the chat window |
inline ClientAccount* account ()
| account |
Get this contact's account
Returns: This contact's account
inline const URI& uri ()
| uri |
[const]
Get this contact's URI
Returns: This contact's URI
inline ObjList& resources ()
| resources |
Get the resource list of this contact
Returns: The resource list of this contact
inline ObjList& groups ()
| groups |
Get the group list of this contact
Returns: The group list of this contact
const String& toString ()
| toString |
[const virtual]
Get a string representation of this object
Returns: The contact's id
Reimplemented from GenObject.
inline void buildContactId (String& dest)
| buildContactId |
Build a contact id to be used in UI
Parameters:
dest | Destination string |
inline bool isChatWnd (Window* wnd)
| isChatWnd |
Check if a window is this contact's chat
Parameters:
wnd | The window to check |
Returns: True if the given window is this contact's chat
inline bool hasChat ()
| hasChat |
Check if this contact has a chat window
Returns: True if this contact has a chat window
inline bool isChatVisible ()
| isChatVisible |
Check if this contact's chat window is visible
Returns: True if this contact's chat window is visible
inline bool showChat (bool active)
| showChat |
Show or hide this contact's chat window
Parameters:
active | The chat window's visibility flag |
Returns: True on success
inline Window* getChatWnd ()
| getChatWnd |
[const]
Get the chat window
Returns: Valid Window pointer or 0
void createChatWindow (bool force = false, const char* name = "chat")
| createChatWindow |
Create the chat window
Parameters:
force | True to destroy the current one if any |
name | The window's name |
inline void destroyChatWindow ()
| destroyChatWindow |
Close (desrtoy) the chat window
String* findGroup (const String& group)
| findGroup |
[virtual]
Find a group this contact might belong to
Parameters:
group | The name of the group to find |
Returns: String pointer or 0 if not found
bool appendGroup (const String& group)
| appendGroup |
[virtual]
Append a group to this contact
Parameters:
group | Group's name |
Returns: False if the group already exists
bool removeGroup (const String& group)
| removeGroup |
[virtual]
Remove a contact's group
Parameters:
group | Group's name |
Returns: False if the group was not found
ClientResource* findResource (const String& id, bool ref = false)
| findResource |
[virtual]
Find a resource having a given id
Parameters:
id | The id of the desired resource |
ref | True to obtain a referenced pointer |
Returns: ClientResource pointer or 0 if not found
ClientResource* findAudioResource (bool ref = false)
| findAudioResource |
[virtual]
Get the first resource with audio capability
Parameters:
ref | True to obtain a referenced pointer |
Returns: ClientResource pointer or 0 if not found
ClientResource* appendResource (const String& id)
| appendResource |
[virtual]
Append a resource having a given id
Parameters:
id | The id of the desired resource |
Returns: ClientResource pointer or 0 if a resource with the given name already exists
bool removeResource (const String& id)
| removeResource |
[virtual]
Remove a resource having a given id
Parameters:
id | The id of the desired resource |
Returns: True if the resource was removed
inline bool isChatWndPrefix (Window* wnd)
| isChatWndPrefix |
[static]
Check if a window is a chat one
Parameters:
wnd | The window to check |
Returns: True if the given window's name starts with the chat refix
inline void buildContactId (String& dest, const String& account,
const String& contact)
| buildContactId |
[static]
Build a contact id to be used in UI
Parameters:
dest | Destination string |
account | Account owning the contact |
contact | The contact's id |
inline void splitContactId (const String& src, String& account,
String& contact)
| splitContactId |
[static]
Split a contact id
Parameters:
src | Source string |
account | Account name |
contact | Contact's name |
static String s_chatPrefix | s_chatPrefix |
String m_name | m_name |
String m_subscription | m_subscription |
void destroyed ()
| destroyed |
[protected virtual]
Reimplemented from RefObject.
ClientAccount* m_owner | m_owner |
[protected]
String m_id | m_id |
[protected]
URI m_uri | m_uri |
[protected]
ObjList m_resources | m_resources |
[protected]
ObjList m_groups | m_groups |
[protected]
Generated by: paulc on bussard on Mon Mar 8 12:18:15 2010, using kdoc 2.0a54. |