OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROMEOS_DBUS_FAKE_BLUETOOTH_MEDIA_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_FAKE_BLUETOOTH_MEDIA_CLIENT_H_ |
6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_MEDIA_CLIENT_H_ | 6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_MEDIA_CLIENT_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
10 #include "chromeos/chromeos_export.h" | 10 #include "chromeos/chromeos_export.h" |
11 #include "chromeos/dbus/bluetooth_media_client.h" | 11 #include "chromeos/dbus/bluetooth_media_client.h" |
12 #include "dbus/object_path.h" | 12 #include "dbus/object_path.h" |
13 | 13 |
14 namespace chromeos { | 14 namespace chromeos { |
15 | 15 |
16 class CHROMEOS_EXPORT FakeBluetoothMediaClient : public BluetoothMediaClient { | 16 class CHROMEOS_EXPORT FakeBluetoothMediaClient : public BluetoothMediaClient { |
17 public: | 17 public: |
| 18 // The default codec is SBC(0x00). |
| 19 static const uint8_t kDefaultCodec; |
| 20 |
18 FakeBluetoothMediaClient(); | 21 FakeBluetoothMediaClient(); |
19 ~FakeBluetoothMediaClient() override; | 22 ~FakeBluetoothMediaClient() override; |
20 | 23 |
21 // DBusClient override. | 24 // DBusClient override. |
22 void Init(dbus::Bus* bus) override; | 25 void Init(dbus::Bus* bus) override; |
23 | 26 |
24 // BluetoothMediaClient overrides. | 27 // BluetoothMediaClient overrides. |
25 void AddObserver(BluetoothMediaClient::Observer* observer) override; | 28 void AddObserver(BluetoothMediaClient::Observer* observer) override; |
26 void RemoveObserver(BluetoothMediaClient::Observer* observer) override; | 29 void RemoveObserver(BluetoothMediaClient::Observer* observer) override; |
27 void RegisterEndpoint(const dbus::ObjectPath& object_path, | 30 void RegisterEndpoint(const dbus::ObjectPath& object_path, |
28 const dbus::ObjectPath& endpoint_path, | 31 const dbus::ObjectPath& endpoint_path, |
29 const EndpointProperties& properties, | 32 const EndpointProperties& properties, |
30 const base::Closure& callback, | 33 const base::Closure& callback, |
31 const ErrorCallback& error_callback) override; | 34 const ErrorCallback& error_callback) override; |
32 void UnregisterEndpoint(const dbus::ObjectPath& object_path, | 35 void UnregisterEndpoint(const dbus::ObjectPath& object_path, |
33 const dbus::ObjectPath& endpoint_path, | 36 const dbus::ObjectPath& endpoint_path, |
34 const base::Closure& callback, | 37 const base::Closure& callback, |
35 const ErrorCallback& error_callback) override; | 38 const ErrorCallback& error_callback) override; |
36 | 39 |
37 private: | 40 private: |
38 // List of observers interested in event notifications from us. | 41 // List of observers interested in event notifications from us. |
39 ObserverList<BluetoothMediaClient::Observer> observers_; | 42 ObserverList<BluetoothMediaClient::Observer> observers_; |
40 | 43 |
41 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothMediaClient); | 44 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothMediaClient); |
42 }; | 45 }; |
43 | 46 |
44 } // namespace chromeos | 47 } // namespace chromeos |
45 | 48 |
46 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_MEDIA_CLIENT_H_ | 49 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_MEDIA_CLIENT_H_ |
OLD | NEW |