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

Side by Side Diff: device/bluetooth/public/interfaces/device.mojom

Issue 2649473002: bluetooth: Add control for reading/writing of descriptor values to internals page. (Closed)
Patch Set: Merge upstream Created 3 years, 10 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/bluetooth/device.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module bluetooth.mojom; 5 module bluetooth.mojom;
6 6
7 import "device/bluetooth/public/interfaces/uuid.mojom"; 7 import "device/bluetooth/public/interfaces/uuid.mojom";
8 8
9 // Values representing the possible properties of a characteristic, which 9 // Values representing the possible properties of a characteristic, which
10 // define how the characteristic can be used. Each of these properties serve 10 // define how the characteristic can be used. Each of these properties serve
(...skipping 27 matching lines...) Expand all
38 SUCCESS, 38 SUCCESS,
39 UNKNOWN, 39 UNKNOWN,
40 FAILED, 40 FAILED,
41 IN_PROGRESS, 41 IN_PROGRESS,
42 INVALID_LENGTH, 42 INVALID_LENGTH,
43 NOT_PERMITTED, 43 NOT_PERMITTED,
44 NOT_AUTHORIZED, 44 NOT_AUTHORIZED,
45 NOT_PAIRED, 45 NOT_PAIRED,
46 NOT_SUPPORTED, 46 NOT_SUPPORTED,
47 SERVICE_NOT_FOUND, 47 SERVICE_NOT_FOUND,
48 CHARACTERISTIC_NOT_FOUND 48 CHARACTERISTIC_NOT_FOUND,
49 DESCRIPTOR_NOT_FOUND
49 }; 50 };
50 51
51 // TODO(crbug.com/657632): Remove when numerical values can be optional. 52 // TODO(crbug.com/657632): Remove when numerical values can be optional.
52 struct RSSIWrapper { 53 struct RSSIWrapper {
53 int8 value; 54 int8 value;
54 }; 55 };
55 56
56 struct DeviceInfo { 57 struct DeviceInfo {
57 string? name; 58 string? name;
58 string name_for_display; 59 string name_for_display;
(...skipping 11 matching lines...) Expand all
70 struct CharacteristicInfo { 71 struct CharacteristicInfo {
71 string id; 72 string id;
72 UUID uuid; 73 UUID uuid;
73 uint32 properties; 74 uint32 properties;
74 array<uint8> last_known_value; 75 array<uint8> last_known_value;
75 }; 76 };
76 77
77 struct DescriptorInfo { 78 struct DescriptorInfo {
78 string id; 79 string id;
79 UUID uuid; 80 UUID uuid;
81 array<uint8> last_known_value;
80 }; 82 };
81 83
82 interface Device { 84 interface Device {
83 // Disconnects and deletes the Device. 85 // Disconnects and deletes the Device.
84 Disconnect(); 86 Disconnect();
85 87
86 // Gets basic information about the device. Returns null, if no device is 88 // Gets basic information about the device. Returns null, if no device is
87 // available. 89 // available.
88 GetInfo() => (DeviceInfo? info); 90 GetInfo() => (DeviceInfo? info);
89 91
(...skipping 17 matching lines...) Expand all
107 WriteValueForCharacteristic(string service_id, string characteristic_id, 109 WriteValueForCharacteristic(string service_id, string characteristic_id,
108 array<uint8> value) => (GattResult result); 110 array<uint8> value) => (GattResult result);
109 111
110 // Gets the GATT Descriptors of the GATT Characteristic with matching 112 // Gets the GATT Descriptors of the GATT Characteristic with matching
111 // |characteristic_id| in the GATT Service with matching |service_id|. 113 // |characteristic_id| in the GATT Service with matching |service_id|.
112 // If |descriptors| is null, an error occured while attempting to retrieve 114 // If |descriptors| is null, an error occured while attempting to retrieve
113 // the array of descriptors. If |descriptors| is empty, this simply 115 // the array of descriptors. If |descriptors| is empty, this simply
114 // means that no descriptors were found. 116 // means that no descriptors were found.
115 GetDescriptors(string service_id, string characteristic_id) => 117 GetDescriptors(string service_id, string characteristic_id) =>
116 (array<DescriptorInfo>? descriptors); 118 (array<DescriptorInfo>? descriptors);
119
120 // Reads the value for the GATT Descriptor with |descriptor_id| in the GATT
121 // Characteristic with |characteristic_id| in the GATT Service with
122 // |service_id|.
123 ReadValueForDescriptor(string service_id, string characteristic_id,
124 string descriptor_id) => (GattResult result, array<uint8>? value);
125
126 // Writes the |value| for the GATT Descriptor with |descriptor_id| in the GATT
127 // Characteristic with |characteristic_id| in the GATT Service with
128 // |service_id|.
129 WriteValueForDescriptor(string service_id, string characteristic_id,
130 string descriptor_id, array<uint8> value) => (GattResult result);
117 }; 131 };
OLDNEW
« no previous file with comments | « device/bluetooth/device.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698