#include <xmpputils.h>
Public Types | |
| enum | Direction { None = 0, To = 1, From = 2, Both = 3 } |
Public Member Functions | |
| XMPPDirVal (int flags=None) | |
| XMPPDirVal (const char *name) | |
| void | replace (int flag) |
| void | replace (const char *name) |
| void | set (int flag) |
| void | reset (int flag) |
| bool | flag (int mask) const |
| bool | to () const |
| bool | from () const |
| operator int () | |
Static Public Member Functions | |
| static const char * | lookup (int flag, const char *defVal="") |
| static int | lookup (const char *name, int defVal=None) |
Static Public Attributes | |
| static TokenDict | s_names [] |
This class holds a 4-state direction value (such as subscription states)
| XMPPDirVal | ( | int | flags = None |
) | [inline] |
Constructor
| flags | Flag(s) to set |
| XMPPDirVal | ( | const char * | name | ) | [inline] |
Constructor
| name | The name of the flag used to initialize this object |
References TelEngine::lookup().
| bool flag | ( | int | mask | ) | const [inline] |
Check if a given bit mask is set
| mask | Bit mask to check |
| bool from | ( | ) | const [inline] |
Check if the 'From' flag is set
| static int lookup | ( | const char * | name, | |
| int | defVal = None | |||
| ) | [inline, static] |
Get the value associated with a flag name
| name | The flag name | |
| defVal | Value to return if not found |
References TelEngine::lookup().
| static const char* lookup | ( | int | flag, | |
| const char * | defVal = "" | |||
| ) | [inline, static] |
Get the name of a flag
| flag | The flag | |
| defVal | Value to return if not found |
References TelEngine::lookup().
| operator int | ( | ) | [inline] |
Cast operator
| void replace | ( | const char * | name | ) | [inline] |
Replace all flags from a value's name
| name | The name of the flag used to replace this value |
References TelEngine::lookup().
| void replace | ( | int | flag | ) | [inline] |
Replace all flags
| flag | The new value of the flags |
| void reset | ( | int | flag | ) | [inline] |
Reset one or more flags
| flag | Flag(s) to reset |
| void set | ( | int | flag | ) | [inline] |
Set one or more flags
| flag | Flag(s) to set |
| bool to | ( | ) | const [inline] |
Check if the 'To' flag is set
1.5.7.1