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

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

Issue 725383003: chromeos/dbus: Add BlueZ Media Endpoint Service Provider API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typos. Created 6 years, 1 month 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 "base/logging.h"
9 #include "chromeos/chromeos_export.h"
10 #include "chromeos/dbus/bluetooth_media_endpoint_service_provider.h"
11 #include "dbus/object_path.h"
12
13 namespace chromeos {
14
15 // FakeBluetoothMediaEndpointServiceProvider simulates the behavior of a local
16 // Bluetooth Media Endpoint object.
17 // TODO(mcchou): Add the logic of the behavior.
18 class CHROMEOS_EXPORT FakeBluetoothMediaEndpointServiceProvider
19 : public BluetoothMediaEndpointServiceProvider {
20 public:
21 FakeBluetoothMediaEndpointServiceProvider(const dbus::ObjectPath object_path,
22 Delegate* delegate);
23 ~FakeBluetoothMediaEndpointServiceProvider() override;
24
25 // Each of these calls the equivalent BluetoothMediaEnpointServiceProvider::
26 // Delegate method on the object passed on construction.
27 virtual void SetConfiguration(const dbus::ObjectPath& transport_path,
28 const dbus::MessageReader& properties);
29 virtual void SelectConfiguration(
30 const uint8_t* capabilities,
31 size_t length,
32 const Delegate::SelectConfigurationCallback& callback);
33 virtual void ClearConfiguration(const dbus::ObjectPath& transport_path);
34 virtual void Release();
armansito 2014/11/17 21:17:14 These methods probably don't need to be virtual si
Miao 2014/11/18 19:04:34 I follow the pattern in other service providers. I
35
36 private:
37 // The fake D-Bus object path.
38 dbus::ObjectPath object_path_;
39
40 // All incoming method calles are passed to |delegate_|. |callback| passed to
armansito 2014/11/17 21:17:14 nit: s/calles/calls/
Miao 2014/11/18 19:04:33 Done.
41 // |delegate_| will generate the response for those methods which have
42 // non-void return.
43 Delegate* delegate_;
44
45 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothMediaEndpointServiceProvider);
46 };
47
48 } // namespace chromeos
49
50 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_MEDIA_ENDPOINT_SERVICE_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698