CHidDriver Class Reference

class CHidDriver : public CBase

Driver plugin interface Interface allowing drivers to request data from and send data to devices via the Generic HID layer.

generichid.lib
Since
S60 v5.0

Inherits from

Constructor & Destructor Documentation

CHidDriver()

IMPORT_C CHidDriver ( ) [protected]

C++ constructor.

~CHidDriver()

IMPORT_C ~CHidDriver ( ) [virtual]

Destructor

Member Functions Documentation

CanHandleReportL(CReportRoot *)

TInt CanHandleReportL ( CReportRoot * aReportDescriptor ) [pure virtual]

Called by the Generic HID to see if the factory can use reports described by the parsed report descriptor NOTE: The current implementation supports just one driver and that driver that will either handle all the reports from the device or none at all. Report ID is not currently being taken into account.

Since
S60 v5.0

Parameters

CReportRoot * aReportDescriptor Parsed HID report descriptor

CommandResult(TInt)

void CommandResult ( TInt aCmdAck ) [pure virtual]

Called by the transport layers to inform the generic HID of the success of the last Set... command.

Since
S60 v5.0

Parameters

TInt aCmdAck Status of the last Set... command

DataIn(CHidTransport::THidChannelType, const TDesC8 &)

TInt DataIn ( CHidTransport::THidChannelType aChannel,
const TDesC8 & aPayload
) [pure virtual]

Called by the Generic HID layer when a device has sent a report on the interrupt or control channel

Since
S60 v5.0

Parameters

CHidTransport::THidChannelType aChannel Channel ID (Interrupt or Control)
const TDesC8 & aPayload The complete report payload

Disconnected(TInt)

void Disconnected ( TInt aReason ) [pure virtual]

Called by the Generic HID layer when the handled device has been disconnected interrupt or control channel

Since
S60 v5.0

Parameters

TInt aReason Disconnection code

InitialiseL(TInt)

void InitialiseL ( TInt aConnectionId ) [pure virtual]

Called after a driver is sucessfully created by the Generic HID, when a device is connected.

Since
S60 v5.0

Parameters

TInt aConnectionId An number used to identify the device in subsequent calls from the driver to the generic HID, for example when sending data to the device.

NewL(const TUid, MDriverAccess *)

IMPORT_C CHidDriver * NewL ( const TUid aImplementationUid,
MDriverAccess * aHid
) [static]

Two-phased constructor.

Parameters

const TUid aImplementationUid Implementation UID of the plugin to be created.
MDriverAccess * aHid Driver acces interface

SetInputHandlingReg(CHidInputDataHandlingReg *)

void SetInputHandlingReg ( CHidInputDataHandlingReg * aHandlingReg ) [pure virtual]

Set input handling registy

Since
S60 v5.0

Parameters

CHidInputDataHandlingReg * aHandlingReg a Input handling registry

StartL(TInt)

void StartL ( TInt aConnectionId ) [pure virtual]

Enables the driver so that it will configure the device and start handling interrupt reports from the device

Since
S60 v5.0

Parameters

TInt aConnectionId A number used to identify the device in subsequent calls from the driver to the Generic HID, for example when sending data to the device.

Stop()

void Stop ( ) [pure virtual]

Disables the driver so that it will stop handling device interrupt reports

Since
S60 v5.0

SupportedFieldCount()

TInt SupportedFieldCount ( ) [pure virtual]

Return count of supported fields

Since
S60 v5.0

Member Data Documentation

TUid iDtor_ID_Key

TUid iDtor_ID_Key [private]

ECOM plugin instance UID.