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

Side by Side Diff: device/usb/public/interfaces/device_manager.mojom

Issue 1183443002: Reland: Introduce the devices Mojo app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn check... Created 5 years, 6 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
« no previous file with comments | « device/usb/public/interfaces/device.mojom ('k') | device/usb/type_converters.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 module device.usb;
6
7 import "device.mojom";
8
9 enum OpenDeviceError {
10 // Opening the device succeeded.
11 OK,
12
13 // The device could not be opened because the request GUID is unknown.
14 NOT_FOUND,
15
16 // The operating system denied access to the device.
17 ACCESS_DENIED,
18 };
19
20 struct DeviceFilter {
21 bool has_vendor_id;
22 uint16 vendor_id;
23
24 bool has_product_id;
25 uint16 product_id;
26
27 bool has_class_code;
28 uint8 class_code;
29
30 bool has_subclass_code;
31 uint8 subclass_code;
32
33 bool has_protocol_code;
34 uint8 protocol_code;
35 };
36
37 struct EnumerationOptions {
38 array<DeviceFilter> filters;
39 };
40
41 interface DeviceManager {
42 // Retrieves information about all devices available to the DeviceManager
43 // implementation.
44 GetDevices(EnumerationOptions options) => (array<DeviceInfo> results);
45
46 // Attempts to open a device given its GUID.
47 OpenDevice(string guid, Device& device_request) => (OpenDeviceError error);
48 };
OLDNEW
« no previous file with comments | « device/usb/public/interfaces/device.mojom ('k') | device/usb/type_converters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698