CReportGenerator Class Reference

class CReportGenerator : public CBase

HID report generator

Class used for generating output or feature reports to send to the device.

generichid.lib
Since
S60 v5.0

Inherits from

Constructor & Destructor Documentation

CReportGenerator(TInt, CField::TType)

CReportGenerator ( TInt aReportId,
CField::TType aType
) [private]

Constructor for CReportGenerator .

Since
S60 v5.0

Parameters

TInt aReportId Report ID of the report to generate.
CField::TType aType Type of report to generate (output or feature).

~CReportGenerator()

~CReportGenerator ( ) [virtual]

Member Functions Documentation

ConstructL(const CReportRoot *)

void ConstructL ( const CReportRoot * aReportRoot ) [private]

2nd phase constructor for CReportGenerator . Allocates the report buffer iBuf.

Since
S60 v5.0

Parameters

const CReportRoot * aReportRoot Tree generated by CParser from the report descriptor.

NewL(const CReportRoot *, TInt, CField::TType)

IMPORT_C CReportGenerator * NewL ( const CReportRoot * aReportRoot,
TInt aReportId,
CField::TType aType
) [static]

Constructs a CReportGenerator .

Since
S60 v5.0

Parameters

const CReportRoot * aReportRoot Tree generated by CParser from the report descriptor.
TInt aReportId Report ID of the report to generate.
CField::TType aType Type of report to generate (output or feature).

NewLC(const CReportRoot *, TInt, CField::TType)

IMPORT_C CReportGenerator * NewLC ( const CReportRoot * aReportRoot,
TInt aReportId,
CField::TType aType
) [static]

Constructs a CReportGenerator .

Since
S60 v5.0

Parameters

const CReportRoot * aReportRoot Tree generated by CParser from the report descriptor.
TInt aReportId Report ID of the report to generate.
CField::TType aType Type of report to generate (output or feature).

Report()

IMPORT_C TPtr8 Report ( )

Get the buffer holding the generated report

Since
S60 v5.0

SetField(const CField *, TInt, TInt, TInt)

IMPORT_C TInt SetField ( const CField * aField,
TInt aUsageId,
TInt aValue,
TInt aControlOffset = 0
)

Sets the value of a single field in the report. Stores the requested control value in a field in the report buffer. For array fields, adds the requested usage ID to the array.

Since
S60 v5.0

Parameters

const CField * aField Pointer to the field in which to set a value.
TInt aUsageId Usage ID of the control to set.
TInt aValue Value to write to the field, used for variable fields only.
TInt aControlOffset = 0 Which control to set when more than one have the same usage ID.

Member Data Documentation

HBufC8 * iBuf

HBufC8 * iBuf [private]

Buffer to hold the generated report Own.

TInt iReportId

TInt iReportId [private]

Report ID of the report to generate

const CReportRoot * iReportRoot

const CReportRoot * iReportRoot [private]

Tree of fields from the report descriptor Not own.

CField::TType iType

CField::TType iType [private]

Type of report to generate