Mac Dev Center Mac OS X Reference Library Drivers, Kernel, & Hardware: User-Space Device Access I/O Kit Framework Reference
|
IOHIDManager.h |
Includes: |
IOHIDManager defines an Human Interface Device (HID) managment object. It provides global interaction with managed HID devices such as discovery/removal and receiving input events. IOHIDManager is also a CFType object and as such conforms to all the conventions expected such object.
This documentation assumes that you have a basic understanding of the material contained in Accessing Hardware From Applications For definitions of I/O Kit terms used in this documentation, such as matching dictionary, family, and driver, see the overview of I/O Kit terms and concepts n the "Device Access and the I/O Kit" chapter of Accessing Hardware From Applications.
This documentation also assumes you have read Human Interface Device & Force Feedback. Please review documentation before using this reference.
All of the information described in this document is contained in the header file IOHIDManager.h found at /System/Library/Frameworks/IOKit.framework/Headers/hid/IOHIDManager.h.
Schedules HID manager with run loop.
Unschedules HID manager with run loop.
Closes the IOHIDManager.
Obtains currently enumerated devices.
Creates an IOHIDManager object.
Obtains a property of an IOHIDManager.
Returns the type identifier of all IOHIDManager instances.
Opens the IOHIDManager.
Registers a callback to be used a device is enumerated.
Registers a callback to be used when any enumerated device is removed.
Registers a callback to be used when an input report is issued by any enumerated device.
Registers a callback to be used when an input value is issued by any enumerated device.
Schedules HID manager with run loop.
Sets matching criteria for device enumeration.
Sets multiple matching criteria for device enumeration.
Sets matching criteria for input values received via IOHIDManagerRegisterInputValueCallback.
Sets multiple matching criteria for input values received via IOHIDManagerRegisterInputValueCallback.
Sets a property for an IOHIDManager.
Unschedules HID manager with run loop.
IOHIDDeviceScheduleWithRunLoop |
Schedules HID manager with run loop.
CF_EXPORT void IOHIDManagerScheduleWithRunLoop( IOHIDManagerRef manager, CFRunLoopRef runLoop, CFStringRef runLoopMode) ;
manager
Reference to an IOHIDManager.
runLoop
RunLoop to be used when scheduling any asynchronous activity.
runLoopMode
Run loop mode to be used when scheduling any asynchronous activity.
Formally associates manager with client's run loop. Scheduling this device with the run loop is necessary before making use of any asynchronous APIs. This will propagate to current and future devices that are enumerated.
IOHIDDeviceUnscheduleFromRunLoop |
Unschedules HID manager with run loop.
CF_EXPORT void IOHIDManagerUnscheduleFromRunLoop( IOHIDManagerRef manager, CFRunLoopRef runLoop, CFStringRef runLoopMode) ;
manager
Reference to an IOHIDManager.
runLoop
RunLoop to be used when unscheduling any asynchronous activity.
runLoopMode
Run loop mode to be used when unscheduling any asynchronous activity.
Formally disassociates device with client's run loop. This will propagate to current devices that are enumerated.
IOHIDManagerClose |
Closes the IOHIDManager.
CF_EXPORT IOReturn IOHIDManagerClose( IOHIDManagerRef manager, IOOptionBits options) ;
manager
Reference to an IOHIDManager.
options
Option bits to be sent down to the manager and device.
Returns kIOReturnSuccess if successful.
This will also close all devices that are currently enumerated.
IOHIDManagerCopyDevices |
Obtains currently enumerated devices.
CF_EXPORT CFSetRef IOHIDManagerCopyDevices( IOHIDManagerRef manager) ;
manager
Reference to an IOHIDManager.
CFSetRef containing IOHIDDeviceRefs.
IOHIDManagerCreate |
Creates an IOHIDManager object.
CF_EXPORT IOHIDManagerRef IOHIDManagerCreate( CFAllocatorRef allocator, IOOptionBits options) ;
allocator
Allocator to be used during creation.
options
Reserved for future use.
Returns a new IOHIDManagerRef.
The IOHIDManager object is meant as a global management system for communicating with HID devices.
IOHIDManagerGetProperty |
Obtains a property of an IOHIDManager.
CF_EXPORT CFTypeRef IOHIDManagerGetProperty( IOHIDManagerRef manager, CFStringRef key) ;
manager
Reference to an IOHIDManager.
key
CFStringRef containing key to be used when querying the manager.
Returns CFTypeRef containing the property.
Property keys are prefixed by kIOHIDDevice and declared in
IOHIDManagerGetTypeID |
Returns the type identifier of all IOHIDManager instances.
CF_EXPORT CFTypeID IOHIDManagerGetTypeID( void) ;
IOHIDManagerOpen |
Opens the IOHIDManager.
CF_EXPORT IOReturn IOHIDManagerOpen( IOHIDManagerRef manager, IOOptionBits options) ;
manager
Reference to an IOHIDManager.
options
Option bits to be sent down to the manager and device.
Returns kIOReturnSuccess if successful.
This will open both current and future devices that are enumerated. To establish an exclusive link use the kIOHIDOptionsTypeSeizeDevice option.
IOHIDManagerRegisterDeviceMatchingCallback |
Registers a callback to be used a device is enumerated.
CF_EXPORT void IOHIDManagerRegisterDeviceMatchingCallback( IOHIDManagerRef manager, IOHIDDeviceCallback callback, void *context) ;
manager
Reference to an IOHIDManagerRef.
callback
Pointer to a callback method of type IOHIDDeviceCallback.
context
Pointer to data to be passed to the callback.
Only device matching the set criteria will be enumerated.
IOHIDManagerRegisterDeviceRemovalCallback |
Registers a callback to be used when any enumerated device is removed.
CF_EXPORT void IOHIDManagerRegisterDeviceRemovalCallback( IOHIDManagerRef manager, IOHIDDeviceCallback callback, void *context) ;
manager
Reference to an IOHIDManagerRef.
callback
Pointer to a callback method of type IOHIDDeviceCallback.
context
Pointer to data to be passed to the callback.
In most cases this occurs when a device is unplugged.
IOHIDManagerRegisterInputReportCallback |
Registers a callback to be used when an input report is issued by any enumerated device.
CF_EXPORT void IOHIDManagerRegisterInputReportCallback( IOHIDManagerRef manager, IOHIDReportCallback callback, void *context) ;
manager
Reference to an IOHIDManagerRef.
callback
Pointer to a callback method of type IOHIDReportCallback.
context
Pointer to data to be passed to the callback.
An input report is an interrupt driver report issued by a device.
IOHIDManagerRegisterInputValueCallback |
Registers a callback to be used when an input value is issued by any enumerated device.
CF_EXPORT void IOHIDManagerRegisterInputValueCallback( IOHIDManagerRef manager, IOHIDValueCallback callback, void *context) ;
manager
Reference to an IOHIDManagerRef.
callback
Pointer to a callback method of type IOHIDValueCallback.
context
Pointer to data to be passed to the callback.
An input element refers to any element of type kIOHIDElementTypeInput and is usually issued by interrupt driven reports.
IOHIDManagerScheduleWithRunLoop |
Schedules HID manager with run loop.
CF_EXPORT void IOHIDManagerScheduleWithRunLoop( IOHIDManagerRef manager, CFRunLoopRef runLoop, CFStringRef runLoopMode) ;
manager
Reference to an IOHIDManager.
runLoop
RunLoop to be used when scheduling any asynchronous activity.
runLoopMode
Run loop mode to be used when scheduling any asynchronous activity.
Formally associates manager with client's run loop. Scheduling this device with the run loop is necessary before making use of any asynchronous APIs. This will propagate to current and future devices that are enumerated.
IOHIDManagerSetDeviceMatching |
Sets matching criteria for device enumeration.
CF_EXPORT void IOHIDManagerSetDeviceMatching( IOHIDManagerRef manager, CFDictionaryRef matching) ;
manager
Reference to an IOHIDManager.
matching
CFDictionaryRef containg device matching criteria.
Matching keys are prefixed by kIOHIDDevice and declared in
IOHIDManagerSetDeviceMatchingMultiple |
Sets multiple matching criteria for device enumeration.
CF_EXPORT void IOHIDManagerSetDeviceMatchingMultiple( IOHIDManagerRef manager, CFArrayRef multiple) ;
manager
Reference to an IOHIDManager.
multiple
CFArrayRef containing multiple CFDictionaryRef objects containg device matching criteria.
Matching keys are prefixed by kIOHIDDevice and declared in
IOHIDManagerSetInputValueMatching |
Sets matching criteria for input values received via IOHIDManagerRegisterInputValueCallback.
CF_EXPORT void IOHIDManagerSetInputValueMatching( IOHIDManagerRef manager, CFDictionaryRef matching) ;
manager
Reference to an IOHIDManager.
matching
CFDictionaryRef containg device matching criteria.
Matching keys are prefixed by kIOHIDElement and declared in
IOHIDManagerSetInputValueMatchingMultiple |
Sets multiple matching criteria for input values received via IOHIDManagerRegisterInputValueCallback.
CF_EXPORT void IOHIDManagerSetInputValueMatchingMultiple( IOHIDManagerRef manager, CFArrayRef multiple) ;
manager
Reference to an IOHIDManager.
multiple
CFArrayRef containing multiple CFDictionaryRef objects containg input element matching criteria.
Matching keys are prefixed by kIOHIDElement and declared in
IOHIDManagerSetProperty |
Sets a property for an IOHIDManager.
CF_EXPORT Boolean IOHIDManagerSetProperty( IOHIDManagerRef manager, CFStringRef key, CFTypeRef value) ;
manager
Reference to an IOHIDManager.
key
CFStringRef containing key to be used when modifiying the device property.
property
CFTypeRef containg the property to be set.
Returns TRUE if successful.
Property keys are prefixed by kIOHIDDevice and kIOHIDManager and
declared in
IOHIDManagerUnscheduleFromRunLoop |
Unschedules HID manager with run loop.
CF_EXPORT void IOHIDManagerUnscheduleFromRunLoop( IOHIDManagerRef manager, CFRunLoopRef runLoop, CFStringRef runLoopMode) ;
manager
Reference to an IOHIDManager.
runLoop
RunLoop to be used when unscheduling any asynchronous activity.
runLoopMode
Run loop mode to be used when unscheduling any asynchronous activity.
Formally disassociates device with client's run loop. This will propagate to current devices that are enumerated.
This is the type of a reference to the IOHIDManager.
IOHIDManagerRef |
This is the type of a reference to the IOHIDManager.
typedef struct __IOHIDManager * IOHIDManagerRef;
Last Updated: 2009-10-15