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

Unified Diff: device/bluetooth/public/interfaces/device.mojom

Issue 2627243002: bluetooth: Add control for reading/writing of characteristics to internals page. (Closed)
Patch Set: Merge upstream, add comment detail for type converter Created 3 years, 11 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/bluetooth/device.cc ('k') | device/bluetooth/public/interfaces/gatt_result_type_converter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/public/interfaces/device.mojom
diff --git a/device/bluetooth/public/interfaces/device.mojom b/device/bluetooth/public/interfaces/device.mojom
index 2e3773ac787d780f9e9f8eebf5b6d830b7565bfb..baa361150d058cc8660554e3e7fbda3fbe9ee7ab 100644
--- a/device/bluetooth/public/interfaces/device.mojom
+++ b/device/bluetooth/public/interfaces/device.mojom
@@ -15,6 +15,7 @@ import "device/bluetooth/public/interfaces/uuid.mojom";
// contains additional properties pertaining to the characteristic.
// The properties |RELIABLE_WRITE| and |WRITABLE_AUXILIARIES| are retrieved from
// that characteristic.
+// TODO(crbug.com/684168): Remove assignment of values when this is automated.
enum Property {
NONE = 0,
BROADCAST = 1,
@@ -33,6 +34,20 @@ enum Property {
WRITE_ENCRYPTED_AUTHENTICATED = 8192
};
+enum GattResult {
+ SUCCESS,
+ UNKNOWN,
+ FAILED,
+ IN_PROGRESS,
+ INVALID_LENGTH,
+ NOT_PERMITTED,
+ NOT_AUTHORIZED,
+ NOT_PAIRED,
+ NOT_SUPPORTED,
+ SERVICE_NOT_FOUND,
+ CHARACTERISTIC_NOT_FOUND
+};
+
// TODO(crbug.com/657632): Remove when numerical values can be optional.
struct RSSIWrapper {
int8 value;
@@ -56,6 +71,7 @@ struct CharacteristicInfo {
string id;
UUID uuid;
uint32 properties;
+ array<uint8> last_known_value;
};
struct DescriptorInfo {
@@ -81,6 +97,16 @@ interface Device {
GetCharacteristics(string service_id) =>
(array<CharacteristicInfo>? characteristics);
+ // Reads the value for the GATT Characteristic with |characteristic_id| in
+ // the GATT Service with |service_id|.
+ ReadValueForCharacteristic(string service_id, string characteristic_id) =>
+ (GattResult result, array<uint8>? value);
+
+ // Writes the |value| to the GATT Characteristic with |characteristic_id| in
+ // the GATT Service with |service_id|.
+ WriteValueForCharacteristic(string service_id, string characteristic_id,
+ array<uint8> value) => (GattResult result);
+
// Gets the GATT Descriptors of the GATT Characteristic with matching
// |characteristic_id| in the GATT Service with matching |service_id|.
// If |descriptors| is null, an error occured while attempting to retrieve
« no previous file with comments | « device/bluetooth/device.cc ('k') | device/bluetooth/public/interfaces/gatt_result_type_converter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698