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

Unified Diff: device/usb/public/interfaces/device_manager.mojom

Issue 1155163008: Build a basic Mojo service framework for device/usb (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DISALLOW Created 5 years, 7 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/public/interfaces/device_manager.mojom
diff --git a/device/usb/public/interfaces/device_manager.mojom b/device/usb/public/interfaces/device_manager.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..fcf1947085ed78b4b3abfe56f1d264aae9202426
--- /dev/null
+++ b/device/usb/public/interfaces/device_manager.mojom
@@ -0,0 +1,38 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module device.usb;
+
+import "device.mojom";
+
+struct DeviceFilter {
+ bool has_vendor_id;
+ uint16 vendor_id;
+
+ bool has_product_id;
+ uint16 product_id;
+
+ bool has_class_code;
+ uint8 class_code;
+
+ bool has_subclass_code;
+ uint8 subclass_code;
+
+ bool has_protocol_code;
+ uint8 protocol_code;
+};
+
+struct EnumerationOptions {
+ array<DeviceFilter> filters;
+};
+
+// TODO(rockot): Remove this wrapper struct. Mojom bindings do not yet support
+// arrays of interfaces.
+struct EnumerationResult {
+ Device device;
+};
+
+interface DeviceManager {
+ GetDevices(EnumerationOptions options) => (array<EnumerationResult> results);
+};
« 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