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

Unified Diff: device/bluetooth/dbus/bluetooth_adapter_client.h

Issue 2084463002: BlueZ + DBus implementations of create/remove service record functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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/dbus/bluetooth_adapter_client.h
diff --git a/device/bluetooth/dbus/bluetooth_adapter_client.h b/device/bluetooth/dbus/bluetooth_adapter_client.h
index 199b99293c3d8cc19e7d187d1f4a4fd8cba608d9..ba625268a864e439aa4c4ae79537a6385f1a4277 100644
--- a/device/bluetooth/dbus/bluetooth_adapter_client.h
+++ b/device/bluetooth/dbus/bluetooth_adapter_client.h
@@ -5,23 +5,26 @@
#ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_
#define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_
-#include <stdint.h>
-
+#include <cstdint>
#include <memory>
#include <string>
#include <vector>
-#include "base/callback.h"
+#include "base/callback_forward.h"
#include "base/macros.h"
-#include "base/observer_list.h"
-#include "base/values.h"
#include "dbus/object_path.h"
#include "dbus/property.h"
#include "device/bluetooth/bluetooth_export.h"
#include "device/bluetooth/dbus/bluez_dbus_client.h"
+namespace dbus {
+class ObjectProxy;
+}
+
namespace bluez {
+class BluetoothServiceRecordBlueZ;
+
// BluetoothAdapterClient is used to communicate with objects representing
// local Bluetooth Adapters.
class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterClient : public BluezDBusClient {
@@ -134,6 +137,9 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterClient : public BluezDBusClient {
// any values should be copied if needed.
virtual Properties* GetProperties(const dbus::ObjectPath& object_path) = 0;
+ // Callback used to send back the handle of a created service record.
+ using ServiceRecordCallback = base::Callback<void(uint32_t)>;
+
// The ErrorCallback is used by adapter methods to indicate failure.
// It receives two arguments: the name of the error in |error_name| and
// an optional message in |error_message|.
@@ -170,6 +176,20 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterClient : public BluezDBusClient {
const base::Closure& callback,
const ErrorCallback& error_callback) = 0;
+ // Creates the service record |record| on the adapter with the object path
+ // |object_path|.
+ virtual void CreateServiceRecord(const dbus::ObjectPath& object_path,
+ const BluetoothServiceRecordBlueZ& record,
+ const ServiceRecordCallback& callback,
+ const ErrorCallback& error_callback) = 0;
+
+ // Removes the service record with the uuid |uuid| on the adapter with the
+ // object path |object_path|.
+ virtual void RemoveServiceRecord(const dbus::ObjectPath& object_path,
+ uint32_t handle,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) = 0;
+
// Creates the instance.
static BluetoothAdapterClient* Create();
« no previous file with comments | « device/bluetooth/bluez/bluetooth_service_record_bluez_unittest.cc ('k') | device/bluetooth/dbus/bluetooth_adapter_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698