• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ibrcommon/ibrcommon/net/LinkManager.h

Go to the documentation of this file.
00001 /*
00002  * LinkManager.h
00003  *
00004  *  Created on: 21.12.2010
00005  *      Author: morgenro
00006  */
00007 
00008 #ifndef LINKMANAGER_H_
00009 #define LINKMANAGER_H_
00010 
00011 #include "ibrcommon/net/vinterface.h"
00012 #include "ibrcommon/net/vaddress.h"
00013 #include <string>
00014 
00015 namespace ibrcommon
00016 {
00017         class LinkManager
00018         {
00019         public:
00020                 class EventCallback
00021                 {
00022                 public:
00023                         virtual ~EventCallback() {};
00024                         virtual void eventInterfaceChanged(const vinterface &iface) = 0;
00025                 };
00026 
00027                 virtual ~LinkManager() {};
00028 
00029                 virtual const std::string getInterface(int index) const = 0;
00030                 virtual const std::list<vaddress> getAddressList(const vinterface &iface, const vaddress::Family f) = 0;
00031 
00032                 virtual void registerInterfaceEvent(const vinterface&, LinkManager::EventCallback*) { };
00033                 virtual void unregisterInterfaceEvent(const vinterface&, LinkManager::EventCallback*) { };
00034                 virtual void unregisterAllEvents(LinkManager::EventCallback*) { };
00035 
00036                 static LinkManager& getInstance();
00037                 static void initialize();
00038         };
00039 
00040         class DefaultLinkManager : public LinkManager
00041         {
00042         public:
00043                 DefaultLinkManager();
00044                 virtual ~DefaultLinkManager();
00045 
00046                 const std::string getInterface(int index) const;
00047                 const std::list<vaddress> getAddressList(const vinterface &iface, const vaddress::Family f);
00048         };
00049 }
00050 
00051 #endif /* LINKMANAGER_H_ */

Generated on Thu Mar 10 2011 15:44:03 for IBR-DTNSuite by  doxygen 1.7.1