Index: device/bluetooth/bluetooth_audio_sink_chromeos.h |
diff --git a/device/bluetooth/bluetooth_audio_sink_chromeos.h b/device/bluetooth/bluetooth_audio_sink_chromeos.h |
index 3af285b68732b2f87083c9426214dcc2c46c527c..63c8923d7031381128e081cd32fcbc48372248dc 100644 |
--- a/device/bluetooth/bluetooth_audio_sink_chromeos.h |
+++ b/device/bluetooth/bluetooth_audio_sink_chromeos.h |
@@ -45,11 +45,16 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAudioSinkChromeOS |
void AddObserver(BluetoothAudioSink::Observer* observer) override; |
void RemoveObserver(BluetoothAudioSink::Observer* observer) override; |
device::BluetoothAudioSink::State GetState() const override; |
+ |
+ // Returns the current volume level of the audio sink. The possible volumes |
+ // are 0-128, where 0-127 are valid volumes and 128 represents invalid volume. |
armansito
2015/02/24 01:38:06
nit: I would define a constant for invalid volume
Miao
2015/02/24 05:11:39
Moved kInvalidVolume to BluetoothAudioSink and upd
|
uint16_t GetVolume() const override; |
// device::BluetoothAdapter::Observer overrides. |
void AdapterPresentChanged(device::BluetoothAdapter* adapter, |
bool present) override; |
+ void AdapterPoweredChanged(device::BluetoothAdapter* adapter, |
+ bool powered) override; |
// BluetoothMediaClient::Observer overrides. |
void MediaRemoved(const dbus::ObjectPath& object_path) override; |
@@ -95,9 +100,20 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAudioSinkChromeOS |
void OnRegisterSucceeded(const base::Closure& callback); |
// Called when the registration of Media Endpoint failed. |
- void OnRegisterFailed(const BluetoothAudioSink::ErrorCallback& error_callback, |
- const std::string& error_name, |
- const std::string& error_message); |
+ void OnRegisterFailed( |
+ const device::BluetoothAudioSink::ErrorCallback& error_callback, |
+ const std::string& error_name, |
+ const std::string& error_message); |
+ |
+ // Called when the unregistration of Media Endpoint has succeeded. The |
+ // clean-up of media, media transport and media endpoint will be handled here. |
+ void OnUnregisterSucceeded(const base::Closure& callback); |
+ |
+ // Called when the unregistration of Media Endpoint failed. |
+ void OnUnregisterFailed( |
+ const device::BluetoothAudioSink::ErrorCallback& error_callback, |
+ const std::string& error_name, |
+ const std::string& error_message); |
// Reads from the file descriptor acquired via Media Transport object and |
// notify |observer_| while the audio data is available. |
@@ -114,14 +130,15 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAudioSinkChromeOS |
// device. |
device::BluetoothAudioSink::State state_; |
- // The volume control by the remote device during the streaming. |
+ // The volume control by the remote device during the streaming. The valid |
+ // range of volume is 0-127, and 128 is used to represent invalid volume. |
uint16_t volume_; |
// Read MTU of the file descriptor acquired via Media Transport object. |
- uint16_t read_mtu_; |
+ scoped_ptr<uint16_t> read_mtu_; |
// Write MTU of the file descriptor acquired via Media Transport object. |
- uint16_t write_mtu_; |
+ scoped_ptr<uint16_t> write_mtu_; |
// File descriptor acquired via Media Transport object. |
dbus::FileDescriptor fd_; |