00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef CHATSTATEFILTER_H__
00015 #define CHATSTATEFILTER_H__
00016
00017 #include "messagefilter.h"
00018 #include "gloox.h"
00019
00020 namespace gloox
00021 {
00022
00023 class Tag;
00024 class ChatStateHandler;
00025 class MessageSession;
00026 class Stanza;
00027
00040 class GLOOX_API ChatStateFilter : public MessageFilter
00041 {
00042 public:
00047 ChatStateFilter( MessageSession *parent );
00048
00052 virtual ~ChatStateFilter();
00053
00064 void setChatState( ChatStateType state );
00065
00071 void registerChatStateHandler( ChatStateHandler *csh );
00072
00078 void removeChatStateHandler();
00079
00080
00081 virtual void decorate( Tag *tag );
00082
00083
00084 virtual void filter( Stanza *stanza );
00085
00086 protected:
00087 ChatStateHandler *m_chatStateHandler;
00088 ChatStateType m_lastSent;
00089 bool m_enableChatStates;
00090
00091 };
00092
00093 }
00094
00095 #endif // CHATSTATEFILTER_H__