IqHandler Class Referenceabstract

`#include <iqhandler.h>`

Inheritance diagram for IqHandler:
[legend]

## Public Member Functions

virtual | ~IqHandler ()
virtual bool | handleIq (const IQ &iq)=0
virtual void | handleIqID (const IQ &iq, 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 Schröter js@ca.nosp@m.maya.nosp@m..net

Definition at line 31 of file iqhandler.h.

## Constructor & Destructor Documentation

## ~IqHandler()

virtual ~IqHandler | ( |  | ) |

inline virtual

Virtual Destructor.

Definition at line 37 of file iqhandler.h.

## Member Function Documentation

## handleIq()

virtual bool handleIq | ( | const IQ & | iq | ) |

pure virtual

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

Parameters

  iq | The complete IQ stanza.

Returns
  Indicates whether a request of type 'get' or 'set' has been handled. This includes the obligatory 'result' answer. If you return false, an 'error' will be sent back.

Since
  1.0

Implemented in Adhoc, Disco, FlexibleOffline, InBandBytestream, Session, SessionManager, LastActivity, MUCRoom, NonSaslAuth, PrivacyManager, PrivateXML, Manager, Registration, RosterManager, Search, SIManager, SIProfileFT, SOCKS5BytestreamManager, and VCardManager.

## handleIqID()

virtual void handleIqID | ( | const IQ & | iq,
|  | 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 empty positive reply, i.e. <iq type='result' id='reg'/> where a namespace filter wouldn't work.

Parameters

  iq | The complete IQ stanza.
  context | A value to restore context, stored with ClientBase::trackID().

Note
  Only IQ stanzas of type 'result' or 'error' can arrive here.

Since
  1.0

Implemented in Adhoc, Disco, FlexibleOffline, InBandBytestream, Session, SessionManager, LastActivity, MUCRoom, NonSaslAuth, PrivacyManager, PrivateXML, Manager, Registration, RosterManager, Search, SIManager, SIProfileFT, SOCKS5BytestreamManager, and VCardManager.

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

- iqhandler.h