#include <chatstatefilter.h>
Inherits MessageFilter.
Inheritance diagram for ChatStateFilter:
Public Member Functions | |
ChatStateFilter (MessageSession *parent) | |
virtual | ~ChatStateFilter () |
void | setChatState (ChatStateType state) |
void | registerChatStateHandler (ChatStateHandler *csh) |
void | removeChatStateHandler () |
virtual void | decorate (Tag *tag) |
virtual void | filter (Stanza *stanza) |
This implementation of Chat States is fully transparent to the user of the class. If the remote entity does not request chat states, ChatStateFilter will not send any, even if the user requests it. (This is required by the protocol specification.) You should annouce this capability by use of Disco (associated namespace is XMLNS_CHAT_STATES).
Definition at line 39 of file chatstatefilter.h.
ChatStateFilter | ( | MessageSession * | parent | ) |
Contstructs a new Chat State filter for a MessageSession.
parent | The MessageSession to decorate. |
Definition at line 22 of file chatstatefilter.cpp.
~ChatStateFilter | ( | ) | [virtual] |
Virtual destructor.
Definition at line 28 of file chatstatefilter.cpp.
void setChatState | ( | ChatStateType | state | ) |
Use this function to set a chat state as defined in JEP-0085.
state | The state to set. |
Definition at line 70 of file chatstatefilter.cpp.
void registerChatStateHandler | ( | ChatStateHandler * | csh | ) |
The ChatStateHandler registered here will receive Chat States according to JEP-0085.
csh | The ChatStateHandler to register. |
Definition at line 117 of file chatstatefilter.cpp.
void removeChatStateHandler | ( | ) |
This function clears the internal pointer to the ChatStateHandler. Chat States will not be delivered anymore after calling this function until another ChatStateHandler is registered.
Definition at line 122 of file chatstatefilter.cpp.
void decorate | ( | Tag * | tag | ) | [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).
tag | The tag to decorate. It contains the message to be sent. |
Implements MessageFilter.
Definition at line 108 of file chatstatefilter.cpp.
void filter | ( | Stanza * | stanza | ) | [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).
stanza | The complete message stanza. |
Implements MessageFilter.
Definition at line 32 of file chatstatefilter.cpp.