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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/bluez/bluetooth_gatt_descriptor_bluez.h
diff --git a/device/bluetooth/bluez/bluetooth_gatt_descriptor_bluez.h b/device/bluetooth/bluez/bluetooth_gatt_descriptor_bluez.h
new file mode 100644
index 0000000000000000000000000000000000000000..c079b0027466ad2bf12c552e4c030ce6f7353d49
--- /dev/null
+++ b/device/bluetooth/bluez/bluetooth_gatt_descriptor_bluez.h
@@ -0,0 +1,48 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_GATT_DESCRIPTOR_BLUEZ_H_
+#define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_GATT_DESCRIPTOR_BLUEZ_H_
+
+#include <string>
+
+#include "base/macros.h"
+#include "dbus/object_path.h"
+#include "device/bluetooth/bluetooth_gatt_descriptor.h"
+
+namespace bluez {
+
+class BluetoothGattCharacteristicBlueZ;
+
+// The BluetoothGattDescriptorBlueZ class implements BluetoothGattDescriptor for
+// GATT characteristic descriptors for platforms that use BlueZ.
+class BluetoothGattDescriptorBlueZ
+ : public virtual device::BluetoothGattDescriptor {
+ public:
+ // device::BluetoothGattDescriptor overrides.
+ std::string GetIdentifier() const override;
+
+ // Object path of the underlying D-Bus characteristic.
+ const dbus::ObjectPath& object_path() const { return object_path_; }
+
+ protected:
+ explicit BluetoothGattDescriptorBlueZ(const dbus::ObjectPath& object_path);
+ ~BluetoothGattDescriptorBlueZ() override;
+
+ private:
+ // Called by dbus:: on unsuccessful completion of a request to read or write
+ // the descriptor value.
+ void OnError(const ErrorCallback& error_callback,
+ const std::string& error_name,
+ const std::string& error_message);
+
+ // Object path of the D-Bus descriptor object.
+ dbus::ObjectPath object_path_;
+
+ DISALLOW_COPY_AND_ASSIGN(BluetoothGattDescriptorBlueZ);
+};
+
+} // namespace bluez
+
+#endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_GATT_DESCRIPTOR_BLUEZ_H_

Powered by Google App Engine
This is Rietveld 408576698