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_CCHidDriver()[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 * aReportDescriptorParsed HID report descriptor

CommandResult(TInt)

voidCommandResult(TIntaCmdAck)[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 aCmdAckStatus of the last Set... command

DataIn(CHidTransport::THidChannelType, const TDesC8 &)

TInt DataIn(CHidTransport::THidChannelTypeaChannel,
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 aChannelChannel ID (Interrupt or Control)
const TDesC8 & aPayloadThe complete report payload

Disconnected(TInt)

voidDisconnected(TIntaReason)[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 aReasonDisconnection code

InitialiseL(TInt)

voidInitialiseL(TIntaConnectionId)[pure virtual]

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

Since
S60 v5.0

Parameters

TInt aConnectionIdAn 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 TUidaImplementationUid,
MDriverAccess *aHid
)[static]

Two-phased constructor.

Parameters

const TUid aImplementationUidImplementation UID of the plugin to be created.
MDriverAccess * aHidDriver acces interface

SetInputHandlingReg(CHidInputDataHandlingReg *)

voidSetInputHandlingReg(CHidInputDataHandlingReg *aHandlingReg)[pure virtual]

Set input handling registy

Since
S60 v5.0

Parameters

CHidInputDataHandlingReg * aHandlingRega Input handling registry

StartL(TInt)

voidStartL(TIntaConnectionId)[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 aConnectionIdA 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()

voidStop()[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.