TBluetoothNameRecordWrapper Class Reference

#include <bttypes.h>

class TBluetoothNameRecordWrapper

Detailed Description

Extended Inquiry Response Class This class takes a reference from inquiry result, which could hold both local name and Extended Inquiry Response. It provides API to parse and return the local name and data for any Extended Inquiry Response tag. To get Device Name, Manufacturer Specific Data or Flags, firstly getting length of the data, and then allocating a suitable buffer, which is where the data will be placed.

Constructor & Destructor Documentation

TBluetoothNameRecordWrapper ( const TNameRecord & )

IMPORT_CTBluetoothNameRecordWrapper(const TNameRecord &aNameRecord)[explicit]

Constructs an TBluetoothNameRecordWrapper object from an TNameRecord object. The reference of aNameRecord is stored in the object. This will contain sensible data only if KHostResEir was used in the Inquiry

ParameterDescription
aNameRecordfor Device Name and Extended Inquiry Response

Member Function Documentation

GetDeviceName ( TDes16 &, TBool & )

IMPORT_C TIntGetDeviceName(TDes16 &aName,
TBool &aIsComplete
)const

Obtain the Device Name from inquiry response. This may be a complete or partial name depending on what is available.

ParameterDescription
aNameis where the Device Name converted into Unicode format is to be stored
aIsCompleteindicates whether the name is complete or partial.

Returns: an error code (KErrNotFound means no name is present in this EIR packet)

GetDeviceNameLength ( )

IMPORT_C TIntGetDeviceNameLength()const

Obtain the length for Device Name in EIR if present. This function should be called before GetDeviceName() to initialize size of the buffer, whose reference will be passed into GetDeviceName() as an argument.

Returns: the length of Device Name

GetFlags ( TDes8 & )

IMPORT_C TIntGetFlags(TDes8 &aDes)const

Obtain the Flags from EIR if present.

ParameterDescription
aDesa descriptor where the Flags is to be stored

Returns: an error code (KErrNotFound means no Flags is present in this EIR packet)

GetFlagsLength ( )

IMPORT_C TIntGetFlagsLength()const

Obtain the length for Flags in EIR if present. This function should be called before GetFlags() to initialize size of the buffer, whose reference will be passed into GetFlags() as an argument.

Returns: the length of Flags

GetServiceClassUuids ( RExtendedInquiryResponseUUIDContainer & )

IMPORT_C TIntGetServiceClassUuids(RExtendedInquiryResponseUUIDContainer &aEIRContainer)const

Retrieve the full list of UUIDs contained in this EIR. Please note that all types of UUID will be merged together in the single array.

Returns: an error code

GetTxPowerLevel ( TInt8 & )

IMPORT_C TIntGetTxPowerLevel(TInt8 &aTxPowerLevel)const

Retrieve the Transmission Power Level from EIR.

ParameterDescription
aTxPowerLevelwhere the Transmission Power Level from this EIR is to be stored

Returns: an error code (KErrNotFound means no Transmission Power Level is present in this EIR packet)

GetVendorSpecificData ( TDes8 & )

IMPORT_C TIntGetVendorSpecificData(TDes8 &aDes)const

Retrieve the vendor specific data from this EIR.

Returns: An error code (KErrNotFound means no Manufacturer Specific Data is present in this EIR packet)

GetVendorSpecificDataLength ( )

IMPORT_C TIntGetVendorSpecificDataLength()const

Obtain the length for Manufacturer Specific Data in EIR if present. This function should be called before GetVendorSpecificData() to initialize size of the buffer, whose reference will be passed into GetVendorSpecificData() as an argument.

Returns: the length of Manufacturer Specific Data