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

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

Issue 1898643002: Refactor device::BluetoothGattXXX classes to split into remote/local. (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_gatt_characteristic_bluez.h
diff --git a/device/bluetooth/bluetooth_gatt_characteristic_bluez.h b/device/bluetooth/bluez/bluetooth_gatt_characteristic_bluez.h
similarity index 43%
rename from device/bluetooth/bluetooth_gatt_characteristic_bluez.h
rename to device/bluetooth/bluez/bluetooth_gatt_characteristic_bluez.h
index adf75212a1791def532fed9f98614b16534ebf39..4c0848c05e8502b459d877bdec1f69efcefa21e1 100644
--- a/device/bluetooth/bluetooth_gatt_characteristic_bluez.h
+++ b/device/bluetooth/bluez/bluetooth_gatt_characteristic_bluez.h
@@ -2,68 +2,36 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef DEVICE_BLUETOOTH_BLUETOOTH_GATT_CHARACTERISTIC_BLUEZ_H_
-#define DEVICE_BLUETOOTH_BLUETOOTH_GATT_CHARACTERISTIC_BLUEZ_H_
+#ifndef DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_GATT_CHARACTERISTIC_BLUEZ_H_
+#define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_GATT_CHARACTERISTIC_BLUEZ_H_
-#include <map>
#include <string>
-#include <vector>
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "dbus/object_path.h"
#include "device/bluetooth/bluetooth_gatt_characteristic.h"
-namespace device {
-
-class BluetoothGattDescriptor;
-class BluetoothGattService;
-
-} // namespace device
-
namespace bluez {
-class BluetoothGattDescriptorBlueZ;
-class BluetoothGattServiceBlueZ;
-
// The BluetoothGattCharacteristicBlueZ class implements
-// BluetoothGattCharacteristic for GATT characteristics for platforms
+// BluetoothRemoteGattCharacteristic for GATT characteristics for platforms
// that use BlueZ.
class BluetoothGattCharacteristicBlueZ
- : public device::BluetoothGattCharacteristic {
+ : public virtual device::BluetoothGattCharacteristic {
public:
// device::BluetoothGattCharacteristic overrides.
std::string GetIdentifier() const override;
- device::BluetoothGattService* GetService() const override;
- Permissions GetPermissions() const override;
- std::vector<device::BluetoothGattDescriptor*> GetDescriptors() const override;
- device::BluetoothGattDescriptor* GetDescriptor(
- const std::string& identifier) const override;
// Object path of the underlying D-Bus characteristic.
const dbus::ObjectPath& object_path() const { return object_path_; }
protected:
- BluetoothGattCharacteristicBlueZ(BluetoothGattServiceBlueZ* service,
- const dbus::ObjectPath& object_path);
+ explicit BluetoothGattCharacteristicBlueZ(
+ const dbus::ObjectPath& object_path);
~BluetoothGattCharacteristicBlueZ() override;
- // Does not take ownership of the descriptor object.
- using DescriptorMap =
- std::map<dbus::ObjectPath, BluetoothGattDescriptorBlueZ*>;
-
- // Mapping from GATT descriptor object paths to descriptor objects owned by
- // this characteristic. Since the BlueZ implementation uses object paths
- // as unique identifiers, we also use this mapping to return descriptors by
- // identifier.
- DescriptorMap descriptors_;
-
- // The GATT service this GATT characteristic belongs to.
- BluetoothGattServiceBlueZ* service_;
-
private:
- friend class BluetoothRemoteGattServiceBlueZ;
-
// Object path of the D-Bus characteristic object.
dbus::ObjectPath object_path_;
@@ -76,4 +44,4 @@ class BluetoothGattCharacteristicBlueZ
} // namespace bluez
-#endif // DEVICE_BLUETOOTH_BLUETOOTH_GATT_CHARACTERISTIC_BLUEZ_H_
+#endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_GATT_CHARACTERISTIC_BLUEZ_H_
« no previous file with comments | « device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc ('k') | device/bluetooth/bluez/bluetooth_gatt_characteristic_bluez.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698