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

Unified Diff: device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.h

Issue 1915803002: Bluetooth class changes for implementing local GATT attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
Index: device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.h
diff --git a/device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.h b/device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.h
index 566070ee22fba0cd97ca9935322a3adc7ddc6903..3520ef308b3e5ade9d8a5ccf4880fd9a9f95fcc8 100644
--- a/device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.h
+++ b/device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.h
@@ -7,25 +7,48 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
-#include "dbus/object_path.h"
+#include "device/bluetooth/bluetooth_local_gatt_characteristic.h"
#include "device/bluetooth/bluetooth_local_gatt_descriptor.h"
+#include "device/bluetooth/bluetooth_uuid.h"
#include "device/bluetooth/bluez/bluetooth_gatt_descriptor_bluez.h"
namespace bluez {
+class BluetoothLocalGattCharacteristicBlueZ;
+
// The BluetoothLocalGattDescriptorBlueZ class implements
// BluetoothRemoteGattDescriptor for remote and local GATT characteristic
-// descriptors
-// for platforms that use BlueZ.
+// descriptors for platforms that use BlueZ.
class BluetoothLocalGattDescriptorBlueZ
: public BluetoothGattDescriptorBlueZ,
public device::BluetoothLocalGattDescriptor {
public:
- private:
- explicit BluetoothLocalGattDescriptorBlueZ(
- const dbus::ObjectPath& object_path);
+ static base::WeakPtr<BluetoothLocalGattDescriptor> Create(
+ const device::BluetoothUUID& uuid,
+ device::BluetoothGattCharacteristic::Permissions permissions,
+ device::BluetoothLocalGattCharacteristic* characteristic);
+
+ BluetoothLocalGattDescriptorBlueZ(
+ const device::BluetoothUUID& uuid,
+ BluetoothLocalGattCharacteristicBlueZ* characteristic);
~BluetoothLocalGattDescriptorBlueZ() override;
+ // device::BluetoothLocalGattDescriptor overrides.
+ device::BluetoothUUID GetUUID() const override;
+ device::BluetoothGattCharacteristic::Permissions GetPermissions()
+ const override;
+
+ BluetoothLocalGattCharacteristicBlueZ* GetCharacteristic() const;
+
+ private:
+ // Needs access to weak_ptr_factory_.
+ friend class device::BluetoothLocalGattDescriptor;
+ // UUID of this descriptor.
+ device::BluetoothUUID uuid_;
+
+ // Characteristic that contains this descriptor.
+ BluetoothLocalGattCharacteristicBlueZ* characteristic_;
+
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothLocalGattDescriptorBlueZ> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698