gloox  1.0.20
Public Member Functions | List of all members
Disco::Info Class Reference

#include <disco.h>

Inheritance diagram for Disco::Info:
Inheritance graph

Public Member Functions

const std::string & node () const
const StringListfeatures () const
bool hasFeature (const std::string &feature) const
const IdentityListidentities () const
const DataFormform () const
void setForm (DataForm *form)
virtual const std::string & filterString () const
virtual StanzaExtensionnewInstance (const Tag *tag) const
virtual StanzaExtensionclone () const
virtual Tagtag () const
- Public Member Functions inherited from StanzaExtension
 StanzaExtension (int type)
virtual ~StanzaExtension ()
virtual StanzaembeddedStanza () const
virtual TagembeddedTag () const
int extensionType () const

Detailed Description

An abstraction of a Disco Info element (from Service Discovery, XEP-0030) as a StanzaExtension.

Jakob Schröter

Definition at line 65 of file disco.h.

Member Function Documentation

◆ clone()

virtual StanzaExtension* clone ( ) const

Returns an identical copy of the current StanzaExtension.

An identical copy of the current StanzaExtension.

Implements StanzaExtension.

Definition at line 120 of file disco.h.

◆ features()

const StringList& features ( ) const

Returns the entity's supported features.

A list of supported features/namespaces.

Definition at line 80 of file disco.h.

◆ filterString()

const std::string & filterString ( ) const

Returns an XPath expression that describes a path to child elements of a stanza that an extension handles.

The extension's filter string.

Implements StanzaExtension.

Definition at line 129 of file disco.cpp.

◆ form()

const DataForm* form ( ) const

Returns an optionally included data form. This is used by e.g. MUC (XEP-0045).

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.

featureThe feature to check for.
True if the entity announces support for the feature, false otherwise.

Definition at line 121 of file disco.cpp.

◆ identities()

const IdentityList& identities ( ) const

Returns the entity's identities.

A list of pointers to Identity objects.

Definition at line 93 of file disco.h.

◆ newInstance()

virtual StanzaExtension* newInstance ( const Tag tag) const

Returns a new Instance of the derived type. Usually, for a derived class FooExtension, the implementation of this function looks like:

StanzaExtension* FooExtension::newInstance( const Tag* tag ) const
return new FooExtension( tag );
The derived extension's new instance.

Implements StanzaExtension.

Definition at line 114 of file disco.h.

◆ node()

const std::string& node ( ) const

Returns the queried node identifier, if any.

The node identifier. May be empty.

Definition at line 74 of file disco.h.

◆ setForm()

void setForm ( DataForm form)

Adds an optional DataForm, e.g. for XEP-0232. Only one form can be added at this point.

formAn optional DataForm to include in the Info reply. The form will be owned by and deleted on destruction of the Info object.
If called more than once the previously set form will be deleted.

Definition at line 115 of file disco.cpp.

◆ tag()

Tag * tag ( ) const

Returns a Tag representation of the extension.

A Tag representation of the extension.

Implements StanzaExtension.

Definition at line 135 of file disco.cpp.

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