Yate
XMPPFeatureList Class Reference

JID feature list. More...

#include <xmpputils.h>

Inheritance diagram for XMPPFeatureList:
ObjList GenObject

Public Member Functions

bool add (int xml, int feature, bool required=false)
 
bool add (int feature)
 
bool add (XMPPFeature *feature)
 
void reset ()
 
void add (XMPPFeatureList &list)
 
void fromStreamFeatures (XmlElement &xml)
 
void fromDiscoInfo (XmlElement &xml)
 
void remove (int feature)
 
XMPPFeatureget (int feature)
 
XMPPFeatureget (const String &feature)
 
XMPPFeatureSaslgetSasl ()
 
XMPPFeatureCompressgetCompress ()
 
XmlElement * buildStreamFeatures ()
 
XmlElement * buildDiscoInfo (const char *from, const char *to, const char *id, const char *node=0, const char *cap=0)
 
void add (XmlElement &xml)
 
void updateEntityCaps ()
 
- Public Member Functions inherited from ObjList
 ObjList ()
 
virtual ~ObjList ()
 
virtual void * getObject (const String &name) const
 
unsigned int length () const
 
unsigned int count () const
 
GenObjectget () const
 
GenObjectset (const GenObject *obj, bool delold=true)
 
ObjListnext () const
 
ObjListlast () const
 
ObjListskipNull () const
 
ObjListskipNext () const
 
GenObjectat (int index) const
 
ObjListoperator+ (int index) const
 
GenObjectoperator[] (signed int index) const
 
GenObjectoperator[] (unsigned int index) const
 
GenObjectoperator[] (const String &str) const
 
ObjListfind (const GenObject *obj) const
 
ObjListfind (const String &str) const
 
int index (const GenObject *obj) const
 
int index (const String &str) const
 
ObjListinsert (const GenObject *obj, bool compact=true)
 
ObjListappend (const GenObject *obj, bool compact=true)
 
ObjListsetUnique (const GenObject *obj, bool compact=true)
 
GenObjectremove (bool delobj=true)
 
GenObjectremove (GenObject *obj, bool delobj=true)
 
GenObjectremove (const String &str, bool delobj=true)
 
void clear ()
 
void compact ()
 
bool autoDelete ()
 
void setDelete (bool autodelete)
 
void sort (int(*callbackCompare)(GenObject *obj1, GenObject *obj2, void *context), void *context=0)
 
- Public Member Functions inherited from GenObject
 GenObject ()
 
virtual ~GenObject ()
 
virtual bool alive () const
 
virtual void destruct ()
 
virtual const StringtoString () const
 
virtual const StringtraceId () const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 

Public Attributes

JIDIdentityList m_identities
 
String m_entityCapsHash
 

Additional Inherited Members

- Static Public Member Functions inherited from ObjList
static const ObjListempty ()
 
- 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 NamedCountergetObjCounter (const String &name, bool create=true)
 
static ObjListgetObjCounters ()
 

Detailed Description

JID feature list.

This class holds a list of JID features

Member Function Documentation

◆ add() [1/5]

bool add ( int feature)
inline

Add a feature to the list

Parameters
featureThe feature to add as enumeration
Returns
False if the given feature already exists

References ObjList::append(), and get().

◆ add() [2/5]

bool add ( int xml,
int feature,
bool required = false )
inline

Add a feature to the list

Parameters
xmlXML element tag as enumeration
featureThe feature to add as enumeration
requiredTrue if this feature is required
Returns
False if the given feature already exists

References ObjList::append(), and get().

◆ add() [3/5]

void add ( XmlElement & xml)

Add this list to an xml element

Parameters
xmlDestination element

◆ add() [4/5]

bool add ( XMPPFeature * feature)
inline

Add a feature to the list. Destroy the received parameter if already in the list

Parameters
featureThe feature to add
Returns
False if the given feature already exists

References ObjList::append(), and get().

◆ add() [5/5]

void add ( XMPPFeatureList & list)

Move a list of features to this list. Don't check duplicates

Parameters
listThe source list

◆ buildDiscoInfo()

XmlElement * buildDiscoInfo ( const char * from,
const char * to,
const char * id,
const char * node = 0,
const char * cap = 0 )

Build an iq query disco info result from this list

Parameters
fromThe 'from' attribute
toThe 'to' attribute
idThe 'id' attribute
nodeOptional 'node' attribute
capOptional capability to be set as 'node' suffix
Returns
XmlElement pointer

◆ buildStreamFeatures()

XmlElement * buildStreamFeatures ( )

Build stream features from this list

Returns
XmlElement pointer

◆ fromDiscoInfo()

void fromDiscoInfo ( XmlElement & xml)

Re-build this list from disco info responses

Parameters
xmlThe element to parse

◆ fromStreamFeatures()

void fromStreamFeatures ( XmlElement & xml)

Re-build this list from stream features

Parameters
xmlThe features element to parse

◆ get() [1/2]

XMPPFeature * get ( const String & feature)
inline

Get a feature from the list

Parameters
featureThe feature name to find
Returns
Pointer to the feature or 0 if it doesn't exists

References ObjList::find(), ObjList::get(), and ObjList::ObjList().

◆ get() [2/2]

XMPPFeature * get ( int feature)

Get a feature from the list

Parameters
featureThe feature to get
Returns
Pointer to the feature or 0 if it doesn't exists

Referenced by add(), add(), add(), getCompress(), getSasl(), and remove().

◆ getCompress()

XMPPFeatureCompress * getCompress ( )
inline

Get a XMPPFeatureCompress feature from list

Returns
XMPPFeatureCompress pointer or 0 if not found

References get().

◆ getSasl()

XMPPFeatureSasl * getSasl ( )
inline

Get a XMPPFeatureSasl feature from list

Returns
XMPPFeatureSasl pointer or 0 if not found

References get().

◆ remove()

void remove ( int feature)
inline

Remove a feature from the list

Parameters
featureThe feature to remove

References get(), and ObjList::remove().

◆ reset()

void reset ( )
inline

Clear data

References ObjList::clear().

◆ updateEntityCaps()

void updateEntityCaps ( )

Update the entity capabilities hash


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