class MAbstractDevice

Abstract base class shared by all PeerHood device classes.

Inheritance:


Public Methods

[more]virtual ~MAbstractDevice()
Default destructor.
[more]virtual const std::string& GetName() = 0
Returns device's name.
[more]virtual int GetChecksum() = 0
Returns device's name checksum.
[more]virtual const std::string& GetPrototype() = 0
Returns device's prototype id.
[more]virtual bool HasPeerHood() = 0
Tells whether the device has PeerHood enabled or not.
[more]virtual bool HasService(const std::string& aServiceName) = 0
Used to query if the device has some particular service.
[more]virtual TServiceList* GetServiceListL() = 0
Returns all services available on the device.
[more]virtual const std::string& GetAddress() = 0
Returns the address used by the device.


Documentation

Abstract base class shared by all PeerHood device classes. One class holds various information about one device: list of all available services, PeerHood capability etc.
ovirtual ~MAbstractDevice()
Default destructor. Currently this does nothing but is here because base classes without a destructor are <b><i>evil</i></b>.

Returns:
none

ovirtual const std::string& GetName() = 0
Returns the name of the device.

Returns:
the name of the device

ovirtual int GetChecksum() = 0
Returns the device name checksum

Returns:
the name of the device

ovirtual const std::string& GetPrototype() = 0
Returns device's prototype id. This id is unique for each network technology.

Returns:
the prototype id of the device

ovirtual bool HasPeerHood() = 0
Tells whether the device has PeerHood enabled or not. If there's no PeerHood then there are no services either. This function is somewhat unnecessary since devices without PeerHood should be of no interest. Anyway this function can be used to "sniff" the environment.

Returns:
true if the remote device has PeerHood enabled

ovirtual bool HasService(const std::string& aServiceName) = 0
Used to query if the device has some particular service present. The service can be accessible through any networking technology; this function doesn't make any difference between the technologies.

Parameters:
aServiceName - The name of the service to be queried.
Returns:
true if the device has the given service present

ovirtual TServiceList* GetServiceListL() = 0
Returns all services available on the device. The returned variable is a list that can be iterated via a <code>TServiceIterator</code> iterator. Note that caller is responsible of freeing the memory allocated for the returned list.

Returns:
list of all available services on the device

ovirtual const std::string& GetAddress() = 0
Returns the address used by the device. There's no formal shape for the returned address, because the exact address format is depending on the current transport medium.

Returns:
the address used by the device


Direct child classes:
CBaseDevice

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.