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

Side by Side Diff: device/bluetooth/dbus/bluetooth_gatt_characteristic_delegate_wrapper.h

Issue 1914893002: DBus changes for implementing local GATT attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth_classes
Patch Set: test leak fix Created 4 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_DELEGATE_WRAPPER_H_
6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_DELEGATE_WRAPPER_H_
7
8 #include <cstdint>
9 #include <vector>
10
11 #include "base/callback_forward.h"
12 #include "base/macros.h"
13 #include "device/bluetooth/bluetooth_local_gatt_service.h"
14 #include "device/bluetooth/bluez/bluetooth_gatt_service_bluez.h"
15 #include "device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.h"
16 #include "device/bluetooth/dbus/bluetooth_gatt_attribute_value_delegate.h"
17
18 namespace bluez {
19
20 class BluetoothLocalGattCharacteristicBlueZ;
21
22 // Wrapper class around AttributeValueDelegate to handle characteristics.
23 class BluetoothGattCharacteristicDelegateWrapper
24 : public BluetoothGattAttributeValueDelegate {
25 public:
26 BluetoothGattCharacteristicDelegateWrapper(
27 BluetoothLocalGattServiceBlueZ* service,
28 BluetoothLocalGattCharacteristicBlueZ* characteristic);
29
30 void GetValue(
31 const device::BluetoothLocalGattService::Delegate::ValueCallback&
32 callback,
33 const device::BluetoothLocalGattService::Delegate::ErrorCallback&
34 error_callback) override;
35 void SetValue(
36 const std::vector<uint8_t>& value,
37 const base::Closure& callback,
38 const device::BluetoothLocalGattService::Delegate::ErrorCallback&
39 error_callback) override;
40
41 private:
42 BluetoothLocalGattServiceBlueZ* service_;
43 BluetoothLocalGattCharacteristicBlueZ* characteristic_;
44
45 DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristicDelegateWrapper);
46 };
47
48 } // namespace bluez
49
50 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_DELEGATE_WRAPPER_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698