IBR-DTNSuite  0.10
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 
27  {
28  // raise the new event
30  }
31 
32  const std::string P2PDialupEvent::getName() const
33  {
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 
51  const std::string P2PDialupEvent::className = "P2PDialupEvent";
52  } /* namespace net */
53 } /* namespace dtn */