IBR-DTNSuite  0.8
daemon/src/core/BundlePurgeEvent.cpp
Go to the documentation of this file.
00001 /*
00002  * BundlePurgeEvent.cpp
00003  *
00004  *  Created on: 13.04.2012
00005  *      Author: morgenro
00006  */
00007 
00008 #include "core/BundlePurgeEvent.h"
00009 
00010 namespace dtn
00011 {
00012         namespace core
00013         {
00014                 BundlePurgeEvent::BundlePurgeEvent(const dtn::data::BundleID &id, dtn::data::StatusReportBlock::REASON_CODE r)
00015                  : bundle(id), reason(r)
00016                 {
00017                 }
00018 
00019                 BundlePurgeEvent::~BundlePurgeEvent()
00020                 {
00021                 }
00022 
00023                 void BundlePurgeEvent::raise(const dtn::data::BundleID &id, dtn::data::StatusReportBlock::REASON_CODE reason)
00024                 {
00025                         // raise the new event
00026                         raiseEvent( new BundlePurgeEvent(id, reason) );
00027                 }
00028 
00029                 const std::string BundlePurgeEvent::getName() const
00030                 {
00031                         return BundlePurgeEvent::className;
00032                 }
00033 
00034                 std::string BundlePurgeEvent::toString() const
00035                 {
00036                         return className + ": purging bundle " + bundle.toString();
00037                 }
00038 
00039                 const std::string BundlePurgeEvent::className = "BundlePurgeEvent";
00040         } /* namespace core */
00041 } /* namespace dtn */