Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: device/hid/hid_device_info.h

Issue 161823002: Clean up HID backend and API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Many cleanup, such device ID, woww. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright 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_DEVICE_INFO_H_ 5 #ifndef DEVICE_HID_HID_DEVICE_INFO_H_
6 #define DEVICE_HID_HID_DEVICE_INFO_H_ 6 #define DEVICE_HID_HID_DEVICE_INFO_H_
7 7
8 #include <stdint.h>
9
8 #include <string> 10 #include <string>
9 11
10 #include "base/basictypes.h"
11
12 namespace device { 12 namespace device {
13 13
14 enum HidBusType { 14 enum HidBusType {
15 kHIDBusTypeUSB = 0, 15 kHIDBusTypeUSB = 0,
16 kHIDBusTypeBluetooth = 1, 16 kHIDBusTypeBluetooth = 1,
17 }; 17 };
18 18
19 typedef int HidDeviceId;
20
21 const HidDeviceId kInvalidHidDeviceId = -1;
22
19 struct HidDeviceInfo { 23 struct HidDeviceInfo {
20 HidDeviceInfo(); 24 HidDeviceInfo();
21 ~HidDeviceInfo(); 25 ~HidDeviceInfo();
22 26
23 std::string device_id; 27 int device_id;
Mark Mentovai 2014/02/21 17:48:18 HidDeviceId, right?
Ken Rockot(use gerrit already) 2014/02/22 01:17:04 Done.
24 28
25 HidBusType bus_type; 29 HidBusType bus_type;
26 uint16 vendor_id; 30 uint16_t vendor_id;
27 uint16 product_id; 31 uint16_t product_id;
28 32
29 size_t input_report_size; 33 int input_report_size;
30 size_t output_report_size; 34 int output_report_size;
31 size_t feature_report_size; 35 int feature_report_size;
32 36
33 uint16 usage_page; 37 uint16_t usage_page;
34 uint16 usage; 38 uint16_t usage;
35 bool has_report_id; 39 bool has_report_id;
36 40
37 std::string product_name; 41 std::string product_name;
38 std::string serial_number; 42 std::string serial_number;
39 }; 43 };
40 44
41 } // namespace device 45 } // namespace device
42 46
43 #endif // DEVICE_HID_HID_DEVICE_INFO_H_ 47 #endif // DEVICE_HID_HID_DEVICE_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698