gloox 1.0
|
00001 /* 00002 Copyright (c) 2008-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 EVENT_H__ 00015 #define EVENT_H__ 00016 00017 namespace gloox 00018 { 00019 00020 class Stanza; 00021 00028 class Event 00029 { 00030 00031 public: 00035 enum EventType 00036 { 00037 PingPing, 00038 PingPong, 00039 PingError 00040 }; 00041 00046 Event( EventType type ) : m_eventType( type ), m_stanza( 0 ) {} 00047 00053 Event( EventType type, const Stanza& stanza ) : m_eventType( type ), m_stanza( &stanza ) {} 00054 00058 virtual ~Event() {} 00059 00064 EventType eventType() const { return m_eventType; } 00065 00071 const Stanza* stanza() const { return m_stanza; } 00072 00073 protected: 00074 EventType m_eventType; 00075 const Stanza* m_stanza; 00076 00077 }; 00078 00079 } 00080 00081 #endif // EVENT_H__