IBR-DTNSuite  0.8
daemon/src/routing/NodeHandshakeEvent.h
Go to the documentation of this file.
00001 /*
00002  * NodeHandshakeEvent.h
00003  *
00004  *  Created on: 08.12.2011
00005  *      Author: morgenro
00006  */
00007 
00008 #ifndef NODEHANDSHAKEEVENT_H_
00009 #define NODEHANDSHAKEEVENT_H_
00010 
00011 #include "core/Event.h"
00012 #include <ibrdtn/data/EID.h>
00013 
00014 namespace dtn
00015 {
00016         namespace routing
00017         {
00018                 class NodeHandshakeEvent : public dtn::core::Event
00019                 {
00020                 public:
00021                         enum HANDSHAKE_STATE
00022                         {
00023                                 HANDSHAKE_REPLIED = 1,
00024                                 HANDSHAKE_COMPLETED = 2,
00025                                 HANDSHAKE_UPDATED = 3
00026                         };
00027 
00028                         virtual ~NodeHandshakeEvent();
00029 
00030                         const std::string getName() const;
00031 
00032                         std::string toString() const;
00033 
00034                         static void raiseEvent(HANDSHAKE_STATE state, const dtn::data::EID &peer);
00035 
00036                         HANDSHAKE_STATE state;
00037                         dtn::data::EID peer;
00038 
00039                         static const string className;
00040 
00041                 private:
00042                         NodeHandshakeEvent(HANDSHAKE_STATE state, const dtn::data::EID &peer);
00043                 };
00044         } /* namespace routing */
00045 } /* namespace dtn */
00046 #endif /* NODEHANDSHAKEEVENT_H_ */