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

Unified Diff: device/bluetooth/bluez/bluetooth_gatt_service_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_service_bluez.h
diff --git a/device/bluetooth/bluetooth_gatt_service_bluez.h b/device/bluetooth/bluez/bluetooth_gatt_service_bluez.h
similarity index 58%
rename from device/bluetooth/bluetooth_gatt_service_bluez.h
rename to device/bluetooth/bluez/bluetooth_gatt_service_bluez.h
index bdd03f0e0bd0336bf68d08acd396281ff5d901a4..3aaee449a8699f820492b33e4ae650409dfa8a96 100644
--- a/device/bluetooth/bluetooth_gatt_service_bluez.h
+++ b/device/bluetooth/bluez/bluetooth_gatt_service_bluez.h
@@ -2,8 +2,8 @@
// 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_SERVICE_BLUEZ_H_
-#define DEVICE_BLUETOOTH_BLUETOOTH_GATT_SERVICE_BLUEZ_H_
+#ifndef DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_GATT_SERVICE_BLUEZ_H_
+#define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_GATT_SERVICE_BLUEZ_H_
#include <map>
#include <string>
@@ -13,30 +13,17 @@
#include "dbus/object_path.h"
#include "device/bluetooth/bluetooth_gatt_service.h"
-namespace device {
-
-class BluetoothGattCharacteristic;
-
-} // namespace device
-
namespace bluez {
class BluetoothAdapterBlueZ;
class BluetoothDeviceBlueZ;
-class BluetoothGattCharacteristicBlueZ;
// The BluetoothGattServiceBlueZ class implements BluetootGattService
// for GATT services on platforms that use BlueZ.
-class BluetoothGattServiceBlueZ : public device::BluetoothGattService {
+class BluetoothGattServiceBlueZ : public virtual device::BluetoothGattService {
public:
// device::BluetoothGattService overrides.
std::string GetIdentifier() const override;
- std::vector<device::BluetoothGattCharacteristic*> GetCharacteristics()
- const override;
- std::vector<device::BluetoothGattService*> GetIncludedServices()
- const override;
- device::BluetoothGattCharacteristic* GetCharacteristic(
- const std::string& identifier) const override;
// Object path of the underlying service.
const dbus::ObjectPath& object_path() const { return object_path_; }
@@ -53,16 +40,6 @@ class BluetoothGattServiceBlueZ : public device::BluetoothGattService {
const dbus::ObjectPath& object_path);
~BluetoothGattServiceBlueZ() override;
- // Does not take ownership of the characteristic object.
- using CharacteristicMap =
- std::map<dbus::ObjectPath, BluetoothGattCharacteristicBlueZ*>;
-
- // Mapping from GATT characteristic object paths to characteristic objects.
- // owned by this service. Since the BlueZ implementation uses object
- // paths as unique identifiers, we also use this mapping to return
- // characteristics by identifier.
- CharacteristicMap characteristics_;
-
private:
friend class BluetoothDeviceBlueZ;
@@ -78,4 +55,4 @@ class BluetoothGattServiceBlueZ : public device::BluetoothGattService {
} // namespace bluez
-#endif // DEVICE_BLUETOOTH_BLUETOOTH_GATT_SERVICE_BLUEZ_H_
+#endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_GATT_SERVICE_BLUEZ_H_
« no previous file with comments | « device/bluetooth/bluez/bluetooth_gatt_notify_session_bluez.cc ('k') | device/bluetooth/bluez/bluetooth_gatt_service_bluez.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698