IOHIDInterface

Inherits from
IOService
Availability
Available in OS X v10.4 and later.
Declared in
IOHIDInterface.h

Overview

In kernel interface to a HID device.

Tasks

Miscellaneous

Instance Methods

free

Free the IOHIDInterface object.

virtual void free();
Discussion

Release all resources that were previously allocated, then call super::free() to propagate the call to our superclass.

init

Initialize an IOHIDInterface object.

virtual bool init( OSDictionary *dictionary = 0 );
Parameters
A

dictionary A property table associated with this IOHIDInterface instance.

Return Value

True on sucess, or false otherwise.

Discussion

Prime the IOHIDInterface object and prepare it to support a probe() or a start() call. This implementation will simply call super::init().

matchPropertyTable

Called by the provider during a match

virtual bool matchPropertyTable( OSDictionary *table, SInt32 *score);
Parameters
table

The property table that this device will match against

Discussion

Compare the properties in the supplied table to this object's properties.

start

Start up the driver using the given provider.

virtual bool start( IOService *provider );
Parameters
provider

The provider that the driver was matched to, and selected to run with.

Return Value

True on success, or false otherwise.

Discussion

IOHIDInterface will allocate resources. Before returning true to indicate success, registerService() is called to trigger client matching.

Callbacks

CompletionAction

typedef void ( *CompletionAction)(
   OSObject *target,
   void *refcon,
   IOReturn status,
   UInt32 bufferSizeRemaining);

Parameters
target
refcon
status

Completion status.

bufferSizeRemaining

Bytes left to be transferred.

Discussion

Function called when HID I/O completes.

Availability
See Also
Declared In
IOHIDInterface.h

InterruptReportAction

Callback to handle an asynchronous report received from the HID device.

typedef void ( *InterruptReportAction)(
   OSObject *target,
   AbsoluteTime timestamp,
   IOMemoryDescriptor *report,
   IOHIDReportType type,
   UInt32 reportID,
   void *refcon);

Parameters
target

Pointer to your data object.

timestamp

Time when the report was delivered.

report

A memory descriptor that describes the report.

reportType

The type of report.

reportID

The ID of the report.

refcon

void * pointer to more data.

Discussion

This callback is set when calling IOHIDInterface::open.

Availability
See Also
Declared In
IOHIDInterface.h

IOHIDInterface::CompletionAction

typedef void ( *CompletionAction)(
   OSObject *target,
   void *refcon,
   IOReturn status,
   UInt32 bufferSizeRemaining);

Parameters
target
refcon
status

Completion status.

bufferSizeRemaining

Bytes left to be transferred.

Discussion

Function called when HID I/O completes.

See Also

IOHIDInterface::InterruptReportAction

Callback to handle an asynchronous report received from the HID device.

typedef void ( *InterruptReportAction)(
   OSObject *target,
   AbsoluteTime timestamp,
   IOMemoryDescriptor *report,
   IOHIDReportType type,
   UInt32 reportID,
   void *refcon);

Parameters
target

Pointer to your data object.

timestamp

Time when the report was delivered.

report

A memory descriptor that describes the report.

reportType

The type of report.

reportID

The ID of the report.

refcon

void * pointer to more data.

Discussion

This callback is set when calling IOHIDInterface::open.

See Also

Instance Variables

reserved

ExpansionData * _reserved;

Reserved for future use. (Internal use only)

See Also

_reserved

ExpansionData * _reserved;

Reserved for future use. (Internal use only)

See Also