ADC Home > Reference Library > Reference > Hardware & Drivers > I/O Kit Framework Reference
|
IOHIDDeviceInterface |
Declared In: |
CFPlugin object subclass which provides the primary interface to HID devices.
Wrapper to return instances of the IOHIDOutputTransactionInterface.
Wrapper to return instances of the IOHIDQueueInterface.
Closes the device.
Creates async eventsource.
Creates an async port.
Gets the created async event source.
Gets the current async port.
Obtains the most recent value of an element.
Opens the device.
Obtains the current value of an element.
Sets an element value on the device.
Sets callback to be used when device is removed.
Starts data delivery on all queues for this device.
Stops data delivery on all queues for this device.
allocOutputTransaction |
Wrapper to return instances of the IOHIDOutputTransactionInterface.
IOHIDOutputTransactionInterface ** ( *allocOutputTransaction) ( void *self);
Returns the created IOHIDOutputTransactionInterface.
allocQueue |
Wrapper to return instances of the IOHIDQueueInterface.
IOHIDQueueInterface ** ( *allocQueue) ( void *self);
Returns the created IOHIDQueueInterface.
close |
Closes the device.
IOReturn ( *close)( void *self);
Returns an IOReturn code.
createAsyncEventSource |
Creates async eventsource.
IOReturn ( *createAsyncEventSource)( void *self, CFRunLoopSourceRef *source);
source
Reference to CFRunLoopSourceRef that is created.
Returns an IOReturn code.
This method will create an async mach port, if one has not already been created.
createAsyncPort |
Creates an async port.
IOReturn ( *createAsyncPort)( void *self, mach_port_t *port);
port
Reference to mach port that is created.
Returns an IOReturn code.
The port must be created before any callbacks can be used.
getAsyncEventSource |
Gets the created async event source.
CFRunLoopSourceRef ( *getAsyncEventSource)( void *self);
Returns a CFRunLoopSourceRef.
getAsyncPort |
Gets the current async port.
mach_port_t ( *getAsyncPort)( void *self);
Returns a mach_port_t.
getElementValue |
Obtains the most recent value of an element.
IOReturn ( *getElementValue)( void *self, IOHIDElementCookie elementCookie, IOHIDEventStruct *valueEvent);
elementCookie
The element of interest.
valueEvent
The event that will be filled. If a long value is present, it is up to the caller to deallocate it.
Returns an IOReturn code.
This call is most useful for interrupt driven elements, such as input type elements. Since feature type element values need to be polled from the device, it is recommended to use the queryElementValue method to obtain the current value. The timestamp field in the event details the last time the element value was altered.
open |
Opens the device.
IOReturn ( *open)( void *self, uint32_t flags);
flags
Flags to be passed down to the user client.
Returns an IOReturn code.
queryElementValue |
Obtains the current value of an element.
IOReturn ( *queryElementValue)( void *self, IOHIDElementCookie elementCookie, IOHIDEventStruct *valueEvent, uint32_t timeoutMS, IOHIDElementCallbackFunction callback, void *callbackTarget, void *callbackRefcon);
elementCookie
The element of interest.
valueEvent
The event that will be filled. If a long value is present, it is up to the caller to deallocate it.
timeoutMS
UNSUPPORTED.
callback
UNSUPPORTED.
callbackTarget
UNSUPPORTED.
callbackRefcon
UNSUPPORTED.
Returns an IOReturn code.
This call is most useful for feature type elements. This method will poll the device for the current element value.
setElementValue |
Sets an element value on the device.
IOReturn ( *setElementValue)( void *self, IOHIDElementCookie elementCookie, IOHIDEventStruct *valueEvent, uint32_t timeoutMS, IOHIDElementCallbackFunction callback, void *callbackTarget, void *callbackRefcon);
elementCookie
The element of interest.
valueEvent
The event that will be filled. If a long value is present, it will be copied.
timeoutMS
UNSUPPORTED.
callback
UNSUPPORTED.
callbackTarget
UNSUPPORTED.
callbackRefcon
UNSUPPORTED.
Returns an IOReturn code.
This call is most useful for feature type elements. It is recommended to use IOOutputTransaction for output type elements.
setRemovalCallback |
Sets callback to be used when device is removed.
IOReturn ( *setRemovalCallback)( void *self, IOHIDCallbackFunction removalCallback, void *removalTarget, void *removalRefcon);
removalCallback
Called when the device is removed.
removeTarget
Passed to the callback.
removalRefcon
Passed to the callback.
Returns an IOReturn code.
startAllQueues |
Starts data delivery on all queues for this device.
IOReturn ( *startAllQueues)( void *self);
Returns an IOReturn code.
stopAllQueues |
Stops data delivery on all queues for this device.
IOReturn ( *stopAllQueues)( void *self);
Returns an IOReturn code.
|
Last Updated: 2009-02-23