gloox 1.0
|
This class adds Message Event (XEP-0022) support to a MessageSession. More...
#include <messageeventfilter.h>
Public Member Functions | |
MessageEventFilter (MessageSession *parent) | |
virtual | ~MessageEventFilter () |
void | raiseMessageEvent (MessageEventType event) |
void | registerMessageEventHandler (MessageEventHandler *meh) |
void | removeMessageEventHandler () |
virtual void | decorate (Message &msg) |
virtual void | filter (Message &msg) |
This class adds Message Event (XEP-0022) support to a MessageSession.
This implementation of Message Events is fully transparent to the user of the class. If the remote entity does not request message events, MessageEventFilter will not send any, even if the user requests it. (This is required by the protocol specification.)
Definition at line 38 of file messageeventfilter.h.
build buildd gloox src messageeventfilter cpp MessageEventFilter | ( | MessageSession * | parent | ) |
Contstructs a new Message Event filter for a MessageSession.
parent | The MessageSession to decorate. |
Definition at line 25 of file messageeventfilter.cpp.
~MessageEventFilter | ( | ) | [virtual] |
Virtual destructor.
Definition at line 31 of file messageeventfilter.cpp.
void decorate | ( | Message & | msg | ) | [virtual] |
This function receives a message right before it is sent out (there may be other filters which get to see the message after this filter, though).
msg | The tag to decorate. It contains the message to be sent. |
Implements MessageFilter.
Definition at line 93 of file messageeventfilter.cpp.
void filter | ( | Message & | msg | ) | [virtual] |
This function receives a message stanza right after it was received (there may be other filters which got to see the stanza before this filter, though).
msg | The complete message stanza. |
Implements MessageFilter.
Definition at line 35 of file messageeventfilter.cpp.
void raiseMessageEvent | ( | MessageEventType | event | ) |
Use this function to raise an event as defined in XEP-0022.
event | The event to raise. |
Definition at line 66 of file messageeventfilter.cpp.
void registerMessageEventHandler | ( | MessageEventHandler * | meh | ) |
The MessageEventHandler registered here will receive Message Events according to XEP-0022.
meh | The MessageEventHandler to register. |
Definition at line 103 of file messageeventfilter.cpp.
void removeMessageEventHandler | ( | ) |
This function clears the internal pointer to the MessageEventHandler. Message Events will not be delivered anymore after calling this function until another MessageEventHandler is registered.
Definition at line 108 of file messageeventfilter.cpp.