summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/bluetooth_agent_manager_client.h
diff options
context:
space:
mode:
authorkeybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-12 14:47:32 +0000
committerkeybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-12 14:47:32 +0000
commit627f4f4ec29191d02998358a0b9d8896547ffca1 (patch)
treedba063c373e62ef6dca9cd8dd0fc05150aa8efd4 /chromeos/dbus/bluetooth_agent_manager_client.h
parent5ddc6f5f34fc08363a5acbdd089a1d8be680e8fb (diff)
downloadchromium_src-627f4f4ec29191d02998358a0b9d8896547ffca1.zip
chromium_src-627f4f4ec29191d02998358a0b9d8896547ffca1.tar.gz
chromium_src-627f4f4ec29191d02998358a0b9d8896547ffca1.tar.bz2
Bluetooth: drop "Experimental" from Chrome OS backend
BUG=221813 TEST=device_unittests Review URL: https://chromiumcodereview.appspot.com/14932007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205777 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus/bluetooth_agent_manager_client.h')
-rw-r--r--chromeos/dbus/bluetooth_agent_manager_client.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/chromeos/dbus/bluetooth_agent_manager_client.h b/chromeos/dbus/bluetooth_agent_manager_client.h
new file mode 100644
index 0000000..acf0465
--- /dev/null
+++ b/chromeos/dbus/bluetooth_agent_manager_client.h
@@ -0,0 +1,73 @@
+// Copyright 2013 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 CHROMEOS_DBUS_BLUETOOTH_AGENT_MANAGER_CLIENT_H_
+#define CHROMEOS_DBUS_BLUETOOTH_AGENT_MANAGER_CLIENT_H_
+
+#include <string>
+#include <vector>
+
+#include "base/callback.h"
+#include "base/values.h"
+#include "chromeos/chromeos_export.h"
+#include "chromeos/dbus/dbus_client_implementation_type.h"
+#include "dbus/object_path.h"
+
+namespace dbus {
+class Bus;
+} // namespace dbus
+
+namespace chromeos {
+
+// BluetoothAgentManagerClient is used to communicate with the agent manager
+// object of the Bluetooth daemon.
+class CHROMEOS_EXPORT BluetoothAgentManagerClient {
+ public:
+ virtual ~BluetoothAgentManagerClient();
+
+ // The ErrorCallback is used by agent manager methods to indicate failure.
+ // It receives two arguments: the name of the error in |error_name| and
+ // an optional message in |error_message|.
+ typedef base::Callback<void(const std::string& error_name,
+ const std::string& error_message)> ErrorCallback;
+
+ // Registers an agent within the local process at the D-bus object path
+ // |agent_path| with the remote agent manager. The agent is used for pairing
+ // and for authorization of incoming connection requests. |capability|
+ // specifies the input and display capabilities of the agent and should be
+ // one of the constants declared in the bluetooth_agent_manager:: namespace.
+ virtual void RegisterAgent(const dbus::ObjectPath& agent_path,
+ const std::string& capability,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) = 0;
+
+ // Unregisters the agent with the D-Bus object path |agent_path| from the
+ // remote agent manager.
+ virtual void UnregisterAgent(const dbus::ObjectPath& agent_path,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) = 0;
+
+ // Requests that the agent with the D-Bus object path |agent_path| be made
+ // the default.
+ virtual void RequestDefaultAgent(const dbus::ObjectPath& agent_path,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) = 0;
+
+ // Creates the instance.
+ static BluetoothAgentManagerClient* Create(DBusClientImplementationType type,
+ dbus::Bus* bus);
+
+ // Constants used to indicate exceptional error conditions.
+ static const char kNoResponseError[];
+
+ protected:
+ BluetoothAgentManagerClient();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(BluetoothAgentManagerClient);
+};
+
+} // namespace chromeos
+
+#endif // CHROMEOS_DBUS_BLUETOOTH_AGENT_MANAGER_CLIENT_H_