Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef DEVICE_HID_HID_UTILS_MAC_H_ | 5 #ifndef DEVICE_HID_HID_UTILS_MAC_H_ |
| 6 #define DEVICE_HID_HID_UTILS_MAC_H_ | 6 #define DEVICE_HID_HID_UTILS_MAC_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
|
Mark Mentovai
2014/02/13 22:37:51
Both of these #includes are unused.
Ken Rockot(use gerrit already)
2014/02/18 19:43:09
Done.
| |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 | 10 |
| 11 #include <IOKit/hid/IOHIDManager.h> | 11 #include <IOKit/hid/IOHIDManager.h> |
|
Mark Mentovai
2014/02/13 22:37:51
You also need <CoreFoundation/CoreFoundation.h>, <
Ken Rockot(use gerrit already)
2014/02/18 19:43:09
Done.
| |
| 12 | 12 |
| 13 namespace device { | 13 namespace device { |
| 14 | 14 |
| 15 bool GetHidIntProperty(IOHIDDeviceRef device, CFStringRef key, int32_t* result); | 15 int32_t GetHidIntProperty(IOHIDDeviceRef device, CFStringRef key); |
| 16 | 16 |
| 17 bool GetHidStringProperty(IOHIDDeviceRef device, | 17 std::string GetHidStringProperty(IOHIDDeviceRef device, CFStringRef key); |
| 18 CFStringRef key, | 18 |
| 19 std::string* result); | 19 bool TryGetHidIntProperty(IOHIDDeviceRef device, |
| 20 CFStringRef key, | |
| 21 int32_t* result); | |
| 22 | |
| 23 bool TryGetHidStringProperty(IOHIDDeviceRef device, | |
| 24 CFStringRef key, | |
| 25 std::string* result); | |
| 20 | 26 |
| 21 } // namespace device | 27 } // namespace device |
| 22 | 28 |
| 23 #endif // DEVICE_HID_HID_UTILS_MAC_H_ | 29 #endif // DEVICE_HID_HID_UTILS_MAC_H_ |
| OLD | NEW |