Capabilities Class Reference

`#include <capabilities.h>`

Inheritance diagram for Capabilities:
[legend]

## Public Member Functions

| Capabilities (Disco *disco)
| Capabilities (const Tag *tag=0)
virtual | ~Capabilities ()
const std::string & | node () const
void | setNode (const std::string &node)
const std::string | ver () const
virtual const std::string & | filterString () const
virtual StanzaExtension * | newInstance (const Tag *tag) const
virtual Tag * | tag () const
virtual StanzaExtension * | clone () const
virtual StringList | handleDiscoNodeFeatures (const JID &from, const std::string &node)
virtual Disco::IdentityList | handleDiscoNodeIdentities (const JID &from, const std::string &node)
virtual Disco::ItemList | handleDiscoNodeItems (const JID &from, const JID &to, const std::string &node=EmptyString)
Public Member Functions inherited from StanzaExtension
| StanzaExtension (int type)
virtual | ~StanzaExtension ()
virtual Stanza * | embeddedStanza () const
virtual Tag * | embeddedTag () const
int | extensionType () const
Public Member Functions inherited from DiscoNodeHandler
virtual | ~DiscoNodeHandler ()

## Detailed Description

This is an implementation of XEP-0115 (Entity Capabilities).

XEP Version: 1.5-15

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

Since
  1.0

Definition at line 36 of file capabilities.h.

## Constructor & Destructor Documentation

## Capabilities() [1/2]

Capabilities | ( | Disco * | disco | ) |

Constructs a new object and fills it according to the parameters.

Parameters

  disco | The current Client's Disco object.

Definition at line 25 of file capabilities.cpp.

## Capabilities() [2/2]

Capabilities | ( | const Tag * | tag = 0 | ) |

Constructs a new object from the given Tag.

Parameters

  tag | The Tag to parse.

Definition at line 33 of file capabilities.cpp.

## ~Capabilities()

~Capabilities | ( |  | ) |

virtual

Virtual Destructor.

Definition at line 46 of file capabilities.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 88 of file capabilities.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 142 of file capabilities.cpp.

## handleDiscoNodeFeatures()

StringList handleDiscoNodeFeatures | ( | const JID & | from,
|  | const std::string & | node )

virtual

In addition to `handleDiscoNodeIdentities`, this function is used to gather more information on a specific node. It is called when a disco#info query arrives with a node attribute that matches the one registered for this handler.

Parameters

  from | The sender of the request.
  node | The node this handler is supposed to handle.

Returns
  A list of features supported by this node.

Implements DiscoNodeHandler.

Definition at line 161 of file capabilities.cpp.

## handleDiscoNodeIdentities()

Disco::IdentityList handleDiscoNodeIdentities | ( | const JID & | from,
|  | const std::string & | node )

virtual

In addition to `handleDiscoNodeFeatures`, this function is used to gather more information on a specific node. It is called when a disco#info query arrives with a node attribute that matches the one registered for this handler.

Parameters

  from | The sender of the request.
  node | The node this handler is supposed to handle.

Returns
  A list of identities for the given node. The caller will own the identities.

Implements DiscoNodeHandler.

Definition at line 166 of file capabilities.cpp.

## handleDiscoNodeItems()

Disco::ItemList handleDiscoNodeItems | ( | const JID & | from,
|  | const JID & | to,
|  | const std::string & | node = EmptyString )

virtual

This function is used to gather more information on a specific node. It is called when a disco#items query arrives with a node attribute that matches the one registered for this handler. If node is empty, items for the root node (no node) shall be returned.

Parameters

  from | The sender of the request.
  to | The receiving JID (useful for transports).
  node | The node this handler is supposed to handle.

Returns
  A list of items supported by this node.

Implements DiscoNodeHandler.

Definition at line 178 of file capabilities.cpp.

## 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::Capabilities::tag
virtual Tag * tag() const
Definition capabilities.cpp:148
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 79 of file capabilities.h.

## node()

const std::string & node | ( |  | ) | const

inline

Returns the client's identifying node.

Returns
  The node.

Definition at line 61 of file capabilities.h.

## setNode()

void setNode | ( | const std::string & | node | ) |

inline

Sets the client's identifying node.

Parameters

  node | The node.

Definition at line 67 of file capabilities.h.

## tag()

Tag * tag | ( |  | ) | const

virtual

Returns a Tag representation of the extension.

Returns
  A Tag representation of the extension.

Implements StanzaExtension.

Definition at line 148 of file capabilities.cpp.

## ver()

const std::string ver | ( |  | ) | const

Returns the client's identifying ver string.

Returns
  The ver string.

Definition at line 52 of file capabilities.cpp.

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

- capabilities.h
- capabilities.cpp