IBR-DTNSuite  0.8
daemon/src/net/BundleReceivedEvent.h
Go to the documentation of this file.
00001 /*
00002  * BundleReceivedEvent.h
00003  *
00004  *  Created on: 15.02.2010
00005  *      Author: morgenro
00006  */
00007 
00008 #ifndef BUNDLERECEIVEDEVENT_H_
00009 #define BUNDLERECEIVEDEVENT_H_
00010 
00011 #include "core/Event.h"
00012 #include "ibrdtn/data/Bundle.h"
00013 #include "ibrdtn/data/EID.h"
00014 
00015 namespace dtn
00016 {
00017         namespace net
00018         {
00019                 class BundleReceivedEvent : public dtn::core::Event
00020                 {
00021                 public:
00022                         virtual ~BundleReceivedEvent();
00023 
00024                         const string getName() const;
00025 
00026                         string toString() const;
00027 
00028                         static const string className;
00029 
00030                         static void raise(const dtn::data::EID &peer, const dtn::data::Bundle &bundle, const bool &local = false, const bool &wait = false);
00031 
00032                         const dtn::data::EID peer;
00033                         const dtn::data::Bundle bundle;
00034                         const bool fromlocal;
00035 
00036                 private:
00037                         BundleReceivedEvent(const dtn::data::EID &peer, const dtn::data::Bundle &bundle, const bool &local);
00038                 };
00039         }
00040 }
00041 
00042 
00043 #endif /* BUNDLERECEIVEDEVENT_H_ */