| Index: chromeos/dbus/fake_bluetooth_agent_manager_client.h
|
| diff --git a/chromeos/dbus/fake_bluetooth_agent_manager_client.h b/chromeos/dbus/fake_bluetooth_agent_manager_client.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9874f6b899bf1f336a897ea3cd68ac59425d5644
|
| --- /dev/null
|
| +++ b/chromeos/dbus/fake_bluetooth_agent_manager_client.h
|
| @@ -0,0 +1,58 @@
|
| +// Copyright (c) 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_FAKE_BLUETOOTH_AGENT_MANAGER_CLIENT_H_
|
| +#define CHROMEOS_DBUS_FAKE_BLUETOOTH_AGENT_MANAGER_CLIENT_H_
|
| +
|
| +#include "base/bind.h"
|
| +#include "base/callback.h"
|
| +#include "base/observer_list.h"
|
| +#include "chromeos/chromeos_export.h"
|
| +#include "chromeos/dbus/dbus_client_implementation_type.h"
|
| +#include "chromeos/dbus/experimental_bluetooth_agent_manager_client.h"
|
| +#include "dbus/object_path.h"
|
| +#include "dbus/property.h"
|
| +
|
| +namespace chromeos {
|
| +
|
| +class FakeBluetoothAgentServiceProvider;
|
| +
|
| +// FakeBluetoothAgentManagerClient simulates the behavior of the Bluetooth
|
| +// Daemon's agent manager object and is used both in test cases in place of a
|
| +// mock and on the Linux desktop.
|
| +class CHROMEOS_EXPORT FakeBluetoothAgentManagerClient
|
| + : public ExperimentalBluetoothAgentManagerClient {
|
| + public:
|
| + FakeBluetoothAgentManagerClient();
|
| + virtual ~FakeBluetoothAgentManagerClient();
|
| +
|
| + // ExperimentalBluetoothAgentManagerClient override
|
| + virtual void RegisterAgent(const dbus::ObjectPath& agent_path,
|
| + const std::string& capability,
|
| + const base::Closure& callback,
|
| + const ErrorCallback& error_callback) OVERRIDE;
|
| + virtual void UnregisterAgent(const dbus::ObjectPath& agent_path,
|
| + const base::Closure& callback,
|
| + const ErrorCallback& error_callback) OVERRIDE;
|
| + virtual void RequestDefaultAgent(const dbus::ObjectPath& agent_path,
|
| + const base::Closure& callback,
|
| + const ErrorCallback& error_callback)
|
| + OVERRIDE;
|
| +
|
| + // Register, unregister and retrieve pointers to agent service providers.
|
| + void RegisterAgentServiceProvider(
|
| + FakeBluetoothAgentServiceProvider* service_provider);
|
| + void UnregisterAgentServiceProvider(
|
| + FakeBluetoothAgentServiceProvider* service_provider);
|
| + FakeBluetoothAgentServiceProvider* GetAgentServiceProvider();
|
| +
|
| + private:
|
| + // The single agent service provider we permit, owned by the application
|
| + // using it.
|
| + FakeBluetoothAgentServiceProvider* service_provider_;
|
| +};
|
| +
|
| +} // namespace chromeos
|
| +
|
| +#endif /* CHROMEOS_DBUS_FAKE_BLUETOOTH_AGENT_MANAGER_CLIENT_H_ */
|
|
|