Yate
|
Direction flags. More...
#include <xmpputils.h>
Public Types | |
enum | Direction { None = 0x00, To = 0x01, From = 0x02, PendingIn = 0x10, PendingOut = 0x20, Both = 0x03, Pending = 0x30 } |
Public Member Functions | |
XMPPDirVal (int flags=None) | |
XMPPDirVal (const String &flags) | |
void | replace (int flag) |
void | replace (const String &flags) |
void | toString (String &buf, bool full) const |
void | toSubscription (String &buf) const |
void | set (int flag) |
void | reset (int flag) |
bool | test (int mask) const |
bool | to () const |
bool | from () const |
operator int () | |
Static Public Attributes | |
static const TokenDict | s_names [] |
Direction flags.
This class holds a direction flags (such as subscription states)
enum Direction |
Direction flags enumeration
XMPPDirVal | ( | int | flags = None | ) | [inline] |
Constructor
flags | Flag(s) to set |
XMPPDirVal | ( | const String & | flags | ) | [inline] |
Constructor
flags | Comma separated list of flags |
bool from | ( | ) | const [inline] |
Check if the 'From' flag is set
operator int | ( | ) | [inline] |
Cast operator
void replace | ( | int | flag | ) | [inline] |
Replace all flags
flag | The new value of the flags |
Replace all flags from a list
flags | Comma separated list of flags |
References XMPPUtils::decodeFlags().
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 test | ( | int | mask | ) | const [inline] |
Check if a given bit mask is set
mask | Bit mask to check |
bool to | ( | ) | const [inline] |
Check if the 'To' flag is set
Build a string representation of this object
buf | Destination string |
full | True to add all flags, false to ignore pending flags |
void toSubscription | ( | String & | buf | ) | const |
Build a subscription state string representation of this object
buf | Destination string |