Chromium Code Reviews| Index: chromeos/dbus/bluetooth_media_endpoint_service_provider.h |
| diff --git a/chromeos/dbus/bluetooth_media_endpoint_service_provider.h b/chromeos/dbus/bluetooth_media_endpoint_service_provider.h |
| index b2e1448d5118644fb4f58f66fceb9fd6abef53a4..1e158c0af4d28c3f11af61421d5907b9ca0bcca6 100644 |
| --- a/chromeos/dbus/bluetooth_media_endpoint_service_provider.h |
| +++ b/chromeos/dbus/bluetooth_media_endpoint_service_provider.h |
| @@ -5,6 +5,7 @@ |
| #ifndef CHROMEOS_DBUS_BLUETOOTH_MEDIA_ENDPOINT_SERVICE_PROVIDER_H_ |
| #define CHROMEOS_DBUS_BLUETOOTH_MEDIA_ENDPOINT_SERVICE_PROVIDER_H_ |
| +#include <string> |
| #include <vector> |
| #include "base/callback.h" |
| @@ -33,6 +34,37 @@ class CHROMEOS_EXPORT BluetoothMediaEndpointServiceProvider { |
| // Source. |
| class Delegate { |
| public: |
| + // Transport-specific properties. |
| + struct CHROMEOS_EXPORT TransportProperties { |
| + TransportProperties(); |
| + ~TransportProperties(); |
| + |
| + // The path to the device object which the transport is connected to. |
| + dbus::ObjectPath device; |
| + |
| + // The UUID of the profile which the transport is for. |
| + std::string uuid; |
| + |
| + // The Codec value agreed by the remote device and used by the media |
| + // transport. |
| + uint8_t codec; |
| + |
| + // The configuration used by the media transport. |
| + std::vector<uint8_t> configuration; |
| + |
| + // The state of the transport. The values can be one of the following: |
| + // "idle": not streaming |
| + // "pending": streaming but not acquired |
| + // "active": streaming and acquired |
| + std::string state; |
| + |
| + // The unit of transport is in 1/10 millisecond. Optional. |
| + scoped_ptr<uint16_t> delay; |
| + |
| + // The volume level of the transport. Optional. |
| + scoped_ptr<uint16_t> volume; |
|
Ben Chan
2015/02/11 20:36:23
You probably want to make this struct non-copyable
Miao
2015/02/11 23:17:17
Done.
|
| + }; |
| + |
| virtual ~Delegate() {} |
| // SelectConfigurationCallback is used for the SelectConfiguration() method, |
| @@ -47,7 +79,7 @@ class CHROMEOS_EXPORT BluetoothMediaEndpointServiceProvider { |
| // MediaTransport object, and |properties| are the properties for that |
| // MediaTransport object. |
| virtual void SetConfiguration(const dbus::ObjectPath& transport_path, |
| - const dbus::MessageReader& properties) = 0; |
| + const TransportProperties& properties) = 0; |
| // This method will be called when an Audio Source connects to an Audio Sink |
| // and asks it to decide the configuration to be used during the oncoming |
| @@ -69,8 +101,10 @@ class CHROMEOS_EXPORT BluetoothMediaEndpointServiceProvider { |
| // This method will be called when the Bluetooth daemon unregisters the |
| // Media Endpoint. Media Endpoint objects can use this method to clean up |
| // tasks. There is no need to unregister the endpoint, since when this |
| - // method gets called, that endpoint has been unregistered. |
| - virtual void Release() = 0; |
| + // method gets called, that endpoint has been unregistered. This corresponds |
| + // to the org.bluez.MediaEndpoint1.Release and is renamed to avoid |
| + // a conflict with base::RefCounted<T>. |
| + virtual void Released() = 0; |
|
Ben Chan
2015/02/11 20:36:23
The "Released" seems confusing as it looks like a
Miao
2015/02/11 23:17:17
In BluetoothProfileServiceProvider, Release() is r
|
| }; |
| virtual ~BluetoothMediaEndpointServiceProvider(); |