Basic implementation of the MAbstractDevice interface.
Inheritance:
Public Methods
-
~CBaseDevice()
- Destructor, deletes all associated service objects.
-
void AddService(CService* aService)
- Adds a new service to the device.
-
const std::string& GetAddress()
- Returns the address of the device.
-
const std::string& GetName()
- Returns the name of the device.
-
bool HasPeerHood()
- Tells whether the device has PeerHood enabled or not.
-
const std::string& GetPrototype()
- Returns device's prototype id.
-
bool HasService(const std::string& aServiceName)
- Used to query if the device has some particular service.
-
TServiceList* GetServiceListL()
- Returns all services available on the device.
-
int GetChecksum()
- Returns the checksum
Documentation
<Basic implementation of the MAbstractDevice interface. This class
contains only a minimum implementation of the interface.
~CBaseDevice()
-
Destructor, deletes all associated service objects.
- Returns:
- none
void 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
const 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
const 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
bool 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
const std::string& GetPrototype()
-
Returns device's prototype id. This id is unique for each network
technology.
- Returns:
- the prototype id of the device
bool 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
TServiceList* 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
int 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++.