Disco::Items Class Reference

`#include <disco.h>`

Inheritance diagram for Disco::Items:
[legend]

## Public Member Functions

| Items (const std::string &node=EmptyString)
virtual | ~Items ()
void | setItems (const ItemList &items)
const std::string & | node () const
const ItemList & | items () const
virtual const std::string & | filterString () const
virtual StanzaExtension * | newInstance (const Tag *tag) const
virtual Tag * | tag () const
virtual StanzaExtension * | clone () const
Public Member Functions inherited from StanzaExtension
| StanzaExtension (int type)
virtual | ~StanzaExtension ()
virtual Stanza * | embeddedStanza () const
virtual Tag * | embeddedTag () 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

  node | The 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

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.

## 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

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 );
}
gloox::Disco::Items::tag
virtual Tag * tag() const
Definition disco.cpp:227
gloox::StanzaExtension::StanzaExtension
StanzaExtension(int type)
Definition stanzaextension.h:211
gloox::Tag
This is an abstraction of an XML element.
Definition tag.h:47

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

  items | A 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:

- disco.h
- disco.cpp