| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_DELEGATE_WRAPPER_H_ | 5 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_DELEGATE_WRAPPER_H_ |
| 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_DELEGATE_WRAPPER_H_ | 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_DELEGATE_WRAPPER_H_ |
| 7 | 7 |
| 8 #include <cstdint> | 8 #include <cstdint> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 // Wrapper class around AttributeValueDelegate to handle characteristics. | 22 // Wrapper class around AttributeValueDelegate to handle characteristics. |
| 23 class BluetoothGattCharacteristicDelegateWrapper | 23 class BluetoothGattCharacteristicDelegateWrapper |
| 24 : public BluetoothGattAttributeValueDelegate { | 24 : public BluetoothGattAttributeValueDelegate { |
| 25 public: | 25 public: |
| 26 BluetoothGattCharacteristicDelegateWrapper( | 26 BluetoothGattCharacteristicDelegateWrapper( |
| 27 BluetoothLocalGattServiceBlueZ* service, | 27 BluetoothLocalGattServiceBlueZ* service, |
| 28 BluetoothLocalGattCharacteristicBlueZ* characteristic); | 28 BluetoothLocalGattCharacteristicBlueZ* characteristic); |
| 29 | 29 |
| 30 // BluetoothGattAttributeValueDelegate overrides: | 30 // BluetoothGattAttributeValueDelegate overrides: |
| 31 void GetValue( | 31 void GetValue( |
| 32 const dbus::ObjectPath& device_path, |
| 32 const device::BluetoothLocalGattService::Delegate::ValueCallback& | 33 const device::BluetoothLocalGattService::Delegate::ValueCallback& |
| 33 callback, | 34 callback, |
| 34 const device::BluetoothLocalGattService::Delegate::ErrorCallback& | 35 const device::BluetoothLocalGattService::Delegate::ErrorCallback& |
| 35 error_callback) override; | 36 error_callback) override; |
| 36 void SetValue( | 37 void SetValue( |
| 38 const dbus::ObjectPath& device_path, |
| 37 const std::vector<uint8_t>& value, | 39 const std::vector<uint8_t>& value, |
| 38 const base::Closure& callback, | 40 const base::Closure& callback, |
| 39 const device::BluetoothLocalGattService::Delegate::ErrorCallback& | 41 const device::BluetoothLocalGattService::Delegate::ErrorCallback& |
| 40 error_callback) override; | 42 error_callback) override; |
| 41 void StartNotifications() override; | 43 void StartNotifications() override; |
| 42 void StopNotifications() override; | 44 void StopNotifications() override; |
| 43 | 45 |
| 44 private: | 46 private: |
| 45 BluetoothLocalGattServiceBlueZ* service_; | |
| 46 BluetoothLocalGattCharacteristicBlueZ* characteristic_; | 47 BluetoothLocalGattCharacteristicBlueZ* characteristic_; |
| 47 | 48 |
| 48 DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristicDelegateWrapper); | 49 DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristicDelegateWrapper); |
| 49 }; | 50 }; |
| 50 | 51 |
| 51 } // namespace bluez | 52 } // namespace bluez |
| 52 | 53 |
| 53 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_DELEGATE_WRAPPER_
H_ | 54 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_DELEGATE_WRAPPER_
H_ |
| OLD | NEW |