IBR-DTN
1.0.0
Main Page
Namespaces
Classes
Files
File List
File Members
EventConnection.h
Go to the documentation of this file.
1
/*
2
* EventConnection.h
3
*
4
* Copyright (C) 2011 IBR, TU Braunschweig
5
*
6
* Written-by: Johannes Morgenroth <morgenroth@ibr.cs.tu-bs.de>
7
*
8
* Licensed under the Apache License, Version 2.0 (the "License");
9
* you may not use this file except in compliance with the License.
10
* You may obtain a copy of the License at
11
*
12
* http://www.apache.org/licenses/LICENSE-2.0
13
*
14
* Unless required by applicable law or agreed to in writing, software
15
* distributed under the License is distributed on an "AS IS" BASIS,
16
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
* See the License for the specific language governing permissions and
18
* limitations under the License.
19
*
20
*/
21
22
#ifndef EVENTCONNECTION_H_
23
#define EVENTCONNECTION_H_
24
25
#include "
api/ClientHandler.h
"
26
#include "
core/EventReceiver.h
"
27
28
#include "
core/NodeEvent.h
"
29
#include "
core/GlobalEvent.h
"
30
#include "
core/CustodyEvent.h
"
31
#include "
net/BundleReceivedEvent.h
"
32
#include "
net/TransferAbortedEvent.h
"
33
#include "
net/TransferCompletedEvent.h
"
34
#include "
net/ConnectionEvent.h
"
35
#include "
routing/QueueBundleEvent.h
"
36
37
namespace
dtn
38
{
39
namespace
api
40
{
41
class
EventConnection
:
public
ProtocolHandler
,
42
public
dtn::core::EventReceiver
<dtn::core::NodeEvent>,
43
public
dtn::core::EventReceiver
<dtn::core::GlobalEvent>,
44
public
dtn::core::EventReceiver
<dtn::core::CustodyEvent>,
45
public
dtn::core::EventReceiver
<dtn::net::BundleReceivedEvent>,
46
public
dtn::core::EventReceiver
<dtn::net::TransferAbortedEvent>,
47
public
dtn::core::EventReceiver
<dtn::net::TransferCompletedEvent>,
48
public
dtn::core::EventReceiver
<dtn::net::ConnectionEvent>,
49
public
dtn::core::EventReceiver
<dtn::routing::QueueBundleEvent>
50
{
51
public
:
52
EventConnection
(
ClientHandler
&client, ibrcommon::socketstream &stream);
53
virtual
~EventConnection
();
54
55
void
run
();
56
void
finally
();
57
void
setup
();
58
void
__cancellation
()
throw
();
59
60
void
raiseEvent
(
const
dtn::core::NodeEvent
&evt)
throw
();
61
void
raiseEvent
(
const
dtn::core::GlobalEvent
&evt)
throw
();
62
void
raiseEvent
(
const
dtn::core::CustodyEvent
&evt)
throw
();
63
void
raiseEvent
(
const
dtn::net::BundleReceivedEvent
&evt)
throw
();
64
void
raiseEvent
(
const
dtn::net::TransferAbortedEvent
&evt)
throw
();
65
void
raiseEvent
(
const
dtn::net::TransferCompletedEvent
&evt)
throw
();
66
void
raiseEvent
(
const
dtn::net::ConnectionEvent
&evt)
throw
();
67
void
raiseEvent
(
const
dtn::routing::QueueBundleEvent
&evt)
throw
();
68
69
private
:
70
ibrcommon::Mutex _mutex;
71
bool
_running;
72
};
73
}
/* namespace api */
74
}
/* namespace dtn */
75
#endif
/* EVENTCONNECTION_H_ */
ClientHandler.h
QueueBundleEvent.h
dtn::core::EventReceiver
Definition:
EventReceiver.h:32
NodeEvent.h
dtn::api::EventConnection::raiseEvent
void raiseEvent(const dtn::core::NodeEvent &evt)
Definition:
EventConnection.cpp:40
dtn::net::ConnectionEvent
Definition:
ConnectionEvent.h:33
dtn::api::EventConnection::EventConnection
EventConnection(ClientHandler &client, ibrcommon::socketstream &stream)
Definition:
EventConnection.cpp:31
dtn::api::EventConnection::setup
void setup()
Definition:
EventConnection.cpp:345
dtn::core::CustodyEvent
Definition:
CustodyEvent.h:40
dtn::api::EventConnection::~EventConnection
virtual ~EventConnection()
Definition:
EventConnection.cpp:36
TransferAbortedEvent.h
dtn::api::EventConnection::run
void run()
Definition:
EventConnection.cpp:318
dtn::core::GlobalEvent
Definition:
GlobalEvent.h:31
TransferCompletedEvent.h
GlobalEvent.h
ConnectionEvent.h
dtn::api::ClientHandler
Definition:
ClientHandler.h:55
dtn::routing::QueueBundleEvent
Definition:
QueueBundleEvent.h:34
dtn::net::TransferCompletedEvent
Definition:
TransferCompletedEvent.h:33
dtn::api::ProtocolHandler
Definition:
ClientHandler.h:39
CustodyEvent.h
EventReceiver.h
dtn::api::EventConnection::__cancellation
void __cancellation()
Definition:
EventConnection.cpp:371
dtn::api::EventConnection
Definition:
EventConnection.h:41
dtn::net::TransferAbortedEvent
Definition:
TransferAbortedEvent.h:34
BundleReceivedEvent.h
dtn::net::BundleReceivedEvent
Definition:
BundleReceivedEvent.h:34
dtn::core::NodeEvent
Definition:
NodeEvent.h:42
daemon
src
api
EventConnection.h
Generated on Sun Jan 4 2015 15:27:32 for IBR-DTN by
1.8.6