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.
10 // Opening the device succeeded.
13 // The device could not be opened because the request GUID is unknown.
16 // The operating system denied access to the device.
30 bool has_subclass_code;
33 bool has_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
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);