00001 /* 00002 * BundleEvent.h 00003 * 00004 * Created on: 06.03.2009 00005 * Author: morgenro 00006 */ 00007 00008 #ifndef BUNDLEEVENT_H_ 00009 #define BUNDLEEVENT_H_ 00010 00011 #include <string> 00012 #include "data/Bundle.h" 00013 #include "core/Event.h" 00014 #include "data/StatusReportBlock.h" 00015 00016 using namespace dtn::data; 00017 using namespace dtn::core; 00018 using namespace std; 00019 00020 namespace dtn 00021 { 00022 namespace core 00023 { 00024 enum EventBundleAction 00025 { 00026 BUNDLE_DELETED = 0, 00027 BUNDLE_CUSTODY_ACCEPTED = 1, 00028 BUNDLE_FORWARDED = 2, 00029 BUNDLE_DELIVERED = 3, 00030 BUNDLE_RECEIVED = 4 00031 }; 00032 00033 class BundleEvent : public Event 00034 { 00035 public: 00036 BundleEvent(const Bundle &bundle, EventBundleAction action, StatusReportReasonCode reason = NO_ADDITIONAL_INFORMATION); 00037 00038 ~BundleEvent(); 00039 00040 StatusReportReasonCode getReason() const; 00041 EventBundleAction getAction() const; 00042 const Bundle& getBundle() const; 00043 const string getName() const; 00044 const EventType getType() const; 00045 00046 #ifdef DO_DEBUG_OUTPUT 00047 string toString(); 00048 #endif 00049 00050 static const string className; 00051 00052 private: 00053 const Bundle m_bundle; 00054 EventBundleAction m_action; 00055 StatusReportReasonCode m_reason; 00056 }; 00057 } 00058 } 00059 00060 #endif /* BUNDLEEVENT_H_ */
1.5.6