cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / device / devices_app / usb / public / interfaces / device_manager.mojom
blobffb05d52057ab4b0938556605c713150adfeafad
1 // Copyright 2015 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 module device.usb;
7 import "device.mojom";
9 enum OpenDeviceError {
10   // Opening the device succeeded.
11   OK,
13   // The device could not be opened because the request GUID is unknown.
14   NOT_FOUND,
16   // The operating system denied access to the device.
17   ACCESS_DENIED,
20 struct DeviceFilter {
21   bool has_vendor_id;
22   uint16 vendor_id;
24   bool has_product_id;
25   uint16 product_id;
27   bool has_class_code;
28   uint8 class_code;
30   bool has_subclass_code;
31   uint8 subclass_code;
33   bool has_protocol_code;
34   uint8 protocol_code;
37 struct EnumerationOptions {
38   array<DeviceFilter> filters;
41 struct DeviceChangeNotification {
42   array<DeviceInfo> devices_added;
43   array<string> devices_removed;
46 interface DeviceManager {
47   // Retrieves information about all devices available to the DeviceManager
48   // implementation.
49   GetDevices(EnumerationOptions options) => (array<DeviceInfo> results);
51   // Retrieves information about changes to the set of devices available to the
52   // DeviceManager since the last call to this method. The first call will
53   // return the set of all devices available. Device added and removed between
54   // calls will not be included.
55   GetDeviceChanges() => (DeviceChangeNotification changes);
57   // Attempts to open a device given its GUID.
58   OpenDevice(string guid, Device& device_request) => (OpenDeviceError error);