chatstatefilter.h

00001 /*
00002   Copyright (c) 2005-2006 by Jakob Schroeter <js@camaya.net>
00003   This file is part of the gloox library. http://camaya.net/gloox
00004 
00005   This software is distributed under a license. The full license
00006   agreement can be found in the file LICENSE in this distribution.
00007   This software may not be copied, modified, sold or distributed
00008   other than expressed in the named license agreement.
00009 
00010   This software is distributed without any warranty.
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 
00039   class GLOOX_API ChatStateFilter : public MessageFilter
00040   {
00041     public:
00046       ChatStateFilter( MessageSession *parent );
00047 
00051       virtual ~ChatStateFilter();
00052 
00063       void setChatState( ChatStateType state );
00064 
00070       void registerChatStateHandler( ChatStateHandler *csh );
00071 
00077       void removeChatStateHandler();
00078 
00079       // reimplemented from MessageFilter
00080       virtual void decorate( Tag *tag );
00081 
00082       // reimplemented from MessageFilter
00083       virtual void filter( Stanza *stanza );
00084 
00085     private:
00086       ChatStateHandler *m_chatStateHandler;
00087       ChatStateType m_lastSent;
00088       bool m_enableChatStates;
00089 
00090   };
00091 
00092 }
00093 
00094 #endif // CHATSTATEFILTER_H__

Generated on Tue May 1 14:20:20 2007 for gloox by  doxygen 1.5.1