gloox  1.0.28
Public Member Functions | List of all members
DiscoNodeHandler Class Referenceabstract

#include <disconodehandler.h>

Inheritance diagram for DiscoNodeHandler:
Inheritance graph
[legend]

Public Member Functions

virtual ~DiscoNodeHandler ()
 
virtual StringList handleDiscoNodeFeatures (const JID &from, const std::string &node)=0
 
virtual Disco::IdentityList handleDiscoNodeIdentities (const JID &from, const std::string &node)=0
 
virtual Disco::ItemList handleDiscoNodeItems (const JID &from, const JID &to, const std::string &node=EmptyString)=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 Schröter js@ca.nosp@m.maya.nosp@m..net

Definition at line 35 of file disconodehandler.h.

Constructor & Destructor Documentation

◆ ~DiscoNodeHandler()

virtual ~DiscoNodeHandler ( )
inlinevirtual

Virtual Destructor.

Definition at line 41 of file disconodehandler.h.

Member Function Documentation

◆ handleDiscoNodeFeatures()

virtual StringList handleDiscoNodeFeatures ( const JID from,
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
fromThe sender of the request.
nodeThe node this handler is supposed to handle.
Returns
A list of features supported by this node.

Implemented in MUCRoom, Capabilities, and Adhoc.

◆ handleDiscoNodeIdentities()

virtual Disco::IdentityList handleDiscoNodeIdentities ( const JID from,
const std::string &  node 
)
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
fromThe sender of the request.
nodeThe node this handler is supposed to handle.
Returns
A list of identities for the given node. The caller will own the identities.

Implemented in MUCRoom, Capabilities, and Adhoc.

◆ handleDiscoNodeItems()

virtual Disco::ItemList handleDiscoNodeItems ( const JID from,
const JID to,
const std::string &  node = EmptyString 
)
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
fromThe sender of the request.
toThe receiving JID (useful for transports).
nodeThe node this handler is supposed to handle.
Returns
A list of items supported by this node.

Implemented in MUCRoom, Capabilities, and Adhoc.


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