Yate
|
Direction flags. More...
#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 [] |
Direction flags.
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 |
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 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().
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().
operator int | ( | ) | [inline] |
Cast operator
void replace | ( | int | flag | ) | [inline] |
Replace all flags
flag | The new value of the flags |
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 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