class CBaseDevice

Basic implementation of the MAbstractDevice interface.

Inheritance:


Public Methods

[more] ~CBaseDevice()
Destructor, deletes all associated service objects.
[more]void AddService(CService* aService)
Adds a new service to the device.
[more]const std::string& GetAddress()
Returns the address of the device.
[more]const std::string& GetName()
Returns the name of the device.
[more]bool HasPeerHood()
Tells whether the device has PeerHood enabled or not.
[more]const std::string& GetPrototype()
Returns device's prototype id.
[more]bool HasService(const std::string& aServiceName)
Used to query if the device has some particular service.
[more]TServiceList* GetServiceListL()
Returns all services available on the device.
[more]int GetChecksum()
Returns the checksum


Inherited from MAbstractDevice:


Documentation

<Basic implementation of the MAbstractDevice interface. This class contains only a minimum implementation of the interface.

o ~CBaseDevice()
Destructor, deletes all associated service objects.

Returns:
none

ovoid AddService(CService* aService)
Adds a new service to the device. No checking to the validity of the given service entry is performed, except the NULL check. If the given service is NULL then an assertion will take place.

Returns:
none

oconst std::string& GetAddress()
Returns the address of the device. This address should be the real address used by the device and recognized by the MAbstractConnection that has the same prototype as the device.

Returns:
the address of the device

oconst std::string& GetName()
Returns the name of the device. The name is actually an id that is unique for the device. It can be e.g. device's hardware address etc.

Returns:
the name of the device

obool HasPeerHood()
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

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

Returns:
the prototype id of the device

obool HasService(const std::string& aServiceName)
Used to query if the device has some particular service present. The cheking is done by iterating through the device's service list. This function executes in linear time.

Returns:
true if the device has the given service present

oTServiceList* GetServiceListL()
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

oint GetChecksum()
Returns the checksum. This checksum identifies the device if two devices contain same user-defined devicename Checksum is calculated using Daemon's process ID -number. NOTE: this is only temporary solution, try to find unique number!

Returns:
the checksum of the device.


Direct child classes:
CLibDevice
CDaemonDevice
See Also:
MAbstractDevice
CLibDevice
CDaemonDevice

Alphabetic index HTML hierarchy of classes or Java



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