IBR-DTNSuite  0.8
daemon/src/api/EventConnection.h
Go to the documentation of this file.
00001 /*
00002  * EventConnection.h
00003  *
00004  *  Created on: 13.10.2011
00005  *      Author: morgenro
00006  */
00007 
00008 #ifndef EVENTCONNECTION_H_
00009 #define EVENTCONNECTION_H_
00010 
00011 #include "api/ClientHandler.h"
00012 #include "core/EventReceiver.h"
00013 
00014 namespace dtn
00015 {
00016         namespace api
00017         {
00018                 class EventConnection : public ProtocolHandler, public dtn::core::EventReceiver
00019                 {
00020                 public:
00021                         EventConnection(ClientHandler &client, ibrcommon::tcpstream &stream);
00022                         virtual ~EventConnection();
00023 
00024                         void run();
00025                         void finally();
00026                         void setup();
00027                         void __cancellation();
00028 
00029                         void raiseEvent(const dtn::core::Event *evt);
00030 
00031                 private:
00032                         ibrcommon::Mutex _mutex;
00033                         bool _running;
00034                 };
00035         } /* namespace api */
00036 } /* namespace dtn */
00037 #endif /* EVENTCONNECTION_H_ */