Defines the PeerHood Pinger interface.
Inheritance:
Public Methods
-
MAbstractPinger(const std::string& aAddress)
- Constructor.
-
virtual ~MAbstractPinger()
- Default destructor.
-
virtual const std::string& GetAddress() = 0
- Returns remote device's address.
-
virtual bool InRange() = 0
- Tells whether a device is in range or not.
-
virtual bool Ping() = 0
- "Pings" a remote device, i.e. checks if the device is present.
Documentation
Defines the PeerHood Pinger interface. The methods in this interface
are used when monitoring the presence of a remote device. Each networking
technology requires its own implementation of this class, so the actual
monitoring method is technology specific issue. Instances of this class are
created transparently via the corresponding Creator classes.
MAbstractPinger(const std::string& aAddress)
-
Constructor, initializes the class so that the <code>Ping</code>
method can be called immediately after the construction has finished. The
target address is the same during the created object's lifetime.
- Parameters:
- aAddress - The address of the remote device.
- Returns:
- none
virtual ~MAbstractPinger()
-
Default destructor. Currently this does nothing but is here because
virtual base classes without a destructor are <b><i>evil</i></b>.
- Returns:
- none
virtual const std::string& GetAddress() = 0
-
Return the address of the device under monitoring.
- Returns:
- remote device's address
virtual bool InRange() = 0
-
Tells whether a device is in range or not.
- Returns:
- true if the device is in range
virtual bool Ping() = 0
-
"Pings" a remote device, i.e. checks if the device is present or not.
The actual implementation is not restricted to use the traditional ping
function. Instead, any methology suitable for the networking techology in
question can be used.
- Returns:
- true if the remote device is present
- Direct child classes:
- CWLANPinger
CGPRSPinger
CBTPinger
- See Also:
- MAbstractCreator
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.