Abstract base class shared by all PeerHood device classes.
Inheritance:
Public Methods
-
virtual ~MAbstractDevice()
- Default destructor.
-
virtual const std::string& GetName() = 0
- Returns device's name.
-
virtual int GetChecksum() = 0
- Returns device's name checksum.
-
virtual const std::string& GetPrototype() = 0
- Returns device's prototype id.
-
virtual bool HasPeerHood() = 0
- Tells whether the device has PeerHood enabled or not.
-
virtual bool HasService(const std::string& aServiceName) = 0
- Used to query if the device has some particular service.
-
virtual TServiceList* GetServiceListL() = 0
- Returns all services available on the device.
-
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.
virtual ~MAbstractDevice()
-
Default destructor. Currently this does nothing but is here because
base classes without a destructor are <b><i>evil</i></b>.
- Returns:
- none
virtual const std::string& GetName() = 0
-
Returns the name of the device.
- Returns:
- the name of the device
virtual int GetChecksum() = 0
-
Returns the device name checksum
- Returns:
- the name of the device
virtual 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
virtual 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
virtual 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
virtual 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
virtual 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++.