class TBTDevAddr |
48-bit bluetooth device address. Each bluetooth device has a unique address built into the hardware, which is represented by this class. Used for identifying remote addresses. The interface operates in a big-endian manner -- e.g. addr[0] refers to the most significant byte of the address. This is the same ordering as the addresses would naturally be written down on paper.
Public Member Functions | |
---|---|
TBTDevAddr () | |
TBTDevAddr (const TInt64 &) | |
TBTDevAddr (const TDesC8 &) | |
IMPORT_C TPtr8 | Des () |
IMPORT_C const TPtrC8 | Des () |
IMPORT_C void | GetReadable ( TDes &) |
IMPORT_C void | GetReadable ( TDes &, const TDesC &, const TDesC &, const TDesC &) |
IMPORT_C void | Reset () |
IMPORT_C TInt | SetReadable (const TDesC &) |
IMPORT_C TBool | operator!= (const TBTDevAddr &) |
IMPORT_C TBool | operator<= (const TBTDevAddr &) |
IMPORT_C TBool | operator== (const TBTDevAddr &) |
IMPORT_C const TUint8 & | operator[] ( TInt ) |
IMPORT_C TUint8 & | operator[] ( TInt ) |
Private Attributes | |
---|---|
TFixedArray < TUint8 , KBTDevAddrSize > | iAddr |
TUint16 | iPadding |
IMPORT_C | TBTDevAddr | ( | const TInt64 & | aInt | ) |
Constructs a device address from a TInt64.
The function panics if the most significant 16 bits of aInt are non-zero, as device addresses are 48 bits in size.
const TInt64 & aInt | Value for device address. |
IMPORT_C | TBTDevAddr | ( | const TDesC8 & | aDes | ) |
Constructs a device address from a data buffer.
The buffer is copied directly into the object. The function panics if aDes does not have a length of 6 bytes (48 bits).
const TDesC8 & aDes | Data buffer for device address |
IMPORT_C void | GetReadable | ( | TDes & | aDest | ) | const |
Extract the Bluetooth device address into a human-readable format, in aDest.
Output is in hexadecimal bigendian format, with no padding characters.
Note: aDest must be large enough to hold the entire output, or else a a panic will occur.
TDes & aDest | Descriptor where result is placed. |
IMPORT_C void | GetReadable | ( | TDes & | aDest, |
const TDesC & | aPrepend, | |||
const TDesC & | aByteSeperator, | |||
const TDesC & | aAppend | |||
) | const |
Extract the Bluetooth device address into a human-readable format, in aDest.
Output is in hexadecimal bigendian format, with optional padding characters.
Note: aDest must be large enough to hold the entire output, or else a a panic will occur.
IMPORT_C TInt | SetReadable | ( | const TDesC & | aSource | ) |
Convert Readable string into a dev addr.
Address may have leading space and "0x" characters.
const TDesC & aSource | Readable Hex representation of address |
IMPORT_C TBool | operator!= | ( | const TBTDevAddr & | aAddr | ) | const |
Inequality operator.
const TBTDevAddr & aAddr | The device address to compare to this object. |
IMPORT_C TBool | operator<= | ( | const TBTDevAddr & | aAddr | ) | const |
Less than operator.
const TBTDevAddr & aAddr | The device address to compare to this object. |
IMPORT_C TBool | operator== | ( | const TBTDevAddr & | aAddr | ) | const |
Comparison operator.
const TBTDevAddr & aAddr | The device address to compare to this object. |
IMPORT_C const TUint8 & | operator[] | ( | TInt | aIndex | ) | const |
Access a single element of the address.
TInt aIndex | The index of the element to access. |
IMPORT_C TUint8 & | operator[] | ( | TInt | aIndex | ) |
Access a single element of the address.
TInt aIndex | The index of the element to access. |
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.