IBR-DTNSuite  0.12
ibrcommon::LinkManager Class Referenceabstract

#include <LinkManager.h>

Inheritance diagram for ibrcommon::LinkManager:
Inheritance graph
Collaboration diagram for ibrcommon::LinkManager:
Collaboration graph

Classes

class  EventCallback
 

Public Member Functions

virtual ~LinkManager ()
 
virtual void up () throw ()
 
virtual void down () throw ()
 
virtual const ibrcommon::vinterface getInterface (int index) const =0
 
virtual const std::list< vaddressgetAddressList (const vinterface &iface, const std::string &scope="")=0
 
virtual void addEventListener (const vinterface &, LinkManager::EventCallback *) throw ()
 
virtual void removeEventListener (const vinterface &, LinkManager::EventCallback *) throw ()
 
virtual void removeEventListener (LinkManager::EventCallback *) throw ()
 
void raiseEvent (const LinkEvent &lme)
 
std::set< vinterfacegetMonitoredInterfaces ()
 

Static Public Member Functions

static LinkManagergetInstance ()
 
static void initialize ()
 
static void setLinkRequestInterval (size_t interval)
 
static size_t getLinkRequestInterval ()
 

Protected Types

typedef std::set
< LinkManager::EventCallback * > 
callback_set
 
typedef std::map
< ibrcommon::vinterface,
callback_set
listener_map
 

Protected Attributes

ibrcommon::Mutex _listener_mutex
 
listener_map _listener
 

Static Protected Attributes

static size_t _link_request_interval = 5000
 

Detailed Description

Definition at line 35 of file LinkManager.h.

Member Typedef Documentation

Definition at line 87 of file LinkManager.h.

Definition at line 88 of file LinkManager.h.

Constructor & Destructor Documentation

virtual ibrcommon::LinkManager::~LinkManager ( )
inlinevirtual

Definition at line 45 of file LinkManager.h.

Member Function Documentation

virtual void ibrcommon::LinkManager::down ( )
throw (
)
inlinevirtual
virtual const std::list<vaddress> ibrcommon::LinkManager::getAddressList ( const vinterface iface,
const std::string &  scope = "" 
)
pure virtual
virtual const ibrcommon::vinterface ibrcommon::LinkManager::getInterface ( int  index) const
pure virtual
size_t ibrcommon::LinkManager::getLinkRequestInterval ( )
static

Get the interval for checking address changes on interfaces

Definition at line 137 of file LinkManager.cpp.

References _link_request_interval.

Referenced by ibrcommon::LinkMonitor::run().

std::set< vinterface > ibrcommon::LinkManager::getMonitoredInterfaces ( )

Definition at line 142 of file LinkManager.cpp.

References _listener, and _listener_mutex.

Referenced by ibrcommon::LinkMonitor::remove(), and ibrcommon::LinkMonitor::run().

void ibrcommon::LinkManager::initialize ( )
static

Initialize the LinkManager

Definition at line 58 of file LinkManager.cpp.

References getInstance(), and up().

Here is the call graph for this function:

void ibrcommon::LinkManager::removeEventListener ( LinkManager::EventCallback cb)
throw (
)
virtual

Reimplemented in ibrcommon::Win32LinkManager, and ibrcommon::PosixLinkManager.

Definition at line 91 of file LinkManager.cpp.

void ibrcommon::LinkManager::setLinkRequestInterval ( size_t  interval)
static

Set the interval for checking address changes on interfaces

Definition at line 132 of file LinkManager.cpp.

References _link_request_interval.

virtual void ibrcommon::LinkManager::up ( )
throw (
)
inlinevirtual

Reimplemented in ibrcommon::NetLinkManager, ibrcommon::Win32LinkManager, and ibrcommon::PosixLinkManager.

Definition at line 47 of file LinkManager.h.

Referenced by initialize().

Member Data Documentation

size_t ibrcommon::LinkManager::_link_request_interval = 5000
staticprotected

Definition at line 91 of file LinkManager.h.

Referenced by getLinkRequestInterval(), and setLinkRequestInterval().

listener_map ibrcommon::LinkManager::_listener
protected

Definition at line 89 of file LinkManager.h.

Referenced by getMonitoredInterfaces(), and raiseEvent().

ibrcommon::Mutex ibrcommon::LinkManager::_listener_mutex
protected

Definition at line 85 of file LinkManager.h.

Referenced by getMonitoredInterfaces(), and raiseEvent().


The documentation for this class was generated from the following files: