gloox 1.0
Public Member Functions

Disco::Items Class Reference

An abstraction of a Disco query element (from Service Discovery, XEP-0030) in the disco::items namespace, implemented as a StanzaExtension. More...

#include <disco.h>

Inheritance diagram for Disco::Items:
Inheritance graph
[legend]

List of all members.

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

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 Schroeter <js@camaya.net>
Since:
1.0

Definition at line 275 of file disco.h.


Constructor & Destructor Documentation

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

~Items ( ) [virtual]

Virtual destructor.

Definition at line 210 of file disco.cpp.


Member Function Documentation

virtual StanzaExtension* clone ( ) const [inline, virtual]

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.

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

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.

virtual StanzaExtension* newInstance ( const Tag tag) const [inline, virtual]

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.

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.

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

Tag * tag ( ) const [virtual]

Returns a Tag representation of the extension.

Returns:
A Tag representation of the extension.

Implements StanzaExtension.

Definition at line 228 of file disco.cpp.


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