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

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

Powered by Google App Engine
This is Rietveld 408576698