TBTDeviceClass Class Reference

class TBTDeviceClass

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

Parameters

TUint32 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.

Parameters

TUint16 aMajorServiceClassThe major service class for the device.
TUint8 aMajorDeviceClassThe major device class.
TUint8 aMinorDeviceClass

Member Functions Documentation

DeviceClass()

IMPORT_C TUint32DeviceClass()const

Getter for whole device class

ExternalizeL(RWriteStream &)

IMPORT_C voidExternalizeL(RWriteStream &aStream)const
Extenalize this object to a stream.
leave
This method will leave if an error occurs.

Parameters

RWriteStream & 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.

Parameters

RReadStream & 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.

MajorServiceClass()

IMPORT_C TUint16MajorServiceClass()const

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

MinorDeviceClass()

IMPORT_C TUint8MinorDeviceClass()const

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

operator=(const TBTDeviceClass &)

IMPORT_C TBTDeviceClass &operator=(const TBTDeviceClass &aDeviceClass)

Assignment operator

Parameters

const TBTDeviceClass & aDeviceClassthe instance from which this is assigned

operator==(const TBTDeviceClass &)

IMPORT_C TBooloperator==(const TBTDeviceClass &aDeviceClass)const

Comparison operator

Parameters

const TBTDeviceClass & aDeviceClassthe instance with which this is compared

Member Data Documentation

const TUint32 KStreamVersion

const TUint32KStreamVersion[private, static]

TUint32 iDeviceClass

TUint32 iDeviceClass[private]

TUint32 iPadding1

TUint32 iPadding1[private]

TUint32 iPadding2

TUint32 iPadding2[private]