class ClientContact

A client contact. More...

Full nameTelEngine::ClientContact
Definition#include <yatecbase.h>
InheritsTelEngine::RefObject [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Static Methods

Public Members

Protected Methods

Protected Members


Detailed Description

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:
ownerThe contact's owner
idThe contact's id
nameOptional display name. Defaults to the id's value if 0
chatTrue 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:
ownerThe contact's owner
paramsThe list of parameters used to build this contact
chatTrue 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:
destDestination string

inline bool  isChatWnd (Window* wnd)

isChatWnd

Check if a window is this contact's chat

Parameters:
wndThe 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:
activeThe 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:
forceTrue to destroy the current one if any
nameThe 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:
groupThe 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:
groupGroup's name

Returns: False if the group already exists

bool  removeGroup (const String& group)

removeGroup

[virtual]

Remove a contact's group

Parameters:
groupGroup'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:
idThe id of the desired resource
refTrue 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:
refTrue 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:
idThe 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:
idThe 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:
wndThe 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:
destDestination string
accountAccount owning the contact
contactThe contact's id

inline void  splitContactId (const String& src, String& account, String& contact)

splitContactId

[static]

Split a contact id

Parameters:
srcSource string
accountAccount name
contactContact'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 Wed Oct 21 01:57:30 2009, using kdoc 2.0a54.