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

Unified Diff: device/bluetooth/bluetooth_gatt_characteristic.h

Issue 1947353002: //device/bluetooth support for attribute properties and permissions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@properties
Patch Set: Created 4 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 | « no previous file | device/bluetooth/bluetooth_local_gatt_characteristic_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_gatt_characteristic.h
diff --git a/device/bluetooth/bluetooth_gatt_characteristic.h b/device/bluetooth/bluetooth_gatt_characteristic.h
index 04504d45bcefb820ab418a9d8a06d34902d46b42..ed151ad89772a729c4fc709f2801d7bba1d5e944 100644
--- a/device/bluetooth/bluetooth_gatt_characteristic.h
+++ b/device/bluetooth/bluetooth_gatt_characteristic.h
@@ -46,7 +46,12 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothGattCharacteristic {
PROPERTY_AUTHENTICATED_SIGNED_WRITES = 1 << 6,
PROPERTY_EXTENDED_PROPERTIES = 1 << 7,
PROPERTY_RELIABLE_WRITE = 1 << 8,
- PROPERTY_WRITABLE_AUXILIARIES = 1 << 9
+ PROPERTY_WRITABLE_AUXILIARIES = 1 << 9,
+ PROPERTY_READ_ENCRYPTED = 1 << 10,
+ PROPERTY_WRITE_ENCRYPTED = 1 << 11,
+ PROPERTY_READ_ENCRYPTED_AUTHENTICATED = 1 << 12,
+ PROPERTY_WRITE_ENCRYPTED_AUTHENTICATED = 1 << 13,
+ NUM_PROPERTY = 1 << 14,
};
typedef uint32_t Properties;
@@ -61,12 +66,19 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothGattCharacteristic {
// the permission |PERMISSION_READ_ENCRYPTED| to require a secure connection.
// It is up to the application to properly specify the permissions and
// properties for a local characteristic.
+ // TODO(rkc): Currently BlueZ infers permissions for characteristics from
+ // the properties. Once this is fixed, we will start sending the permissions
+ // for characteristics to BlueZ. Till then permissions for characteristics
+ // are unimplemented.
enum Permission {
PERMISSION_NONE = 0,
PERMISSION_READ = 1 << 0,
PERMISSION_WRITE = 1 << 1,
PERMISSION_READ_ENCRYPTED = 1 << 2,
- PERMISSION_WRITE_ENCRYPTED = 1 << 3
+ PERMISSION_WRITE_ENCRYPTED = 1 << 3,
+ PERMISSION_READ_ENCRYPTED_AUTHENTICATED = 1 << 4,
+ PERMISSION_WRITE_ENCRYPTED_AUTHENTICATED = 1 << 5,
+ NUM_PERMISSION = 1 << 6,
};
typedef uint32_t Permissions;
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_local_gatt_characteristic_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698