MDriverAccess Class Reference

class MDriverAccess

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

Since
S60 v5.0

Member Functions Documentation

CountryCodeL(TInt)

TUint CountryCodeL(TIntaConnID)[pure virtual]

Retrieves the country code for the HID device

Since
S60 v5.0

Parameters

TInt aConnIDThe device identifier

DataOutL(TInt, TUint8, const TDesC8 &, TUint16)

voidDataOutL(TIntaConnectionId,
TUint8aReportId,
const TDesC8 &aPayload,
TUint16aInterface
)[pure virtual]

Sends a report to the device (from host) using Interrupt Channel as DATA

Since
S60 v5.0

Parameters

TInt aConnectionIdThe device ID
TUint8 aReportIdThe report to receive the setup report
const TDesC8 & aPayloadThe report being sent to the device
TUint16 aInterfaceThe current interface being used by the driver

GetIdleL(TInt, TUint8, TUint16)

voidGetIdleL(TIntaConnectionId,
TUint8aReportId,
TUint16aInterface
)[pure virtual]

Requests the current Idle setting for the device Leaves whit KErrInUse The request was not successful because the transport layer is busy with previous request and KErrNotReady The request failed because the device is currently unavailable

Since
S60 v5.0

Parameters

TInt aConnectionIdThe device ID
TUint8 aReportIdThe report required from the device
TUint16 aInterfaceThe current interface being used by the driver

GetProtocolL(TInt, TUint16)

voidGetProtocolL(TIntaConnectionID,
TUint16aInterface
)[pure virtual]

Requests the current protocol for the device (boot or report) Leaves whit KErrInUse The request was not successful because the transport layer is busy with previous request and KErrNotReady The request failed because the device is currently unavaila

Since
S60 v5.0

Parameters

TInt aConnectionIDThe connection id
TUint16 aInterfaceThe current interface being used by the driver

GetReportL(TInt, TUint8, TUint16, TUint16)

voidGetReportL(TIntaConnectionId,
TUint8aReportId,
TUint16aInterface,
TUint16aLength
)[pure virtual]

Requests a report from the device Leaves whit KErrInUse The request was not successful because the transport layer is busy with previous request and KErrNotReady The request failed because the device is currently unavailable

Since
S60 v5.0

Parameters

TInt aConnectionIdThe connection id
TUint8 aReportIdThe report required from the device
TUint16 aInterfaceThe current interface being used by the driver
TUint16 aLength** NOT USED **

ProductIdL(TInt)

TUint ProductIdL(TIntaConnID)[pure virtual]

Retrieves the product identifier for the HID device

Since
S60 v5.0

Parameters

TInt aConnIDThe device identifier

ReportDescriptor(TInt)

CReportRoot *ReportDescriptor(TIntaConnectionId)[pure virtual]

A request for the parsed descriptor container object so the driver can retrieve the report format(s)

Since
S60 v5.0

Parameters

TInt aConnectionIdThe device ID

SetIdleL(TInt, TUint8, TUint8, TUint16, CHidDriver *)

voidSetIdleL(TIntaConnectionId,
TUint8aDuration,
TUint8aReportId,
TUint16aInterface,
CHidDriver *aDriver
)[pure virtual]

Sets the idle interval for interrupt data. Leaves whit KErrInUse The request was not successful because the transport layer is busy with previous request and KErrNotReady The request failed because the device is currently unavailable

Since
S60 v5.0

Parameters

TInt aConnectionIdThe device ID
TUint8 aDurationThe idle interval, in steps of 0.04ms intervals (where 1 = 0.04ms, 2=0.08ms). 0 will disable idle so reports are only sent when the state of the device changes
TUint8 aReportIdThe report whose idle rate is being set
TUint16 aInterfaceThe current interface being used by the driver aDriver Calling driver
CHidDriver * aDriver

SetProtocolL(TInt, TUint16, TProtocols, CHidDriver *)

voidSetProtocolL(TIntaConnectionId,
TUint16aInterface,
TProtocolsaProtocol,
CHidDriver *aDriver
)[pure virtual]

Sets the protocol to be used for reports Leaves whit KErrInUse The request was not successful because the transport layer is busy with previous request and KErrNotReady The request failed because the device is currently unavailable

Since
S60 v5.0

Parameters

TInt aConnectionIdThe device ID
TUint16 aInterfaceThe current interface being used by the driver
TProtocols aProtocolThe required protocol (boot or report) aDriver Calling driver
CHidDriver * aDriver

SetReportL(TInt, TUint8, TReportType, const TDesC8 &, TUint16, CHidDriver *)

voidSetReportL(TIntaConnectionId,
TUint8aReportId,
TReportTypeaReportType,
const TDesC8 &aPayload,
TUint16aInterface,
CHidDriver *aDriver
)[pure virtual]

Sends a report to the device

Since
S60 v5.0

Parameters

TInt aConnectionIdThe device ID
TUint8 aReportIdThe report to receive the setup report
TReportType aReportTypeThe type of report being sent to the device (input, output or Feature)
const TDesC8 & aPayloadThe report being sent to the device aDriver Calling driver
TUint16 aInterfaceThe current interface being used by the driver
CHidDriver * aDriver

VendorIdL(TInt)

TUint VendorIdL(TIntaConnID)[pure virtual]

Retrieves the for the HID device

Since
S60 v5.0

Parameters

TInt aConnIDThe device identifier

Member Enumerations Documentation

Enum TProtocols

Return codes from the Generic HID to the device drivers Note: The enumeration values map directly to the HID equivalent values (Passed as TUint8 values to the transport layer)

Enumerators

EBoot = 0

Boot Protocol

EReport = 1

Report Protocol

Enum TReportType

The type of report requested from the device Note: The enumeration values map directly to the HID equivalent values (Passed as TUint16 values to the transport layer)

Enumerators

EInput = 1

Input report

EOutput

Output report

EFeature

Feature report