messageevent.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef MESSAGEEVENT_H__
00014 #define MESSAGEEVENT_H__
00015
00016 #include "gloox.h"
00017 #include "stanzaextension.h"
00018
00019 #include <string>
00020
00021 namespace gloox
00022 {
00023
00024 class Tag;
00025
00032 class GLOOX_API MessageEvent : public StanzaExtension
00033 {
00034 public:
00035
00040 MessageEvent( const Tag* tag );
00041
00047 MessageEvent( int type, const std::string& id = EmptyString )
00048 : StanzaExtension( ExtMessageEvent ), m_id( id ), m_event( type )
00049 {}
00050
00054 virtual ~MessageEvent() {}
00055
00060 int event() const { return m_event; }
00061
00062
00063 virtual const std::string& filterString() const;
00064
00065
00066 virtual StanzaExtension* newInstance( const Tag* tag ) const
00067 {
00068 return new MessageEvent( tag );
00069 }
00070
00071
00072 Tag* tag() const;
00073
00074
00075 virtual StanzaExtension* clone() const
00076 {
00077 return new MessageEvent( *this );
00078 }
00079
00080 private:
00081 std::string m_id;
00082 int m_event;
00083
00084 };
00085
00086 }
00087
00088 #endif // MESSAGEEVENT_H__