OLD | NEW |
(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_ |
OLD | NEW |