class ClientAccount


Full nameTelEngine::ClientAccount
Definition#include <yatecbase.h>
InheritsTelEngine::Mutex [public ], TelEngine::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

 ClientAccount (const char* proto, const char* user, const char* host, bool startup)

ClientAccount

Constructor

Parameters:
protoThe account's protocol
userThe account's username
hostThe account's host
startupTrue if the account should login at startup

 ClientAccount (const NamedList& params)

ClientAccount

Constructor. Build an account from a list of parameters

Parameters:
paramsThe list of parameters used to build this account

inline const URI&  uri ()

uri

[const]

Get this account's URI

Returns: This account's URI

inline const URI&  id ()

id

[const]

Get this account's id

Returns: This account's id

inline ObjList&  contacts ()

contacts

Get this account's contacts. The caller should lock the account while browsing the list

Returns: This account's contacts list

const String&  toString ()

toString

[const virtual]

Get a string representation of this object

Returns: The account's compare id

Reimplemented from GenObject.

ClientResource*  resource (bool ref = false)

resource

Get this account's resource

Returns: ClientResource pointer or 0

void  setResource (ClientResource* res = 0)

setResource

Set/reset this account's resource

Parameters:
resThe new account's resource

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

findContact

[virtual]

Find a contact by its id

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

Returns: ClientContact pointer or 0 if not found

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

findContact

[virtual]

Find a contact having a given id and resource

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

Returns: ClientContact pointer or 0 if not found

ClientContact*  appendContact (const String& id, const char* name)

appendContact

[virtual]

Build a contact and append it to the list

Parameters:
idThe contact's id
nameThe contact's name

Returns: ClientContact pointer or 0 if a contact with the given id already exists

ClientContact*  appendContact (const NamedList& params)

appendContact

[virtual]

Build a contact and append it to the list

Parameters:
paramsContact parameters

Returns: ClientContact pointer or 0 if a contact with the same id already exists

ClientContact*  removeContact (const String& id, bool delObj = true)

removeContact

[virtual]

Remove a contact from list. Reset contact's owner

Parameters:
idThe contact's id
delObjTrue to delete the object if found

Returns: ClientContact pointer if found and not deleted or 0

Message*  userlogin (bool login, const char* msg = "user.login")

userlogin

[virtual]

Build a login/logout message from account's data

Parameters:
loginTrue to login, false to logout
msgOptional message name. Default to 'user.login'

Returns: A valid Message pointer

void  buildAccountId (URI& dest, const char* proto, const char* user, const char* host)

buildAccountId

[static]

Build an account id

Parameters:
destDestination URI
protoThe account's protocol
userThe account's username
hostThe account's host

String m_password

m_password

String m_server

m_server

int m_port

m_port

String m_options

m_options

bool m_startup

m_startup

String m_outbound

m_outbound

int m_expires

m_expires

bool m_connected

m_connected

void  destroyed ()

destroyed

[protected virtual]

Reimplemented from RefObject.

void  appendContact (ClientContact* contact)

appendContact

[protected virtual]

inline void  setIdUri (const char* proto, const char* user, const char* host)

setIdUri

[protected]

URI m_id

m_id

[protected]

URI m_uri

m_uri

[protected]

ClientResource* m_resource

m_resource

[protected]

ObjList m_contacts

m_contacts

[protected]


Generated by: paulc on bussard on Mon Mar 8 12:18:15 2010, using kdoc 2.0a54.