Simple Cache: transactional index in subdirectory
[chromium-blink-merge.git] / chromeos / dbus / fake_bluetooth_agent_manager_client.h
blob98ecdb2fba27e0946d7f00beb60bb42c3aadb8d9
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROMEOS_DBUS_FAKE_BLUETOOTH_AGENT_MANAGER_CLIENT_H_
6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_AGENT_MANAGER_CLIENT_H_
8 #include "base/bind.h"
9 #include "base/callback.h"
10 #include "base/observer_list.h"
11 #include "chromeos/chromeos_export.h"
12 #include "chromeos/dbus/bluetooth_agent_manager_client.h"
13 #include "chromeos/dbus/dbus_client_implementation_type.h"
14 #include "dbus/object_path.h"
15 #include "dbus/property.h"
17 namespace chromeos {
19 class FakeBluetoothAgentServiceProvider;
21 // FakeBluetoothAgentManagerClient simulates the behavior of the Bluetooth
22 // Daemon's agent manager object and is used both in test cases in place of a
23 // mock and on the Linux desktop.
24 class CHROMEOS_EXPORT FakeBluetoothAgentManagerClient
25 : public BluetoothAgentManagerClient {
26 public:
27 FakeBluetoothAgentManagerClient();
28 virtual ~FakeBluetoothAgentManagerClient();
30 // BluetoothAgentManagerClient overrides
31 virtual void Init(dbus::Bus* bus) OVERRIDE;
32 virtual void RegisterAgent(const dbus::ObjectPath& agent_path,
33 const std::string& capability,
34 const base::Closure& callback,
35 const ErrorCallback& error_callback) OVERRIDE;
36 virtual void UnregisterAgent(const dbus::ObjectPath& agent_path,
37 const base::Closure& callback,
38 const ErrorCallback& error_callback) OVERRIDE;
39 virtual void RequestDefaultAgent(const dbus::ObjectPath& agent_path,
40 const base::Closure& callback,
41 const ErrorCallback& error_callback)
42 OVERRIDE;
44 // Register, unregister and retrieve pointers to agent service providers.
45 void RegisterAgentServiceProvider(
46 FakeBluetoothAgentServiceProvider* service_provider);
47 void UnregisterAgentServiceProvider(
48 FakeBluetoothAgentServiceProvider* service_provider);
49 FakeBluetoothAgentServiceProvider* GetAgentServiceProvider();
51 private:
52 // The single agent service provider we permit, owned by the application
53 // using it.
54 FakeBluetoothAgentServiceProvider* service_provider_;
57 } // namespace chromeos
59 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_AGENT_MANAGER_CLIENT_H_