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

#include <disco.h>

Inheritance diagram for Disco::Items:
Inheritance graph

Public Member Functions

 Items (const std::string &node=EmptyString)
virtual ~Items ()
void setItems (const ItemList &items)
const std::string & node () const
const ItemListitems () const
virtual const std::string & filterString () const
virtual StanzaExtensionnewInstance (const Tag *tag) const
virtual Tagtag () const
virtual StanzaExtensionclone () 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 query element (from Service Discovery, XEP-0030) in the disco::items namespace, implemented as a StanzaExtension.

Jakob Schröter

Definition at line 275 of file disco.h.

Constructor & Destructor Documentation

◆ Items()

Items ( const std::string &  node = EmptyString)

Creates an empty Items object, suitable for making disco::items requests.

nodeThe node identifier to query (optional).

Definition at line 186 of file disco.cpp.

◆ ~Items()

~Items ( )

Virtual destructor.

Definition at line 209 of file disco.cpp.

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 326 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 221 of file disco.cpp.

◆ items()

const ItemList& items ( ) const

Returns the entity's/node's items.

A list of pointers to Item objects.

Definition at line 311 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 317 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 305 of file disco.h.

◆ setItems()

void setItems ( const ItemList items)

This function can be used to set the entity's/node's items.

itemsA list of pointers to the entity's/node's items.
The Item objects pointed to will be owned by the Items object. The list should neither be used again nor should the Item objects be deleted.

Definition at line 214 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 227 of file disco.cpp.

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