Mac Developer Library

Developer

IOHIDInterface Class Reference

Options
Deployment Target:

On This Page
Language:

IOHIDInterface

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Not Applicable

Objective-C

@import Kernel;

Availability


Available in OS X v10.4 and later.

In kernel interface to a HID device.

  • Free the IOHIDInterface object.

    Declaration

    C++

    virtual void free();

    Discussion

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

  • Initialize an IOHIDInterface object.

    Declaration

    C++

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

  • Called by the provider during a match

    Declaration

    C++

    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 up the driver using the given provider.

    Declaration

    C++

    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

  • Declaration

    C++

    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.

    Import Statement

    Objective-C

    #include <IOHIDInterface.h>;

    Availability

    Available in OS X v10.4 through OS X v10.5.

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

    Declaration

    C++

    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.

    Import Statement

    Objective-C

    #include <IOHIDInterface.h>;

    Availability

    Available in OS X v10.4 through OS X v10.5.

  • Declaration

    C++

    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

    CompletionAction

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

    Declaration

    C++

    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

    InterruptReportAction

Instance Variables

  • Reserved for future use. (Internal use only)

    Declaration

    C++

    ExpansionData * _reserved;

  • Reserved for future use. (Internal use only)

    Declaration

    C++

    ExpansionData * _reserved;