# class XMPPFeature | A feature. More...
Full name | `TelEngine::XMPPFeature`
Definition | `#include <libs/yjabber/xmpputils.h>`
Inherits | TelEngine::String [public ]
Inherited by | XMPPFeatureCompress, XMPPFeatureSasl
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- inline XMPPFeature (int xml, int feature, bool required = false)
- inline XMPPFeature (int xml, const char* feature, bool required = false)
- inline XMPPFeature (int feature)
- inline XMPPFeature (const char* feature)
- virtual ~XMPPFeature ()
- inline bool required () const
- virtual XmlElement* build (bool addReq = true)
- virtual XmlElement* buildFeature ()
- void addReqChild (XmlElement& xml)

#### Public Static Methods

- static XMPPFeature* fromStreamFeature (XmlElement& xml)

## Detailed Description

This class holds an XMPP feature

inline XMPPFeature (int xml, int feature, bool required = false) | ### XMPPFeature

Constructor

Parameters:

xml | XML element tag as enumeration
feature | The feature (namespace) index
required | True if this feature is required

inline XMPPFeature (int xml, const char* feature, bool required = false) | ### XMPPFeature

Constructor

Parameters:

xml | XML element tag as enumeration
feature | The feature name
required | True if this feature is required

inline XMPPFeature (int feature) | ### XMPPFeature

Constructor. Build from feature index

Parameters:

feature | The feature

inline XMPPFeature (const char* feature) | ### XMPPFeature

Constructor. Build from feature name

Parameters:

feature | The feature

~XMPPFeature () | ### ~XMPPFeature

[virtual]

Destructor

inline bool required () | ### required

[const]

Check if this feature is a required one

Returns: True if this feature is a required one

XmlElement* build (bool addReq = true) | ### build

[virtual]

Build an xml element from this feature

Parameters:

addReq | True to add the required/optional child

Returns: XmlElement pointer or 0

XmlElement* buildFeature () | ### buildFeature

[virtual]

Build a feature element from this one

Returns: XmlElement pointer

void addReqChild (XmlElement& xml) | ### addReqChild

Add a required/optional child to an element

Parameters:

xml | Destination element

XMPPFeature* fromStreamFeature (XmlElement& xml) | ### fromStreamFeature

[static]

Build a feature from a stream:features child

Parameters:

xml | The feature element to parse

Returns: XMPPFeature pointer or 0 if unknown

Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.