Yate
Public Types | Public Member Functions | Static Public Attributes
XMPPDirVal Class Reference

Direction flags. More...

#include <xmpputils.h>

List of all members.

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 []

Detailed Description

Direction flags.

This class holds a direction flags (such as subscription states)


Member Enumeration Documentation

enum Direction

Direction flags enumeration


Constructor & Destructor Documentation

XMPPDirVal ( int  flags = None) [inline]

Constructor

Parameters:
flagsFlag(s) to set
XMPPDirVal ( const String flags) [inline]

Constructor

Parameters:
flagsComma separated list of flags

Member Function Documentation

bool from ( ) const [inline]

Check if the 'From' flag is set

Returns:
True if the 'From' flag is set
operator int ( ) [inline]

Cast operator

void replace ( int  flag) [inline]

Replace all flags

Parameters:
flagThe new value of the flags
void replace ( const String flags) [inline]

Replace all flags from a list

Parameters:
flagsComma separated list of flags

References XMPPUtils::decodeFlags().

void reset ( int  flag) [inline]

Reset one or more flags

Parameters:
flagFlag(s) to reset
void set ( int  flag) [inline]

Set one or more flags

Parameters:
flagFlag(s) to set
bool test ( int  mask) const [inline]

Check if a given bit mask is set

Parameters:
maskBit mask to check
Returns:
True if the given bit mask is set
bool to ( ) const [inline]

Check if the 'To' flag is set

Returns:
True if the 'To' flag is set
void toString ( String buf,
bool  full 
) const

Build a string representation of this object

Parameters:
bufDestination string
fullTrue to add all flags, false to ignore pending flags
void toSubscription ( String buf) const

Build a subscription state string representation of this object

Parameters:
bufDestination string

Member Data Documentation

const TokenDict s_names[] [static]

Keep the flag names


The documentation for this class was generated from the following file: