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 ce33dc073eb2a228dbc6621283f111f0db2cf444..f88908f6111db8919c39632a6bac9022d075118a 100644 |
--- a/chromeos/dbus/fake_bluetooth_media_transport_client.h |
+++ b/chromeos/dbus/fake_bluetooth_media_transport_client.h |
@@ -5,8 +5,11 @@ |
#ifndef CHROMEOS_DBUS_FAKE_BLUETOOTH_MEDIA_TRANSPORT_CLIENT_H_ |
#define CHROMEOS_DBUS_FAKE_BLUETOOTH_MEDIA_TRANSPORT_CLIENT_H_ |
+#include <map> |
#include <string> |
+#include <vector> |
+#include "base/memory/scoped_ptr.h" |
#include "base/observer_list.h" |
#include "chromeos/chromeos_export.h" |
#include "chromeos/dbus/bluetooth_media_transport_client.h" |
@@ -28,6 +31,17 @@ class CHROMEOS_EXPORT FakeBluetoothMediaTransportClient |
dbus::PropertySet::SetCallback callback) override; |
}; |
+ // The default path of the transport object. |
+ static const char kTransportPath[]; |
+ |
+ // The default properties including device, codec, configuration, state, delay |
+ // and volume, owned by a fake media transport object we emulate. |
+ static const char kTransportDevicePath[]; |
+ static const uint8_t kTransportCodec; |
+ static const std::vector<uint8_t> kTransportConfiguration; |
+ static const uint16_t kTransportDelay; |
+ static const uint16_t kTransportVolume; |
+ |
FakeBluetoothMediaTransportClient(); |
~FakeBluetoothMediaTransportClient() override; |
@@ -48,7 +62,24 @@ class CHROMEOS_EXPORT FakeBluetoothMediaTransportClient |
const base::Closure& callback, |
const ErrorCallback& error_callback) override; |
+ // Makes the transport valid/invalid for a given media endpoint path. The |
+ // transport object is assigned to the given endpoint if valid is true, false |
+ // otherwise. |
+ void SetValid(const dbus::ObjectPath& endpoint_path, bool valid); |
+ |
private: |
+ // Property callback passed while a Properties structure is created. |
+ void OnPropertyChanged(const std::string& property_name); |
+ |
+ // The path of the media transport object. |
+ dbus::ObjectPath object_path_; |
+ |
+ // Indicates whether endpoints are assigned with the transport object. |
+ std::map<dbus::ObjectPath, bool> endpoints_; |
+ |
+ // The fake property set of the media transport object. |
+ scoped_ptr<Properties> properties_; |
+ |
ObserverList<BluetoothMediaTransportClient::Observer> observers_; |
DISALLOW_COPY_AND_ASSIGN(FakeBluetoothMediaTransportClient); |