00001 /* 00002 * CustodyEvent.h 00003 * 00004 * Created on: 06.03.2009 00005 * Author: morgenro 00006 */ 00007 00008 #ifndef CUSTODYEVENT_H_ 00009 #define CUSTODYEVENT_H_ 00010 00011 #include <string> 00012 #include "data/Bundle.h" 00013 #include "core/Event.h" 00014 #include "data/CustodySignalBlock.h" 00015 #include "core/CustodyTimer.h" 00016 00017 using namespace dtn::data; 00018 using namespace dtn::core; 00019 using namespace std; 00020 00021 namespace dtn 00022 { 00023 namespace core 00024 { 00025 enum EventCustodyAction 00026 { 00027 CUSTODY_REJECT = 0, 00028 CUSTODY_ACCEPT = 1 00029 }; 00030 00031 class CustodyEvent : public Event 00032 { 00033 public: 00034 CustodyEvent(const Bundle &bundle, const EventCustodyAction action); 00035 ~CustodyEvent(); 00036 00037 EventCustodyAction getAction() const; 00038 const Bundle& getBundle() const; 00039 const string getName() const; 00040 const EventType getType() const; 00041 00042 #ifdef DO_DEBUG_OUTPUT 00043 string toString(); 00044 #endif 00045 00046 static const string className; 00047 00048 private: 00049 const Bundle &m_bundle; 00050 const EventCustodyAction m_action; 00051 }; 00052 } 00053 } 00054 00055 #endif /* CUSTODYEVENT_H_ */
1.5.6