class ClientResource

A client contact's resource. More...

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

Public Types

Public Methods

Public Static Methods

Public Members


Detailed Description

This class holds data about a client account/contact resource

enum Status { Unknown = 0, Offline = 1, Connecting = 2, Online = 3, Busy = 4, Dnd = 5, Away = 6, Xa = 7, }

Status

Resource status

inline explicit  ClientResource (const char* id, const char* name = 0, bool audio = true)

ClientResource

Constructor

Parameters:
idThe resource's id
nameOptional display name. Defaults to the id's value if 0
audioTrue (default) if the resource has audio capability

const String&  toString ()

toString

[const virtual]

Get a string representation of this object

Returns: The account's id

Reimplemented from GenObject.

inline bool  online ()

online

[const]

Check if the resource is online

Returns: True if the resource is online

inline bool  offline ()

offline

[const]

Check if the resource is offline

Returns: True if the resource is offline

inline const char*  statusName ()

statusName

[const]

Retrieve resource status name

Returns: Resource status name

inline const char*  text ()

text

[const]

Retrieve resource status text or associated status display text

Returns: Resource status text

inline bool  setAudio (bool ok)

setAudio

Update resource audio capability

Parameters:
okThe new audio capability value

Returns: True if changed

inline bool  setFileTransfer (bool ok)

setFileTransfer

Update resource file transfer capability

Parameters:
okThe new file transfer value

Returns: True if changed

inline bool  setPriority (int prio)

setPriority

Update resource priority

Parameters:
prioResource priority

Returns: True if changed

inline bool  setStatus (int stat)

setStatus

Update resource status

Parameters:
statResource status

Returns: True if changed

inline bool  setStatusText (const String& text = String::empty())

setStatusText

Update resource status text

Parameters:
textResource status text

Returns: True if changed

inline const char*  statusDisplayText (int status, const char* defVal = 0)

statusDisplayText

[static]

Retrieve the status display text associated with a given resource status

Parameters:
statusThe status to find
defValText to return if none found

Returns: Status display text or the default value if not found

static const TokenDict s_statusName[]

s_statusName[]

String m_id

m_id

String m_name

m_name

bool m_audio

m_audio

bool m_fileTransfer

m_fileTransfer

int m_priority

m_priority

int m_status

m_status

String m_text

m_text


Generated by: paulc on bussard on Fri Dec 21 16:28:34 2012, using kdoc 2.0a54.