PInterfaceMonitorClient Class Reference

#include <psockbun.h>

Inheritance diagram for PInterfaceMonitorClient:

PSafeObject PObject PMonitoredSockets PMonitoredSocketBundle PSingleMonitoredSocket List of all members.

Public Types

typedef PIPSocket::InterfaceEntry InterfaceEntry

Public Member Functions

 PInterfaceMonitorClient ()
 ~PInterfaceMonitorClient ()
virtual PStringArray GetInterfaces (BOOL includeLoopBack=FALSE, const PIPSocket::Address &destination=PIPSocket::GetDefaultIpAny())
virtual BOOL GetInterfaceInfo (const PString &iface, InterfaceEntry &info)

Protected Member Functions

virtual void OnAddInterface (const InterfaceEntry &entry)=0
 Call back function for when an interface has been added to the system.
virtual void OnRemoveInterface (const InterfaceEntry &entry)=0
 Call back function for when an interface has been removed from the system.

Friends

class PInterfaceMonitor

Detailed Description

This is a base class for clients of the PInterfaceMonitor singleton object. The OnAddInterface() and OnRemoveInterface() functions are called in the context of a thread that is monitoring interfaces. The client object is locked for Read/Write before these functions are called.


Member Typedef Documentation

typedef PIPSocket::InterfaceEntry PInterfaceMonitorClient::InterfaceEntry


Constructor & Destructor Documentation

PInterfaceMonitorClient::PInterfaceMonitorClient (  ) 

PInterfaceMonitorClient::~PInterfaceMonitorClient (  ) 


Member Function Documentation

virtual PStringArray PInterfaceMonitorClient::GetInterfaces ( BOOL  includeLoopBack = FALSE,
const PIPSocket::Address destination = PIPSocket::GetDefaultIpAny() 
) [virtual]

Get an array of all current interface descriptors, possibly including the loopback (127.0.0.1) interface. Note the names are of the form ipname, eg "10.0.1.11%3Com 3C90x Ethernet Adapter" or "192.168.0.10%eth0". If destination is not 'any' and a filter is set, filters the interface list before returning it.

Parameters:
destination  Flag for if loopback is to included in list destination

Reimplemented in PSingleMonitoredSocket.

virtual BOOL PInterfaceMonitorClient::GetInterfaceInfo ( const PString iface,
InterfaceEntry info 
) [virtual]

Return information about an active interface given the descriptor string. Note that when searchin the descriptor may be a partial match e.g. "10.0.1.11" or "%eth0" may be used.

Parameters:
info  Interface desciptor name Information on the interface

virtual void PInterfaceMonitorClient::OnAddInterface ( const InterfaceEntry entry  )  [protected, pure virtual]

Call back function for when an interface has been added to the system.

Implemented in PMonitoredSocketBundle.

virtual void PInterfaceMonitorClient::OnRemoveInterface ( const InterfaceEntry entry  )  [protected, pure virtual]

Call back function for when an interface has been removed from the system.

Implemented in PMonitoredSocketBundle.


Friends And Related Function Documentation

friend class PInterfaceMonitor [friend]


The documentation for this class was generated from the following file:
Generated on Fri Mar 7 06:25:06 2008 for PTLib by  doxygen 1.5.1