A virtual interface which can be reimplemented to receive incoming message stanzas. More...
#include <messagehandler.h>
Inherited by InBandBytestream, and MUCRoom [private]
.
Public Member Functions | |
virtual | ~MessageHandler () |
virtual void | handleMessage (const Message &msg, MessageSession *session=0)=0 |
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.
Definition at line 36 of file messagehandler.h.
virtual ~MessageHandler | ( | ) | [inline, virtual] |
Virtual Destructor.
Definition at line 42 of file messagehandler.h.
virtual void handleMessage | ( | const Message & | msg, | |
MessageSession * | session = 0 | |||
) | [pure virtual] |
Reimplement this function if you want to be notified about incoming messages.
msg | The complete Message. | |
session | If this MessageHandler is used with a MessageSession, this parameter holds a pointer to that MessageSession. |
Implemented in InBandBytestream, and MUCRoom.