diff options
author | rkc <rkc@chromium.org> | 2015-09-28 16:15:40 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-28 23:16:34 +0000 |
commit | 5d3c8959a7aee861b6750fd734cad96bd24e1f9f (patch) | |
tree | 20e59e629ef2adead10bbd7933c2313f5c8af693 /chromeos/dbus/bluetooth_agent_manager_client.h | |
parent | 6bdfb7dfb3ce2e571697629895089cffc42b48e6 (diff) | |
download | chromium_src-5d3c8959a7aee861b6750fd734cad96bd24e1f9f.zip chromium_src-5d3c8959a7aee861b6750fd734cad96bd24e1f9f.tar.gz chromium_src-5d3c8959a7aee861b6750fd734cad96bd24e1f9f.tar.bz2 |
Refactor DBusThreadManager to split away BT clients.
To be able to reuse the bluetooth DBus clients on linux, we need to be able
to separate them out from DBusThreadManager and move them out of //chromeos.
This CL introduces no functional change but instead only refactors the code
so we now have a BluezDbusManager that handles a Bluetooth specific DBus
client bundle to create all the bluetooth related DBus clients. We will
be able to extend this code to add a Linux specific BluezDbusManager
implementation, allowing us to reuse all these DBus clients on Linux instead
of copy/pasting the code.
R=armansito@chromium.org, stevenjb@chromium.org
BUG=522663
Review URL: https://codereview.chromium.org/1347193004
Cr-Commit-Position: refs/heads/master@{#351197}
Diffstat (limited to 'chromeos/dbus/bluetooth_agent_manager_client.h')
-rw-r--r-- | chromeos/dbus/bluetooth_agent_manager_client.h | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/chromeos/dbus/bluetooth_agent_manager_client.h b/chromeos/dbus/bluetooth_agent_manager_client.h deleted file mode 100644 index f43f4f8..0000000 --- a/chromeos/dbus/bluetooth_agent_manager_client.h +++ /dev/null @@ -1,68 +0,0 @@ -// 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.h" -#include "dbus/object_path.h" - -namespace chromeos { - -// BluetoothAgentManagerClient is used to communicate with the agent manager -// object of the Bluetooth daemon. -class CHROMEOS_EXPORT BluetoothAgentManagerClient : public DBusClient { - public: - ~BluetoothAgentManagerClient() override; - - // 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(); - - // 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_ |