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

Side by Side Diff: device/bluetooth/bluez/bluetooth_gatt_descriptor_bluez.h

Issue 1915803002: Bluetooth class changes for implementing local GATT attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: magic values 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_BLUEZ_BLUETOOTH_GATT_DESCRIPTOR_BLUEZ_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_GATT_DESCRIPTOR_BLUEZ_H_
6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_GATT_DESCRIPTOR_BLUEZ_H_ 6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_GATT_DESCRIPTOR_BLUEZ_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "dbus/object_path.h" 11 #include "dbus/object_path.h"
12 #include "device/bluetooth/bluetooth_gatt_descriptor.h" 12 #include "device/bluetooth/bluetooth_gatt_descriptor.h"
13 13
14 namespace bluez { 14 namespace bluez {
15 15
16 class BluetoothGattCharacteristicBlueZ; 16 class BluetoothGattCharacteristicBlueZ;
17 17
18 // The BluetoothGattDescriptorBlueZ class implements BluetoothGattDescriptor for 18 // The BluetoothGattDescriptorBlueZ class implements BluetoothGattDescriptor for
19 // GATT characteristic descriptors for platforms that use BlueZ. 19 // GATT characteristic descriptors for platforms that use BlueZ.
20 class BluetoothGattDescriptorBlueZ 20 class BluetoothGattDescriptorBlueZ
21 : public virtual device::BluetoothGattDescriptor { 21 : public virtual device::BluetoothGattDescriptor {
22 public: 22 public:
23 // device::BluetoothGattDescriptor overrides. 23 // device::BluetoothGattDescriptor overrides.
24 std::string GetIdentifier() const override; 24 std::string GetIdentifier() const override;
25 25
26 // Object path of the underlying D-Bus characteristic. 26 // Object path of the underlying D-Bus characteristic.
27 const dbus::ObjectPath& object_path() const { return object_path_; } 27 const dbus::ObjectPath& object_path() const { return object_path_; }
28 28
29 protected: 29 protected:
30 explicit BluetoothGattDescriptorBlueZ(const dbus::ObjectPath& object_path); 30 BluetoothGattDescriptorBlueZ();
31 ~BluetoothGattDescriptorBlueZ() override; 31 ~BluetoothGattDescriptorBlueZ() override;
32 32
33 // Object path of the D-Bus descriptor object.
34 dbus::ObjectPath object_path_;
35
33 private: 36 private:
34 // Called by dbus:: on unsuccessful completion of a request to read or write 37 // Called by dbus:: on unsuccessful completion of a request to read or write
35 // the descriptor value. 38 // the descriptor value.
36 void OnError(const ErrorCallback& error_callback, 39 void OnError(const ErrorCallback& error_callback,
37 const std::string& error_name, 40 const std::string& error_name,
38 const std::string& error_message); 41 const std::string& error_message);
39 42
40 // Object path of the D-Bus descriptor object.
41 dbus::ObjectPath object_path_;
42
43 DISALLOW_COPY_AND_ASSIGN(BluetoothGattDescriptorBlueZ); 43 DISALLOW_COPY_AND_ASSIGN(BluetoothGattDescriptorBlueZ);
44 }; 44 };
45 45
46 } // namespace bluez 46 } // namespace bluez
47 47
48 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_GATT_DESCRIPTOR_BLUEZ_H_ 48 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_GATT_DESCRIPTOR_BLUEZ_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698