messageeventfilter.h

00001 /*
00002   Copyright (c) 2005-2009 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 MESSAGEVENTFILTER_H__
00015 #define MESSAGEVENTFILTER_H__
00016 
00017 #include "messagefilter.h"
00018 #include "gloox.h"
00019 
00020 namespace gloox
00021 {
00022 
00023   class Tag;
00024   class Message;
00025   class MessageEventHandler;
00026   class MessageSession;
00027 
00038   class GLOOX_API MessageEventFilter : public MessageFilter
00039   {
00040     public:
00045       MessageEventFilter( MessageSession* parent );
00046 
00050       virtual ~MessageEventFilter();
00051 
00062       void raiseMessageEvent( MessageEventType event );
00063 
00069       void registerMessageEventHandler( MessageEventHandler* meh );
00070 
00076       void removeMessageEventHandler();
00077 
00078       // reimplemented from MessageFilter
00079       virtual void decorate( Message& msg );
00080 
00081       // reimplemented from MessageFilter
00082       virtual void filter( Message& msg );
00083 
00084     private:
00085       MessageEventHandler* m_messageEventHandler;
00086       std::string m_lastID;
00087       int m_requestedEvents;
00088       MessageEventType m_lastSent;
00089       bool m_disable;
00090 
00091   };
00092 
00093 }
00094 
00095 #endif // MESSAGEVENTFILTER_H__

Generated by  doxygen 1.6.2