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

Unified Diff: device/bluetooth/bluetooth_remote_gatt_characteristic_android.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/bluetooth_remote_gatt_characteristic_android.h
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h b/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h
index 6058f910e007b6b9efe5bf370b87070f2cde6ba3..eed5c4623c56eb9384a41c552d9f0aa8d0991be6 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h
@@ -12,7 +12,8 @@
#include "base/android/jni_android.h"
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/macros.h"
-#include "device/bluetooth/bluetooth_gatt_characteristic.h"
+#include "device/bluetooth/bluetooth_remote_gatt_characteristic.h"
+#include "device/bluetooth/bluetooth_remote_gatt_service.h"
namespace device {
@@ -27,7 +28,7 @@ class BluetoothRemoteGattServiceAndroid;
// TODO(crbug.com/551634): When notifications are enabled characteristic updates
// should call observers' GattCharacteristicValueChanged.
class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattCharacteristicAndroid
- : public BluetoothGattCharacteristic {
+ : public BluetoothRemoteGattCharacteristic {
public:
// Create a BluetoothRemoteGattCharacteristicAndroid instance and associated
// Java
@@ -53,20 +54,17 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattCharacteristicAndroid
// Returns the associated ChromeBluetoothRemoteGattCharacteristic Java object.
base::android::ScopedJavaLocalRef<jobject> GetJavaObject();
- // BluetoothGattCharacteristic interface:
+ // BluetoothRemoteGattCharacteristic interface:
std::string GetIdentifier() const override;
BluetoothUUID GetUUID() const override;
- bool IsLocal() const override;
const std::vector<uint8_t>& GetValue() const override;
- BluetoothGattService* GetService() const override;
+ BluetoothRemoteGattService* GetService() const override;
Properties GetProperties() const override;
Permissions GetPermissions() const override;
bool IsNotifying() const override;
- std::vector<BluetoothGattDescriptor*> GetDescriptors() const override;
- BluetoothGattDescriptor* GetDescriptor(
+ std::vector<BluetoothRemoteGattDescriptor*> GetDescriptors() const override;
+ BluetoothRemoteGattDescriptor* GetDescriptor(
const std::string& identifier) const override;
- bool AddDescriptor(BluetoothGattDescriptor* descriptor) override;
- bool UpdateValue(const std::vector<uint8_t>& value) override;
void StartNotifySession(const NotifySessionCallback& callback,
const ErrorCallback& error_callback) override;
void ReadRemoteCharacteristic(const ValueCallback& callback,
@@ -79,7 +77,8 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattCharacteristicAndroid
void OnStartNotifySessionSuccess();
// Called when StartNotifySession operation fails.
- void OnStartNotifySessionError(BluetoothGattService::GattErrorCode error);
+ void OnStartNotifySessionError(
+ BluetoothRemoteGattService::GattErrorCode error);
// Called when value changed event occurs.
void OnChanged(JNIEnv* env,

Powered by Google App Engine
This is Rietveld 408576698