| Index: chromeos/dbus/fake_bluetooth_media_transport_client.h
|
| diff --git a/chromeos/dbus/fake_bluetooth_media_transport_client.h b/chromeos/dbus/fake_bluetooth_media_transport_client.h
|
| index 319b2ae3c4e0518d527936f0c323e82f87d71856..d4b162aea442d43c9d0dd92bfef96de10c3fa0d8 100644
|
| --- a/chromeos/dbus/fake_bluetooth_media_transport_client.h
|
| +++ b/chromeos/dbus/fake_bluetooth_media_transport_client.h
|
| @@ -9,6 +9,7 @@
|
| #include <string>
|
| #include <vector>
|
|
|
| +#include "base/files/file.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/observer_list.h"
|
| #include "chromeos/chromeos_export.h"
|
| @@ -76,7 +77,12 @@ class CHROMEOS_EXPORT FakeBluetoothMediaTransportClient
|
| void SetVolume(const dbus::ObjectPath& endpoint_path,
|
| const uint16_t& volume);
|
|
|
| - // Gets the transport path associated with the given endpoint path.
|
| + // Writes bytes to the input file descriptor, |input_fd|, associated with a
|
| + // transport object which is bound to |endpoint_path|.
|
| + void WriteData(const dbus::ObjectPath& endpoint_path,
|
| + const std::vector<char>& bytes);
|
| +
|
| + // Retrieves the transport object path bound to |endpoint_path|.
|
| dbus::ObjectPath GetTransportPath(const dbus::ObjectPath& endpoint_path);
|
|
|
| // Gets the endpoint path associated with the given transport_path.
|
| @@ -86,8 +92,7 @@ class CHROMEOS_EXPORT FakeBluetoothMediaTransportClient
|
| // This class is used for simulating the scenario where each media endpoint
|
| // has a corresponding transport path and properties. Once an endpoint is
|
| // assigned with a transport path, an object of Transport is created.
|
| - class Transport {
|
| - public:
|
| + struct Transport {
|
| Transport(const dbus::ObjectPath& transport_path,
|
| Properties* transport_properties);
|
| ~Transport();
|
| @@ -97,11 +102,18 @@ class CHROMEOS_EXPORT FakeBluetoothMediaTransportClient
|
|
|
| // The property set bound with |path|.
|
| scoped_ptr<Properties> properties;
|
| +
|
| + // This is the internal end of socketpair created for simulation purposes.
|
| + // |input_fd| will be initialized when Acquire/TryAcquire is called.
|
| + scoped_ptr<base::File> input_fd;
|
| };
|
|
|
| // Property callback passed while a Properties structure is created.
|
| void OnPropertyChanged(const std::string& property_name);
|
|
|
| + // Retrieves the transport structure bound to |endpoint_path|
|
| + Transport* GetTransport(const dbus::ObjectPath& endpoint_path);
|
| +
|
| // Map of endpoints with valid transport. Each pair is composed of an endpoint
|
| // path and a Transport structure containing a transport path and its
|
| // properties.
|
| @@ -112,9 +124,6 @@ class CHROMEOS_EXPORT FakeBluetoothMediaTransportClient
|
| // corresponding endpoint path when GetProperties() is called.
|
| std::map<dbus::ObjectPath, dbus::ObjectPath> transport_to_endpoint_map_;
|
|
|
| - // The path of the media transport object.
|
| - dbus::ObjectPath object_path_;
|
| -
|
| ObserverList<BluetoothMediaTransportClient::Observer> observers_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(FakeBluetoothMediaTransportClient);
|
|
|