TBTDeviceClass Class Reference

#include <btdevice.h>

Link against: btdevice.lib

class TBTDeviceClass

Detailed Description

Encapsulation of device class definitions.

Contains a single TInt as member data and methods to extract the major, minor and service class information from that TInt.

Constructor & Destructor Documentation

TBTDeviceClass ( )

IMPORT_CTBTDeviceClass()

Constructor. Initialises the device class to 0.

TBTDeviceClass ( TUint32 )

IMPORT_CTBTDeviceClass(TUint32aDeviceClass)

Constructor

ParameterDescription
aDeviceClassThe initial device class

TBTDeviceClass ( TUint16, TUint8, TUint8 )

IMPORT_CTBTDeviceClass(TUint16aMajorServiceClass,
TUint8aMajorDeviceClass,
TUint8aMinorDeviceClass
)

Constructor taking separate fields for combination into device class

Construct a Class of Device using format #1 as per the baseband assigned numbers.

Note that this is a 24-bit field which we store in a 32-bit integer.

ParameterDescription
aMajorServiceClassThe major service class for the device.
aMajorDeviceClassThe major device class.

Member Function Documentation

DeviceClass ( )

IMPORT_C TUint32DeviceClass()const

Getter for whole device class

Returns: The DeviceClass

ExternalizeL ( RWriteStream & )

IMPORT_C voidExternalizeL(RWriteStream &aStream)const
Extenalize this object to a stream.
leave
This method will leave if an error occurs.
ParameterDescription
aStreamThe stream object to which the class data will be written.

InternalizeL ( RReadStream & )

IMPORT_C voidInternalizeL(RReadStream &aStream)
Internalize this object from a stream.
leave
This method will leave if an error occurs.
ParameterDescription
aStreamThe stream object containing the data with which to internalize this object.

MajorDeviceClass ( )

IMPORT_C TUint8MajorDeviceClass()const

Getter for major device class Currently we only support CoD format #1.

Returns: The MajorDeviceClass

MajorServiceClass ( )

IMPORT_C TUint16MajorServiceClass()const

Getter for major service class Currently we only support CoD format #1.

Returns: The MajorServerClass

MinorDeviceClass ( )

IMPORT_C TUint8MinorDeviceClass()const

Getter for minor device class Currently we only support CoD format #1.

Returns: The MinorDeviceClass

operator= ( const TBTDeviceClass & )

IMPORT_C TBTDeviceClass &operator=(const TBTDeviceClass &aDeviceClass)

Assignment operator

ParameterDescription
aDeviceClassthe instance from which this is assigned

Returns: this Device Class

operator== ( const TBTDeviceClass & )

IMPORT_C TBooloperator==(const TBTDeviceClass &aDeviceClass)const

Comparison operator

ParameterDescription
aDeviceClassthe instance with which this is compared

Returns: ETrue if device classes are equal, otherwise false