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

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

Issue 1979163002: Add DBus plumbing and tests for sending devices with ATT read/writes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@devices
Patch Set: gyp 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
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_DESCRIPTOR_DELEGATE_WRAPPER_H_ 5 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_DESCRIPTOR_DELEGATE_WRAPPER_H_
6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_DESCRIPTOR_DELEGATE_WRAPPER_H_ 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_DESCRIPTOR_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
22 // Wrapper class around AttributeValueDelegate to handle descriptors. 22 // Wrapper class around AttributeValueDelegate to handle descriptors.
23 class BluetoothGattDescriptorDelegateWrapper 23 class BluetoothGattDescriptorDelegateWrapper
24 : public BluetoothGattAttributeValueDelegate { 24 : public BluetoothGattAttributeValueDelegate {
25 public: 25 public:
26 BluetoothGattDescriptorDelegateWrapper( 26 BluetoothGattDescriptorDelegateWrapper(
27 BluetoothLocalGattServiceBlueZ* service, 27 BluetoothLocalGattServiceBlueZ* service,
28 BluetoothLocalGattDescriptorBlueZ* descriptor); 28 BluetoothLocalGattDescriptorBlueZ* descriptor);
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 BluetoothLocalGattDescriptorBlueZ* descriptor_; 47 BluetoothLocalGattDescriptorBlueZ* descriptor_;
47 48
48 DISALLOW_COPY_AND_ASSIGN(BluetoothGattDescriptorDelegateWrapper); 49 DISALLOW_COPY_AND_ASSIGN(BluetoothGattDescriptorDelegateWrapper);
49 }; 50 };
50 51
51 } // namespace bluez 52 } // namespace bluez
52 53
53 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_DESCRIPTOR_DELEGATE_WRAPPER_H_ 54 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_DESCRIPTOR_DELEGATE_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698