|
Yate
|
A client contact's resource. More...
#include <yatecbase.h>
Public Types | |
| enum | Status { Unknown = 0, Offline = 1, Connecting = 2, Online = 3, Busy = 4, Dnd = 5, Away = 6, Xa = 7 } |
| enum | Capability { CapAudio = 0x00000001, CapFileTransfer = 0x00000002, CapFileInfo = 0x00000004, CapRsm = 0x00000008 } |
Public Member Functions | |
| ClientResource (const char *id, const char *name=0, bool audio=true) | |
| virtual const String & | toString () const |
| bool | online () const |
| bool | offline () const |
| const char * | statusName () const |
| const char * | text () const |
| Flags32 & | caps () |
| bool | setAudio (bool ok) |
| bool | setFileTransfer (bool ok) |
| bool | setPriority (int prio) |
| bool | setStatus (int stat) |
| bool | setStatusText (const String &text=String::empty()) |
Public Member Functions inherited from RefObject | |
| RefObject () | |
| virtual | ~RefObject () |
| virtual void * | getObject (const String &name) const |
| virtual bool | alive () const |
| bool | ref () |
| bool | deref () |
| int | refcount () const |
| virtual void | destruct () |
Public Member Functions inherited from GenObject | |
| GenObject () | |
| virtual | ~GenObject () |
| virtual const String & | traceId () const |
| NamedCounter * | getObjCounter () const |
| NamedCounter * | setObjCounter (NamedCounter *counter) |
Static Public Member Functions | |
| static const char * | statusDisplayText (int status, const char *defVal=0) |
Static Public Member Functions inherited from RefObject | |
| static bool | alive (const RefObject *obj) |
| static bool | efficientIncDec () |
Static Public Member Functions inherited from GenObject | |
| static void * | getObject (const String &name, const GenObject *obj) |
| static bool | getObjCounting () |
| static void | setObjCounting (bool enable) |
| static NamedCounter * | getObjCounter (const String &name, bool create=true) |
| static ObjList & | getObjCounters () |
Public Attributes | |
| String | m_id |
| String | m_name |
| Flags32 | m_caps |
| int | m_priority |
| int | m_status |
| String | m_text |
Static Public Attributes | |
| static const TokenDict | s_statusName [] |
| static const TokenDict | s_resNotifyCaps [] |
Additional Inherited Members | |
Protected Member Functions inherited from RefObject | |
| virtual void | zeroRefs () |
| bool | resurrect () |
| virtual void | destroyed () |
A client contact's resource.
This class holds data about a client account/contact resource
| enum Capability |
Resource capabilities
| enum Status |
Resource status
|
inlineexplicit |
Constructor
| id | The resource's id |
| name | Optional display name. Defaults to the id's value if 0 |
| audio | True (default) if the resource has audio capability |
|
inline |
Retrieve resource capabilities
|
inline |
Check if the resource is offline
|
inline |
Check if the resource is online
Referenced by MucRoom::available().
|
inline |
Update resource audio capability
| ok | The new audio capability value |
References Flags32::changeFlagCheck().
|
inline |
Update resource file transfer capability
| ok | The new file transfer value |
References Flags32::changeFlagCheck().
|
inline |
Update resource priority
| prio | Resource priority |
|
inline |
Update resource status
| stat | Resource status |
|
inline |
Update resource status text
| text | Resource status text |
References ClientResource::text().
|
inlinestatic |
Retrieve the status display text associated with a given resource status
| status | The status to find |
| defVal | Text to return if none found |
References TelEngine::lookup(), and ClientResource::s_statusName.
Referenced by ClientResource::text().
|
inline |
Retrieve resource status name
References TelEngine::lookup(), and ClientResource::s_statusName.
|
inline |
Retrieve resource status text or associated status display text
References String::c_str(), and ClientResource::statusDisplayText().
Referenced by ClientResource::setStatusText().
|
inlinevirtual |
Get a string representation of this object
Reimplemented from GenObject.
Referenced by MucRoom::ownMember().
|
static |
resource.notify capability names
|
static |
Resource status names
Referenced by ClientResource::statusDisplayText(), and ClientResource::statusName().
1.8.8