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
3 // found in the LICENSE file.
5 #ifndef DEVICE_HID_HID_REPORT_DESCRIPTOR_H_
6 #define DEVICE_HID_HID_REPORT_DESCRIPTOR_H_
10 #include "base/memory/linked_ptr.h"
11 #include "device/hid/hid_report_descriptor_item.h"
12 #include "device/hid/hid_usage_and_page.h"
16 // HID report descriptor.
17 // See section 6.2.2 of HID specifications (v1.11).
18 class HidReportDescriptor
{
21 HidReportDescriptor(const uint8_t* bytes
, size_t size
);
22 ~HidReportDescriptor();
24 const std::vector
<linked_ptr
<HidReportDescriptorItem
> >& items() const {
28 // Returns HID usages of top-level collections present in the descriptor.
29 void GetTopLevelCollections(
30 std::vector
<HidUsageAndPage
>* topLevelCollections
);
33 std::vector
<linked_ptr
<HidReportDescriptorItem
> > items_
;
38 #endif // DEVICE_HID_HID_REPORT_DESCRIPTOR_H_