MessageHandler Class Reference

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

#include <messagehandler.h>

Inherited by InBandBytestream, and MUCRoom [private].

List of all members.

Public Member Functions

virtual ~MessageHandler ()
virtual void handleMessage (const Message &msg, MessageSession *session=0)=0

Detailed Description

A virtual interface which can be reimplemented to receive incoming message stanzas.

Derived classes can be registered as MessageHandlers with a ClientBase or MessageSession instance. Upon an incoming Message packet handleMessage() will be called. If registered with a ClientBase this happens for every incoming message, regardless of the sender. With a MessageSession the registered handler will receive all messages originating from the Session's contact. See MessageSession for more details.

Author:
Jakob Schroeter <js@camaya.net>

Definition at line 36 of file messagehandler.h.


Constructor & Destructor Documentation

virtual ~MessageHandler (  )  [inline, virtual]

Virtual Destructor.

Definition at line 42 of file messagehandler.h.


Member Function Documentation

virtual void handleMessage ( const Message msg,
MessageSession session = 0 
) [pure virtual]

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

Parameters:
msg The complete Message.
session If this MessageHandler is used with a MessageSession, this parameter holds a pointer to that MessageSession.
Since:
1.0

Implemented in InBandBytestream, and MUCRoom.


The documentation for this class was generated from the following file:
Generated on Tue Jun 8 23:37:56 2010 for gloox by  doxygen 1.6.3