»
Symbian OS v9.3 »
Symbian OS reference »
C++ component reference »
Bluetooth BLUETOOTH_MANAGER »
CBTDevice
Location:
btdevice.h
Link against: btdevice.lib
class CBTDevice : public CBase;
Description
Encapsulates all information that must be known about a device.
Stores useful information concerning a remote device, including names
Derivation
CBase
- Base class for all classes to be instantiated on the heap
CBTDevice
- Encapsulates all information that must be known about a device
Members
Defined in CBTDevice
:
AsNamelessDevice()
, AsNamelessDevice()
, AssignL()
, BDAddr()
, CompareTo()
, CopyL()
, DeleteLinkKey()
, DeviceClass()
, DeviceName()
, EAllNameProperties
, EDeviceName
, EFriendlyName
, ELast
, ExternalizeL()
, FriendlyName()
, GlobalSecurity()
, InternalizeL()
, IsPaired()
, IsValidBDAddr()
, IsValidDeviceClass()
, IsValidDeviceName()
, IsValidFriendlyName()
, IsValidGlobalSecurity()
, IsValidLinkKey()
, IsValidPaired()
, IsValidPassKey()
, IsValidSeen()
, IsValidUsed()
, LinkKey()
, NewL()
, NewL()
, NewL()
, NewLC()
, NewLC()
, NewLC()
, PassKey()
, PassKeyLength()
, Seen()
, SetDeviceAddress()
, SetDeviceClass()
, SetFriendlyNameL()
, SetGlobalSecurity()
, SetPaired()
, SetSeen()
, SetUsed()
, TBTDeviceNameSelector
, UpdateL()
, Used()
, operator!=()
, operator==()
, ~CBTDevice()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
Construction and destruction
static IMPORT_C CBTDevice *NewL(const TBTDevAddr &aBDAddr);
Description
Two-phase constructor Create a device and set its address.
Parameters
const TBTDevAddr &aBDAddr |
the address of the device to which this class refers
|
|
Return value
Leave codes
This |
method will leave if an error occurs.
|
|
static IMPORT_C CBTDevice *NewLC(const TBTDevAddr &aBDAddr);
Description
Two-phase constructor
Parameters
const TBTDevAddr &aBDAddr |
the address of the device to which this class refers
|
|
Return value
CBTDevice *
|
The new CBTDevice object. The object will be left on the cleanupstack.
|
|
Leave codes
This |
method will leave if an error occurs.
|
|
static IMPORT_C CBTDevice *NewL(const TBTNamelessDevice &aNamelessDevice);
Description
Two-phase copy constructor Create a device based on the smaller nameless device
Parameters
Return value
Leave codes
This |
method will leave if an error occurs.
|
|
static IMPORT_C CBTDevice *NewLC(const TBTNamelessDevice &aNamelessDevice);
Description
Two-phase copy constructor Create a device based on the smaller nameless device
Parameters
Return value
CBTDevice *
|
this Device, placed on the cleanupstack.
|
|
Leave codes
This |
method will leave if an error occurs.
|
|
static IMPORT_C CBTDevice *NewL();
Description
Two-phase default constructor Create an empty device.
Return value
Leave codes
This |
method will leave if an error occurs.
|
|
static IMPORT_C CBTDevice *NewLC();
Description
Two-phase default constructor Create an empty device. The object will be placed on the cleanupstack and must be removed by
the caller.
Return value
Leave codes
This |
method will leave if an error occurs.
|
|
IMPORT_C ~CBTDevice();
Description
Destructor.
IMPORT_C CBTDevice *CopyL() const;
Description
Copies the contents of this into a new CBTDevice object.
Return value
Leave codes
This |
method will leave if an error occurs.
|
|
IMPORT_C void UpdateL(const CBTDevice &aDevice);
Description
Copies the contents of aDevice into *this
Parameters
Leave codes
This |
method will leave if an error occurs.
|
|
IMPORT_C void AssignL(CBTDevice &aDevice);
Description
Effectively operator=, but can leave.
Parameters
CBTDevice &aDevice |
The device details to assign to this object.
|
|
Leave codes
This |
method will leave if an error occurs.
|
|
IMPORT_C const TDesC8 &DeviceName() const;
Description
Returns the name of the device
Return value
const TDesC8 & |
The device name. If the device has no name, a zero-length descriptor will be returned.
|
|
IMPORT_C const TDesC &FriendlyName() const;
Description
Returns the friendly name of the device
Return value
const TDesC & |
The friendly name. If the device has no friendly name, a zero-length descriptor will be returned.
|
|
IMPORT_C void SetFriendlyNameL(const TDesC &aName);
Description
Set the friendly name.
Parameters
const TDesC &aName |
friendly name of the device
|
|
Leave codes
This |
method will leave if an error occurs.
|
|
IMPORT_C TBool IsValidDeviceName() const;
Description
Has the name of the device been set?
Return value
TBool
|
ETrue=>device name has been set, otherwise EFalse
|
|
IMPORT_C TBool IsValidFriendlyName() const;
Description
Has the friendly name of the device been set?
Return value
TBool
|
ETrue=>device name has been set, otherwise EFalse
|
|
IMPORT_C TBool operator==(const CBTDevice &aDevice) const;
Description
Equality operator
Parameters
const CBTDevice &aDevice |
instance against which this is compared
|
|
Return value
TBool
|
ETrue if aDevice==this
|
|
IMPORT_C TBool operator!=(const CBTDevice &aDevice) const;
Description
Inequality operator
Parameters
const CBTDevice &aDevice |
instance against which this is compared
|
|
Return value
TBool
|
ETrue if aDevice!=this
|
|
IMPORT_C TUint CompareTo(const CBTDevice &aDevice) const;
Description
Compares two devices.
Parameters
const CBTDevice &aDevice |
instance against which this is compared
|
|
Return value
TUint
|
bit field (values of TBTDeviceComparisonResult) describing the similarities.
|
|
IMPORT_C void ExternalizeL(RWriteStream &aStream) const;
Description
Externalise this object to aStream.
Parameters
RWriteStream &aStream |
The stream to which this object will be written.
|
|
Leave codes
This |
method will leave if an error occurs.
|
|
IMPORT_C void InternalizeL(RReadStream &aStream);
Description
Internalize
this object from aStream.
Parameters
RReadStream &aStream |
The stream from which this object shall be internalized.
|
|
Leave codes
This |
method will leave if an error occurs.
|
|
IMPORT_C const TBTDevAddr &BDAddr() const;
Description
Get the device address.
Return value
IMPORT_C const TBTLinkKey &LinkKey() const;
Description
Get the link key.
Return value
IMPORT_C TBTDeviceClass DeviceClass() const;
Description
Get the device class.
Return value
IMPORT_C const TBTDeviceSecurity GlobalSecurity() const;
Description
Get the global security settings.
Return value
IMPORT_C void SetDeviceAddress(const TBTDevAddr &aBDAddr);
Description
Set the device address.
Parameters
const TBTDevAddr &aBDAddr |
the address of the device
|
|
IMPORT_C void SetDeviceClass(TBTDeviceClass aDeviceClass);
Description
Set the device class.
Parameters
IMPORT_C void SetGlobalSecurity(const TBTDeviceSecurity &aSetting);
Description
Set the global security settings.
Parameters
IMPORT_C void DeleteLinkKey();
Description
Ensure that the previously known linkkey is discarded
IMPORT_C TBool IsValidBDAddr() const;
Description
Denotes whether the device address has been set.
Return value
TBool
|
ETrue if address has been set
|
|
IMPORT_C TBool IsValidDeviceClass() const;
Description
Denotes whether the device class has been set.
Return value
TBool
|
ETrue if DeviceClass has been set
|
|
IMPORT_C TBool IsValidLinkKey() const;
Description
Denotes whether the link key has been set, and hence whether this is a paired device.
Return value
TBool
|
ETrue if Linkkey has been set
|
|
IMPORT_C TBool IsValidGlobalSecurity() const;
Description
Denotes whether the global security settings have been set.
Return value
TBool
|
ETrue if security override has been set
|
|
IMPORT_C const TTime &Seen() const;
Description
Get the time when the device was last seen. Note that this feature is not yet implemented in the bluetooth stack, and the
method CBTDevice::Used()
should be used instead.
Return value
const TTime & |
The time when the device was last seen.
|
|
IMPORT_C const TTime &Used() const;
Description
Get the time when the device was last connected to.
Return value
const TTime & |
The time when the device was last used.
|
|
IMPORT_C void SetUsed(const TTime &aDateTime);
Description
Set the time when the device was last used.
Parameters
const TTime &aDateTime |
The time when the device was last used.
|
|
IMPORT_C void SetSeen(const TTime &aDateTime);
Description
Set the time when the device was last seen.
Parameters
const TTime &aDateTime |
The time when the device was last seen.
|
|
IMPORT_C TBool IsValidUsed() const;
Description
Denotes whether the time last used has been set.
Return value
TBool
|
ETrue if time last used has been set
|
|
IMPORT_C TBool IsValidSeen() const;
Description
Denotes whether the time last seen has been set.
Return value
TBool
|
ETrue if time last seen has been set
|
|
IMPORT_C TBTNamelessDevice &AsNamelessDevice();
Description
Get the TBTNamelessDevice
portion of this.
Return value
IMPORT_C const TBTNamelessDevice &AsNamelessDevice() const;
Description
Get the TBTNamelessDevice
portion of this.
Return value
IMPORT_C TBool IsPaired() const;
Description
Check whether the device is paired.
Return value
TBool
|
ETrue if the device is paired.
|
|
IMPORT_C void SetPaired(TBool aPaired);
Description
Set whether the device is paired;
Parameters
TBool aPaired |
Whether the device is paired
|
|
IMPORT_C TBool IsValidPaired() const;
Description
Denotes whether the device is paired has been set.
Return value
TBool
|
ETrue if whether the device is paired has been set.
|
|
IMPORT_C const TBTPinCode &PassKey() const;
Description
Get the pin code
Return value
IMPORT_C TBool IsValidPassKey() const;
Description
Denotes whether in code has been set.
Return value
TBool
|
ETrue if whether the pin code has been set.
|
|
IMPORT_C TUint PassKeyLength() const;
Description
Get the pin code length
Return value
TUint
|
The pin code length
|
|
Enum TBTDeviceNameSelector
TBTDeviceNameSelector
Description
Describes the similarities between two devices.