IBR-DTN  1.0.0
P2PDialupEvent.cpp
Go to the documentation of this file.
1 /*
2  * P2PDialupEvent.cpp
3  *
4  * Created on: 25.02.2013
5  * Author: morgenro
6  */
7 
8 #include "net/P2PDialupEvent.h"
9 #include "core/EventDispatcher.h"
10 
11 namespace dtn
12 {
13  namespace net
14  {
15  P2PDialupEvent::P2PDialupEvent(p2p_event_type t, const ibrcommon::vinterface &i)
16  : type(t), iface(i)
17  {
18 
19  }
20 
22  {
23 
24  }
25 
26  void P2PDialupEvent::raise(p2p_event_type t, const ibrcommon::vinterface &i)
27  {
28  // raise the new event
30  }
31 
32  const std::string P2PDialupEvent::getName() const
33  {
34  return "P2PDialupEvent";
35  }
36 
37 
38  std::string P2PDialupEvent::getMessage() const
39  {
40  switch (type)
41  {
42  case INTERFACE_UP:
43  return "interface " + iface.toString() + " up";
44  case INTERFACE_DOWN:
45  return "interface " + iface.toString() + " down";
46  }
47 
48  return "unknown event";
49  }
50  } /* namespace net */
51 } /* namespace dtn */
const ibrcommon::vinterface iface
static void queue(E *evt)
const p2p_event_type type
std::string getMessage() const
static void raise(p2p_event_type, const ibrcommon::vinterface &)
const std::string getName() const