#include <disco.h>
An abstraction of a Disco Info element (from Service Discovery, XEP-0030) as a StanzaExtension.
- Author
- Jakob Schröter js@ca.nosp@m.maya.nosp@m..net
- Since
- 1.0
Definition at line 65 of file disco.h.
◆ clone()
◆ features()
Returns the entity's supported features.
- Returns
- A list of supported features/namespaces.
Definition at line 80 of file disco.h.
◆ filterString()
const std::string & filterString |
( |
| ) |
const |
|
virtual |
Returns an XPath expression that describes a path to child elements of a stanza that an extension handles.
- Returns
- The extension's filter string.
Implements StanzaExtension.
Definition at line 129 of file disco.cpp.
◆ form()
Returns an optionally included data form. This is used by e.g. MUC (XEP-0045).
- Returns
- An optional data form included in the disco::info. May be 0.
Definition at line 99 of file disco.h.
◆ hasFeature()
bool hasFeature |
( |
const std::string & |
feature | ) |
const |
Use this function to check if the entity the Info came from supports agiven feature.
- Parameters
-
feature | The feature to check for. |
- Returns
- True if the entity announces support for the feature, false otherwise.
Definition at line 121 of file disco.cpp.
◆ identities()
Returns the entity's identities.
- Returns
- A list of pointers to Identity objects.
Definition at line 93 of file disco.h.
◆ newInstance()
Returns a new Instance of the derived type. Usually, for a derived class FooExtension, the implementation of this function looks like:
{
return new FooExtension(
tag );
}
virtual Tag * tag() const
StanzaExtension(int type)
- Returns
- The derived extension's new instance.
Implements StanzaExtension.
Definition at line 114 of file disco.h.
◆ node()
const std::string& node |
( |
| ) |
const |
|
inline |
Returns the queried node identifier, if any.
- Returns
- The node identifier. May be empty.
Definition at line 74 of file disco.h.
◆ setForm()
Adds an optional DataForm, e.g. for XEP-0232. Only one form can be added at this point.
- Parameters
-
form | An optional DataForm to include in the Info reply. The form will be owned by and deleted on destruction of the Info object. |
- Note
- If called more than once the previously set form will be deleted.
Definition at line 115 of file disco.cpp.
◆ tag()
The documentation for this class was generated from the following files: