#include <btdevice.h>
Link against:
btdevice.lib
class TBTDeviceClass;
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.
Members
Defined in TBTDeviceClass
:
Construction and destruction
IMPORT_C TBTDeviceClass();
Description
Constructor. Initialises the device class to 0.
IMPORT_C TBTDeviceClass(TUint32 aDeviceClass);
Description
Constructor
Parameters
TUint32 aDeviceClass |
The initial device class
|
|
TBTDeviceClass(TUint16,TUint8,TUint8)
IMPORT_C TBTDeviceClass(TUint16 aMajorServiceClass, TUint8 aMajorDeviceClass, TUint8 aMinorDeviceClass);
Description
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 |
|
|
IMPORT_C TUint16 MajorServiceClass() const;
Description
Getter for major service class
Currently we only support CoD format #1.
Return value
IMPORT_C TUint8 MajorDeviceClass() const;
Description
Getter for major device class
Currently we only support CoD format #1.
Return value
IMPORT_C TUint8 MinorDeviceClass() const;
Description
Getter for minor device class
Currently we only support CoD format #1.
Return value
IMPORT_C TUint32 DeviceClass() const;
Description
Getter for whole device class
Return value
operator==(const TBTDeviceClass &)const
IMPORT_C TBool operator==(const TBTDeviceClass &aDeviceClass) const;
Description
Comparison operator
Parameters
const TBTDeviceClass &aDeviceClass |
the instance with which this is compared
|
|
Return value
TBool
|
ETrue if device classes are equal, otherwise false
|
|
operator=(const TBTDeviceClass &)
IMPORT_C TBTDeviceClass& operator=(const TBTDeviceClass &aDeviceClass);
Description
Assignment operator
Parameters
const TBTDeviceClass &aDeviceClass |
the instance from which this is assigned
|
|
Return value
ExternalizeL(RWriteStream &)const
IMPORT_C void ExternalizeL(RWriteStream &aStream) const;
Description
Extenalize this object to a stream.
Parameters
RWriteStream &aStream |
The stream object to which the class data will be written.
|
|
Leave codes
This |
method will leave if an error occurs.
|
|
InternalizeL(RReadStream &)
IMPORT_C void InternalizeL(RReadStream &aStream);
Description
Internalize
this object from a stream.
Parameters
RReadStream &aStream |
The stream object containing the data with which to internalize this object.
|
|
Leave codes
This |
method will leave if an error occurs.
|
|