IqHandler Class Reference

A virtual interface which can be reimplemented to receive IQ stanzas. More...

#include <iqhandler.h>

Inheritance diagram for IqHandler:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~IqHandler ()
virtual bool handleIq (Stanza *stanza)=0
virtual bool handleIqID (Stanza *stanza, int context)=0


Detailed Description

A virtual interface which can be reimplemented to receive IQ stanzas.

Derived classes can be registered as IqHandlers with the Client. Upon an incoming IQ packet handleIq() will be called.

Author:
Jakob Schroeter <js@camaya.net>

Definition at line 30 of file iqhandler.h.


Constructor & Destructor Documentation

virtual ~IqHandler (  )  [inline, virtual]

Virtual Destructor.

Definition at line 36 of file iqhandler.h.


Member Function Documentation

virtual bool handleIq ( Stanza stanza  )  [pure virtual]

Reimplement this function if you want to be notified about incoming IQs.

Parameters:
stanza The complete Stanza.
Returns:
Indicates whether a request of type 'get' or 'set' has been handled. This includes the obligatory 'result' answer. If you return false, a 'error' will be sent.

Implemented in Adhoc, Disco, FlexibleOffline, InBandBytestreamManager, LastActivity, MUCRoom, NonSaslAuth, PrivacyManager, PrivateXML, Registration, RosterManager, Search, SIManager, SOCKS5BytestreamManager, and VCardManager.

virtual bool handleIqID ( Stanza stanza,
int  context 
) [pure virtual]

Reimplement this function if you want to be notified about incoming IQs with a specific value of the id attribute. You have to enable tracking of those IDs using Client::trackID(). This is usually useful for IDs that generate a positive reply, i.e. <iq type='result' id='reg'/> where a namespace filter wouldn't work.

Parameters:
stanza The complete Stanza.
context A value to restore context, stored with ClientBase::trackID().
Returns:
Indicates whether a request of type 'get' or 'set' has been handled. This includes the obligatory 'result' answer. If you return false, a 'error' will be sent.

Implemented in Adhoc, Disco, FlexibleOffline, InBandBytestreamManager, LastActivity, MUCRoom, NonSaslAuth, PrivacyManager, PrivateXML, Registration, RosterManager, Search, SIManager, SOCKS5BytestreamManager, and VCardManager.


The documentation for this class was generated from the following file:
Generated on Sat Nov 10 08:50:35 2007 for gloox by  doxygen 1.5.3-20071008