IBR-DTNSuite
0.8
|
00001 /* 00002 * CustodyEvent.cpp 00003 * 00004 * Created on: 06.03.2009 00005 * Author: morgenro 00006 */ 00007 00008 #include "core/CustodyEvent.h" 00009 #include "ibrdtn/data/Exceptions.h" 00010 00011 namespace dtn 00012 { 00013 namespace core 00014 { 00015 CustodyEvent::CustodyEvent(const dtn::data::MetaBundle &bundle, const EventCustodyAction action) 00016 : m_bundle(bundle), m_action(action) 00017 { 00018 } 00019 00020 CustodyEvent::~CustodyEvent() 00021 { 00022 } 00023 00024 const dtn::data::MetaBundle& CustodyEvent::getBundle() const 00025 { 00026 return m_bundle; 00027 } 00028 00029 EventCustodyAction CustodyEvent::getAction() const 00030 { 00031 return m_action; 00032 } 00033 00034 const std::string CustodyEvent::getName() const 00035 { 00036 return CustodyEvent::className; 00037 } 00038 00039 std::string CustodyEvent::toString() const 00040 { 00041 return className; 00042 } 00043 00044 void CustodyEvent::raise(const dtn::data::MetaBundle &bundle, const EventCustodyAction action) 00045 { 00046 raiseEvent( new CustodyEvent(bundle, action) ); 00047 } 00048 00049 const std::string CustodyEvent::className = "CustodyEvent"; 00050 } 00051 }