Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: chromeos/dbus/fake_bluetooth_media_endpoint_service_provider.h

Issue 1347193004: Refactor DBusThreadManager to split away BT clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #ifndef CHROMEOS_DBUS_FAKE_BLUETOOTH_MEDIA_ENDPOINT_SERVICE_PROVIDER_H_
6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_MEDIA_ENDPOINT_SERVICE_PROVIDER_H_
7
8 #include <vector>
9
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"
15
16 namespace chromeos {
17
18 // FakeBluetoothMediaEndpointServiceProvider simulates the behavior of a local
19 // Bluetooth Media Endpoint object.
20 class CHROMEOS_EXPORT FakeBluetoothMediaEndpointServiceProvider
21 : public BluetoothMediaEndpointServiceProvider {
22 public:
23 FakeBluetoothMediaEndpointServiceProvider(const dbus::ObjectPath& object_path,
24 Delegate* delegate);
25 ~FakeBluetoothMediaEndpointServiceProvider() override;
26
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);
35 void Released();
36
37 // Gets the path of the media endpoint object.
38 const dbus::ObjectPath& object_path() const { return object_path_; }
39
40 private:
41 // Indicates whether the endpoint object is visible or not.
42 bool visible_;
43
44 // The path of the media endpoint object.
45 dbus::ObjectPath object_path_;
46
47 // All incoming method calls are passed to |delegate_|. |callback| passed to
48 // |delegate_| will generate the response for those methods which have
49 // non-void return.
50 Delegate* delegate_;
51
52 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothMediaEndpointServiceProvider);
53 };
54
55 } // namespace chromeos
56
57 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_MEDIA_ENDPOINT_SERVICE_PROVIDER_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_bluetooth_media_client.cc ('k') | chromeos/dbus/fake_bluetooth_media_endpoint_service_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698