1 // Copyright 2014 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_MEDIA_ENDPOINT_SERVICE_PROVIDER_H_
6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_MEDIA_ENDPOINT_SERVICE_PROVIDER_H_
10 #include "base/logging.h"
11 #include "chromeos/chromeos_export.h"
12 #include "chromeos/dbus/bluetooth_media_endpoint_service_provider.h"
13 #include "dbus/object_path.h"
14 #include "testing/gtest/include/gtest/gtest_prod.h"
18 // FakeBluetoothMediaEndpointServiceProvider simulates the behavior of a local
19 // Bluetooth Media Endpoint object.
20 class CHROMEOS_EXPORT FakeBluetoothMediaEndpointServiceProvider
21 : public BluetoothMediaEndpointServiceProvider
{
23 FakeBluetoothMediaEndpointServiceProvider(const dbus::ObjectPath
& object_path
,
25 ~FakeBluetoothMediaEndpointServiceProvider() override
;
27 // Each of these calls the equivalent BluetoothMediaEnpointServiceProvider::
28 // Delegate method on the object passed on construction.
29 void SetConfiguration(const dbus::ObjectPath
& transport_path
,
30 const Delegate::TransportProperties
& properties
);
31 void SelectConfiguration(
32 const std::vector
<uint8_t>& capabilities
,
33 const Delegate::SelectConfigurationCallback
& callback
);
34 void ClearConfiguration(const dbus::ObjectPath
& transport_path
);
37 // Gets the path of the media endpoint object.
38 const dbus::ObjectPath
& object_path() const { return object_path_
; }
41 // Indicates whether the endpoint object is visible or not.
44 // The path of the media endpoint object.
45 dbus::ObjectPath object_path_
;
47 // All incoming method calls are passed to |delegate_|. |callback| passed to
48 // |delegate_| will generate the response for those methods which have
52 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothMediaEndpointServiceProvider
);
55 } // namespace chromeos
57 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_MEDIA_ENDPOINT_SERVICE_PROVIDER_H_