CBTDevice Class Reference
class CBTDevice : public CBase |
Encapsulates all information that must be known about a device.
Stores useful information concerning a remote device, including names
Constructor & Destructor Documentation
CBTDevice()
Constructor. Use NewL() or NewLC() to create an object of this type instead of this constructor.
Member Functions Documentation
AssignL(CBTDevice &)
Effectively operator=, but can leave.
- leave
- This method will leave if an error occurs.
Parameters
CBTDevice & aDevice | The device details to assign to this object. |
CommonConstructL()
void | CommonConstructL | ( | ) | [private] |
CompareTo(const CBTDevice &)
Parameters
const CBTDevice & aDevice | instance against which this is compared |
ConstructL()
void | ConstructL | ( | ) | [private] |
ConstructL(const TBTDevAddr &)
ConstructL(const TBTNamelessDevice &)
CopyL()
Copies the contents of this into a new
CBTDevice object.
- leave
- This method will leave if an error occurs.
DeleteLinkKey()
IMPORT_C void | DeleteLinkKey | ( | ) | |
Ensure that the previously known link key is discarded
DeviceName()
IMPORT_C const TDesC8 & | DeviceName | ( | ) | const |
Returns the name of the device
ExternalizeL(RWriteStream &)
Externalise this object to aStream.
- leave
- This method will leave if an error occurs.
Parameters
RWriteStream & aStream | The stream to which this object will be written. |
FriendlyName()
IMPORT_C const TDesC & | FriendlyName | ( | ) | const |
Returns the friendly name of the device
GlobalSecurity()
Get the global security settings.
InternalizeL(RReadStream &)
Internalize this object from aStream.
- leave
- This method will leave if an error occurs.
Parameters
RReadStream & aStream | The stream from which this object shall be internalized. |
IsPaired()
IMPORT_C TBool | IsPaired | ( | ) | const |
Check whether the device is paired.
IsValidBDAddr()
IMPORT_C TBool | IsValidBDAddr | ( | ) | const |
Denotes whether the device address has been set.
IsValidDeviceClass()
IMPORT_C TBool | IsValidDeviceClass | ( | ) | const |
Denotes whether the device class has been set.
IsValidDeviceName()
IMPORT_C TBool | IsValidDeviceName | ( | ) | const |
Has the name of the device been set?
IsValidFriendlyName()
IMPORT_C TBool | IsValidFriendlyName | ( | ) | const |
Has the friendly name of the device been set?
IsValidGlobalSecurity()
IMPORT_C TBool | IsValidGlobalSecurity | ( | ) | const |
Denotes whether the global security settings have been set.
IsValidLinkKey()
IMPORT_C TBool | IsValidLinkKey | ( | ) | const |
Denotes whether the link key has been set, and hence whether this is a paired device.
IsValidPaired()
IMPORT_C TBool | IsValidPaired | ( | ) | const |
Denotes whether the device is paired has been set.
IsValidPassKey()
IMPORT_C TBool | IsValidPassKey | ( | ) | const |
Denotes whether the PIN code has been set.
IsValidSeen()
IMPORT_C TBool | IsValidSeen | ( | ) | const |
Denotes whether the time last seen has been set.
IsValidUiCookie()
IMPORT_C TBool | IsValidUiCookie | ( | ) | const |
Denotes whether the UI Cookie has been set.
IsValidUsed()
IMPORT_C TBool | IsValidUsed | ( | ) | const |
Denotes whether the time last used has been set.
NewL(const TBTDevAddr &)
Two-phase constructor Create a device and set its address.
- leave
- This method will leave if an error occurs.
Parameters
const TBTDevAddr & aBDAddr | the address of the device to which this class refers |
NewL(const TBTNamelessDevice &)
Two-phase copy constructor Create a device based on the smaller nameless device
- leave
- This method will leave if an error occurs.
NewL()
Two-phase default constructor Create an empty device.
- leave
- This method will leave if an error occurs.
NewLC(const TBTDevAddr &)
Two-phase constructor
- leave
- This method will leave if an error occurs.
Parameters
const TBTDevAddr & aBDAddr | the address of the device to which this class refers |
NewLC(const TBTNamelessDevice &)
Two-phase copy constructor Create a device based on the smaller nameless device
- leave
- This method will leave if an error occurs.
NewLC()
Two-phase default constructor Create an empty device. The object will be placed on the cleanupstack and must be removed by the caller.
- leave
- This method will leave if an error occurs.
PassKeyLength()
IMPORT_C TUint | PassKeyLength | ( | ) | const |
Seen()
IMPORT_C const TTime & | Seen | ( | ) | const |
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.
SetDeviceAddress(const TBTDevAddr &)
IMPORT_C void | SetDeviceAddress | ( | const TBTDevAddr & | aBDAddr | ) | |
Parameters
const TBTDevAddr & aBDAddr | the address of the device |
SetDeviceClass(TBTDeviceClass)
SetDeviceNameL(const TDesC8 &)
IMPORT_C void | SetDeviceNameL | ( | const TDesC8 & | aName | ) | |
Set the device name.
- leave
- This method will leave if an error occurs.
Parameters
const TDesC8 & aName | device name |
SetFriendlyNameL(const TDesC &)
IMPORT_C void | SetFriendlyNameL | ( | const TDesC & | aName | ) | |
Set the friendly name.
- leave
- This method will leave if an error occurs.
Parameters
const TDesC & aName | friendly name of the device |
SetGlobalSecurity(const TBTDeviceSecurity &)
Set the global security settings.
SetLinkKey(const TBTLinkKey &)
IMPORT_C void | SetLinkKey | ( | const TBTLinkKey & | aLinkKey | ) | |
Parameters
const TBTLinkKey & aLinkKey | the link key of the device |
SetLinkKey(const TBTLinkKey &, TBTLinkKeyType)
Set the link key type of the device.
SetPaired(TBool)
IMPORT_C void | SetPaired | ( | TBool | aPaired | ) | |
Parameters
TBool aPaired | Whether the device is paired |
SetPaired(TBTLinkKeyType)
Set whether the link key type when the device is paired;
SetPassKey(const TBTPinCode &)
IMPORT_C void | SetPassKey | ( | const TBTPinCode & | aPassKey | ) | |
Parameters
const TBTPinCode & aPassKey | the PIN code of the device |
SetSeen(const TTime &)
IMPORT_C void | SetSeen | ( | const TTime & | aDateTime | ) | |
Set the time when the device was last seen.
Parameters
const TTime & aDateTime | The time when the device was last seen. |
SetUiCookie(TUint32)
IMPORT_C void | SetUiCookie | ( | TUint32 | aUiCookie | ) | |
Sets the UI Cookie for the device. The format of the cookie is specific to the UI using the field.
Parameters
TUint32 aUiCookie | The 32bit cookie value. |
SetUsed(const TTime &)
IMPORT_C void | SetUsed | ( | const TTime & | aDateTime | ) | |
Set the time when the device was last used.
Parameters
const TTime & aDateTime | The time when the device was last used. |
UiCookie()
Returns the UI Cookie value associated with the device. The format of the cookie is specific to the UI using the field.
UpdateL(const CBTDevice &)
IMPORT_C void | UpdateL | ( | const CBTDevice & | aDevice | ) | |
Copies the contents of aDevice into *this
- leave
- This method will leave if an error occurs.
Used()
IMPORT_C const TTime & | Used | ( | ) | const |
Get the time when the device was last connected to.
operator!=(const CBTDevice &)
Parameters
const CBTDevice & aDevice | instance against which this is compared |
operator==(const CBTDevice &)
Parameters
const CBTDevice & aDevice | instance against which this is compared |
Member Enumerations Documentation
Enum TBTDeviceNameSelector
Describes the similarities between two devices.
Enumerators
EDeviceName = 0x40000000 |
Device name.
|
EFriendlyName = 0x80000000 |
Friendly name.
|
EAllNameProperties = 0xff000000 |
All name properties
|
ELast = KMaxTUint |
Last enum. This is NOT a name property
|
Member Data Documentation
const TUint32 KStreamVersion
const TUint32 | KStreamVersion | [private, static] |
TBTNamelessDevice
iDevice
HBufC * iFriendlyName
HBufC * | iFriendlyName | [private] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.