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_C TBTDeviceClass ( )

Constructor. Initialises the device class to 0.

TBTDeviceClass(TUint32)

IMPORT_C TBTDeviceClass ( TUint32 aDeviceClass )

Constructor

Parameters

TUint32 aDeviceClass The initial device class

TBTDeviceClass(TUint16, TUint8, TUint8)

IMPORT_C TBTDeviceClass ( TUint16 aMajorServiceClass,
TUint8 aMajorDeviceClass,
TUint8 aMinorDeviceClass
)

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 aMajorServiceClass The major service class for the device.
TUint8 aMajorDeviceClass The major device class.
TUint8 aMinorDeviceClass

Member Functions Documentation

DeviceClass()

IMPORT_C TUint32 DeviceClass ( ) const

Getter for whole device class

ExternalizeL(RWriteStream &)

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

Parameters

RWriteStream & aStream The stream object to which the class data will be written.

InternalizeL(RReadStream &)

IMPORT_C void InternalizeL ( RReadStream & aStream )
Internalize this object from a stream.
leave
This method will leave if an error occurs.

Parameters

RReadStream & aStream The stream object containing the data with which to internalize this object.

MajorDeviceClass()

IMPORT_C TUint8 MajorDeviceClass ( ) const

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

MajorServiceClass()

IMPORT_C TUint16 MajorServiceClass ( ) const

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

MinorDeviceClass()

IMPORT_C TUint8 MinorDeviceClass ( ) 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 & aDeviceClass the instance from which this is assigned

operator==(const TBTDeviceClass &)

IMPORT_C TBool operator== ( const TBTDeviceClass & aDeviceClass ) const

Comparison operator

Parameters

const TBTDeviceClass & aDeviceClass the instance with which this is compared

Member Data Documentation

const TUint32 KStreamVersion

const TUint32 KStreamVersion [private, static]

TUint32 iDeviceClass

TUint32 iDeviceClass [private]

TUint32 iPadding1

TUint32 iPadding1 [private]

TUint32 iPadding2

TUint32 iPadding2 [private]