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

Unified Diff: device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.h

Issue 1920693002: Complete //device/bt implementation for hosting 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/dbus/fake_bluetooth_gatt_descriptor_service_provider.h
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.h b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.h
index ee82bcd4f783d1f58d93b110b57379e4e9eef996..51bfa57f05b5920276451f3dd2dbb087ce941cc2 100644
--- a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.h
+++ b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.h
@@ -6,13 +6,15 @@
#define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_DESCRIPTOR_SERVICE_PROVIDER_H_
#include <stdint.h>
-
#include <string>
#include <vector>
+#include "base/callback_forward.h"
#include "base/macros.h"
#include "dbus/object_path.h"
#include "device/bluetooth/bluetooth_export.h"
+#include "device/bluetooth/bluetooth_local_gatt_service.h"
+#include "device/bluetooth/bluez/bluetooth_gatt_service_bluez.h"
#include "device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider.h"
namespace bluez {
@@ -25,7 +27,7 @@ class DEVICE_BLUETOOTH_EXPORT FakeBluetoothGattDescriptorServiceProvider
public:
FakeBluetoothGattDescriptorServiceProvider(
const dbus::ObjectPath& object_path,
- Delegate* delegate,
+ BluetoothGattServiceBlueZ::AttributeValueDelegate* delegate,
const std::string& uuid,
const std::vector<std::string>& permissions,
const dbus::ObjectPath& characteristic_path);
@@ -37,13 +39,18 @@ class DEVICE_BLUETOOTH_EXPORT FakeBluetoothGattDescriptorServiceProvider
// Methods to simulate value get/set requests issued from a remote device. The
// methods do nothing, if the associated service was not registered with the
// GATT manager.
- void GetValue(const Delegate::ValueCallback& callback,
- const Delegate::ErrorCallback& error_callback);
- void SetValue(const std::vector<uint8_t>& value,
- const base::Closure& callback,
- const Delegate::ErrorCallback& error_callback);
-
- const dbus::ObjectPath& object_path() const { return object_path_; }
+ void GetValue(
+ const device::BluetoothLocalGattService::Delegate::ValueCallback&
+ callback,
+ const device::BluetoothLocalGattService::Delegate::ErrorCallback&
+ error_callback);
+ void SetValue(
+ const std::vector<uint8_t>& value,
+ const base::Closure& callback,
+ const device::BluetoothLocalGattService::Delegate::ErrorCallback&
+ error_callback);
+
+ const dbus::ObjectPath& object_path() const override;
const std::string& uuid() const { return uuid_; }
const dbus::ObjectPath& characteristic_path() const {
return characteristic_path_;
@@ -60,7 +67,7 @@ class DEVICE_BLUETOOTH_EXPORT FakeBluetoothGattDescriptorServiceProvider
dbus::ObjectPath characteristic_path_;
// The delegate that method calls are passed on to.
- Delegate* delegate_;
+ BluetoothGattServiceBlueZ::AttributeValueDelegate* delegate_;
DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattDescriptorServiceProvider);
};

Powered by Google App Engine
This is Rietveld 408576698