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
[legend]

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.

Author
Jakob Schröter js@ca.nosp@m.maya.nosp@m..net
Since
1.0

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.

Parameters
nodeThe node identifier to query (optional).

Definition at line 186 of file disco.cpp.

◆ ~Items()

~Items ( )
virtual

Virtual destructor.

Definition at line 209 of file disco.cpp.

Member Function Documentation

◆ clone()

virtual StanzaExtension* clone ( ) const
inlinevirtual

Returns an identical copy of the current StanzaExtension.

Returns
An identical copy of the current StanzaExtension.

Implements StanzaExtension.

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

◆ items()

const ItemList& items ( ) const
inline

Returns the entity's/node's items.

Returns
A list of pointers to Item objects.

Definition at line 311 of file disco.h.

◆ newInstance()

virtual StanzaExtension* newInstance ( const Tag tag) const
inlinevirtual

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 );
}
Returns
The derived extension's new instance.

Implements StanzaExtension.

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

◆ setItems()

void setItems ( const ItemList items)

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

Parameters
itemsA list of pointers to the entity's/node's items.
Note
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
virtual

Returns a Tag representation of the extension.

Returns
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: