| Index: chromeos/dbus/fake_bluetooth_profile_manager_client.h
|
| diff --git a/chromeos/dbus/fake_bluetooth_profile_manager_client.h b/chromeos/dbus/fake_bluetooth_profile_manager_client.h
|
| index e3cfcd446e6a75bda4e5e8defc0b71f80db6d7ae..bba67323a05200feef99831cfc0ac0297dcbe69f 100644
|
| --- a/chromeos/dbus/fake_bluetooth_profile_manager_client.h
|
| +++ b/chromeos/dbus/fake_bluetooth_profile_manager_client.h
|
| @@ -5,6 +5,9 @@
|
| #ifndef CHROMEOS_DBUS_FAKE_BLUETOOTH_PROFILE_MANAGER_CLIENT_H_
|
| #define CHROMEOS_DBUS_FAKE_BLUETOOTH_PROFILE_MANAGER_CLIENT_H_
|
|
|
| +#include <map>
|
| +#include <string>
|
| +
|
| #include "base/bind.h"
|
| #include "base/callback.h"
|
| #include "base/observer_list.h"
|
| @@ -16,6 +19,8 @@
|
|
|
| namespace chromeos {
|
|
|
| +class FakeBluetoothProfileServiceProvider;
|
| +
|
| // FakeBluetoothProfileManagerClient simulates the behavior of the Bluetooth
|
| // Daemon's profile manager object and is used both in test cases in place of a
|
| // mock and on the Linux desktop.
|
| @@ -34,6 +39,33 @@ class CHROMEOS_EXPORT FakeBluetoothProfileManagerClient
|
| virtual void UnregisterProfile(const dbus::ObjectPath& profile_path,
|
| const base::Closure& callback,
|
| const ErrorCallback& error_callback) OVERRIDE;
|
| +
|
| + // Register, unregister and retrieve pointers to profile server providers.
|
| + void RegisterProfileServiceProvider(
|
| + FakeBluetoothProfileServiceProvider* service_provider);
|
| + void UnregisterProfileServiceProvider(
|
| + FakeBluetoothProfileServiceProvider* service_provider);
|
| + FakeBluetoothProfileServiceProvider* GetProfileServiceProvider(
|
| + const std::string& uuid);
|
| +
|
| + // UUIDs recognised for testing.
|
| + static const char kL2capUuid[];
|
| + static const char kRfcommUuid[];
|
| +
|
| + private:
|
| + // Map of a D-Bus object path to the FakeBluetoothProfileServiceProvider
|
| + // registered for it; maintained by RegisterProfileServiceProvider() and
|
| + // UnregisterProfileServiceProvicer() called by the constructor and
|
| + // destructor of FakeBluetoothProfileServiceProvider.
|
| + typedef std::map<dbus::ObjectPath, FakeBluetoothProfileServiceProvider*>
|
| + ServiceProviderMap;
|
| + ServiceProviderMap service_provider_map_;
|
| +
|
| + // Map of Profile UUID to the D-Bus object path of the service provider
|
| + // in |service_provider_map_|. Maintained by RegisterProfile() and
|
| + // UnregisterProfile() in response to BluetoothProfile methods.
|
| + typedef std::map<std::string, dbus::ObjectPath> ProfileMap;
|
| + ProfileMap profile_map_;
|
| };
|
|
|
| } // namespace chromeos
|
|
|