ADC Home > Reference Library > Reference > Hardware & Drivers > 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
Returns the type identifier of all IOHIDManager instances.
Opens the IOHIDManager.
Reference to an IOHIDManager. 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.
Registers a callback to be used a device is enumerated.
Reference to an IOHIDManagerRef. Pointer to a callback method of type
IOHIDDeviceCallback. Pointer to data to be passed to the callback. Only device matching the set criteria will be enumerated.
Registers a callback to be used when any enumerated device is
removed.
Reference to an IOHIDManagerRef. Pointer to a callback method of type
IOHIDDeviceCallback. Pointer to data to be passed to the callback. In most cases this occurs when a device is unplugged.
Registers a callback to be used when an input report is issued by
any enumerated device.
Reference to an IOHIDManagerRef. Pointer to a callback method of type IOHIDReportCallback. Pointer to data to be passed to the callback. An input report is an interrupt driver report issued by a device.
Registers a callback to be used when an input value is issued by
any enumerated device.
Reference to an IOHIDManagerRef. Pointer to a callback method of type IOHIDValueCallback. 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.
Schedules HID manager with run loop.
Reference to an IOHIDManager. RunLoop to be used when scheduling any asynchronous
activity. 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.
Sets matching criteria for device enumeration.
Reference to an IOHIDManager. CFDictionaryRef containg device matching criteria. Matching keys are prefixed by kIOHIDDevice and declared in
Sets multiple matching criteria for device enumeration.
Reference to an IOHIDManager. CFArrayRef containing multiple CFDictionaryRef objects
containg device matching criteria. Matching keys are prefixed by kIOHIDDevice and declared in
Sets matching criteria for input values received via
IOHIDManagerRegisterInputValueCallback.
Reference to an IOHIDManager. CFDictionaryRef containg device matching criteria. Matching keys are prefixed by kIOHIDElement and declared in
Sets multiple matching criteria for input values received via
IOHIDManagerRegisterInputValueCallback.
Reference to an IOHIDManager. CFArrayRef containing multiple CFDictionaryRef objects
containg input element matching criteria. Matching keys are prefixed by kIOHIDElement and declared in
Sets a property for an IOHIDManager.
Reference to an IOHIDManager. CFStringRef containing key to be used when modifiying the
device property. CFTypeRef containg the property to be set. Returns TRUE if successful.
Property keys are prefixed by kIOHIDDevice and kIOHIDManager and
declared in Unschedules HID manager with run loop.
Reference to an IOHIDManager. RunLoop to be used when unscheduling any asynchronous
activity. 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.
IOHIDManagerGetTypeID
CF_EXPORT CFTypeID IOHIDManagerGetTypeID(
void) ;
IOHIDManagerOpen
CF_EXPORT IOReturn IOHIDManagerOpen(
IOHIDManagerRef manager,
IOOptionBits options) ;
Parameters
manager
options
Return Value
Discussion
IOHIDManagerRegisterDeviceMatchingCallback
CF_EXPORT void IOHIDManagerRegisterDeviceMatchingCallback(
IOHIDManagerRef manager,
IOHIDDeviceCallback callback,
void *context) ;
Parameters
manager
callback
context
Discussion
IOHIDManagerRegisterDeviceRemovalCallback
CF_EXPORT void IOHIDManagerRegisterDeviceRemovalCallback(
IOHIDManagerRef manager,
IOHIDDeviceCallback callback,
void *context) ;
Parameters
manager
callback
context
Discussion
IOHIDManagerRegisterInputReportCallback
CF_EXPORT void IOHIDManagerRegisterInputReportCallback(
IOHIDManagerRef manager,
IOHIDReportCallback callback,
void *context) ;
Parameters
manager
callback
context
Discussion
IOHIDManagerRegisterInputValueCallback
CF_EXPORT void IOHIDManagerRegisterInputValueCallback(
IOHIDManagerRef manager,
IOHIDValueCallback callback,
void *context) ;
Parameters
manager
callback
context
Discussion
IOHIDManagerScheduleWithRunLoop
CF_EXPORT void IOHIDManagerScheduleWithRunLoop(
IOHIDManagerRef manager,
CFRunLoopRef runLoop,
CFStringRef runLoopMode) ;
Parameters
manager
runLoop
runLoopMode
Discussion
IOHIDManagerSetDeviceMatching
CF_EXPORT void IOHIDManagerSetDeviceMatching(
IOHIDManagerRef manager,
CFDictionaryRef matching) ;
Parameters
manager
matching
Discussion
IOHIDManagerSetDeviceMatchingMultiple
CF_EXPORT void IOHIDManagerSetDeviceMatchingMultiple(
IOHIDManagerRef manager,
CFArrayRef multiple) ;
Parameters
manager
multiple
Discussion
IOHIDManagerSetInputValueMatching
CF_EXPORT void IOHIDManagerSetInputValueMatching(
IOHIDManagerRef manager,
CFDictionaryRef matching) ;
Parameters
manager
matching
Discussion
IOHIDManagerSetInputValueMatchingMultiple
CF_EXPORT void IOHIDManagerSetInputValueMatchingMultiple(
IOHIDManagerRef manager,
CFArrayRef multiple) ;
Parameters
manager
multiple
Discussion
IOHIDManagerSetProperty
CF_EXPORT Boolean IOHIDManagerSetProperty(
IOHIDManagerRef manager,
CFStringRef key,
CFTypeRef value) ;
Parameters
manager
key
property
Return Value
Discussion
IOHIDManagerUnscheduleFromRunLoop
CF_EXPORT void IOHIDManagerUnscheduleFromRunLoop(
IOHIDManagerRef manager,
CFRunLoopRef runLoop,
CFStringRef runLoopMode) ;
Parameters
manager
runLoop
runLoopMode
Discussion
Typedefs
IOHIDManagerRef
typedef struct __IOHIDManager * IOHIDManagerRef;
Did this document help you?