gloox  0.9.9.12
Public Member Functions | List of all members
DiscoNodeHandler Class Reference

#include <disconodehandler.h>

Inheritance diagram for DiscoNodeHandler:
Inheritance graph
[legend]

Public Member Functions

virtual ~DiscoNodeHandler ()
virtual StringList handleDiscoNodeFeatures (const std::string &node)=0
virtual StringMap handleDiscoNodeIdentities (const std::string &node, std::string &name)=0
virtual DiscoNodeItemList handleDiscoNodeItems (const std::string &node="")=0

Detailed Description

Derived classes can be registered as NodeHandlers for certain nodes with the Disco object.

Incoming disco::info and disco::items queries are delegated to their respective handlers.

Author
Jakob Schroeter js@ca.nosp@m.maya.nosp@m..net

Definition at line 54 of file disconodehandler.h.

Constructor & Destructor Documentation

virtual ~DiscoNodeHandler ( )
inlinevirtual

Virtual Destructor.

Definition at line 60 of file disconodehandler.h.

Member Function Documentation

virtual StringList handleDiscoNodeFeatures ( const std::string &  node)
pure 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
nodeThe node this handler is supposed to handle.
Returns
A list of features supported by this node.

Implemented in Adhoc.

virtual StringMap handleDiscoNodeIdentities ( const std::string &  node,
std::string &  name 
)
pure 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
nodeThe node this handler is supposed to handle.
nameThis parameter is currently used as additional return value. Just fill in the name of the node.
Returns
A map of identities for the given node. The first string is the category specifier, the second string is the type specifier.

Implemented in Adhoc.

virtual DiscoNodeItemList handleDiscoNodeItems ( const std::string &  node = "")
pure 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
nodeThe node this handler is supposed to handle.
Returns
A list of items supported by this node.

Implemented in Adhoc.


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