IOHIDUserDevice.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. *
  3. * @APPLE_LICENSE_HEADER_START@
  4. *
  5. * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
  6. *
  7. * This file contains Original Code and/or Modifications of Original Code
  8. * as defined in and that are subject to the Apple Public Source License
  9. * Version 2.0 (the 'License'). You may not use this file except in
  10. * compliance with the License. Please obtain a copy of the License at
  11. * http://www.opensource.apple.com/apsl/ and read it before using this
  12. * file.
  13. *
  14. * The Original Code and all software distributed under the License are
  15. * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  16. * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  17. * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  18. * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  19. * Please see the License for the specific language governing rights and
  20. * limitations under the License.
  21. *
  22. * @APPLE_LICENSE_HEADER_END@
  23. */
  24. #ifndef _IOKIT_HID_IOHIDUSERDEVICE_USER_H
  25. #define _IOKIT_HID_IOHIDUSERDEVICE_USER_H
  26. #include <CoreFoundation/CoreFoundation.h>
  27. #include <IOKit/IOKitLib.h>
  28. __BEGIN_DECLS
  29. typedef struct __IOHIDUserDevice * IOHIDUserDeviceRef;
  30. /*!
  31. @function IOHIDUserDeviceGetTypeID
  32. @abstract Returns the type identifier of all IOHIDUserDevice instances.
  33. */
  34. CF_EXPORT
  35. CFTypeID IOHIDUserDeviceGetTypeID(void);
  36. /*!
  37. @function IOHIDUserDeviceCreate
  38. @abstract Creates an virtual IOHIDDevice in the kernel.
  39. @discussion The io_service_t passed in this method must reference an object
  40. in the kernel of type IOHIDUserDevice.
  41. @param allocator Allocator to be used during creation.
  42. @param properties CFDictionaryRef containing device properties index by keys defined in IOHIDKeys.h.
  43. @result Returns a new IOHIDUserDeviceRef.
  44. */
  45. CF_EXPORT
  46. IOHIDUserDeviceRef IOHIDUserDeviceCreate(
  47. CFAllocatorRef allocator,
  48. CFDictionaryRef properties);
  49. /*!
  50. @function IOHIDUserDeviceHandleReport
  51. @abstract Dispatch a report to the IOHIDUserDevice.
  52. */
  53. CF_EXPORT
  54. IOReturn IOHIDUserDeviceHandleReport(
  55. IOHIDUserDeviceRef device,
  56. uint8_t * report,
  57. CFIndex reportLength);
  58. __END_DECLS
  59. #endif /* _IOKIT_HID_IOHIDUSERDEVICE_USER_H */