chatstatefilter.h

00001 /*
00002   Copyright (c) 2005-2008 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 
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       // reimplemented from MessageFilter
00081       virtual void decorate( Tag *tag );
00082 
00083       // reimplemented from MessageFilter
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__

Generated on Fri Oct 10 15:26:11 2008 for gloox by  doxygen 1.5.6