Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Unified Diff: device/bluetooth/bluetooth_audio_sink.h

Issue 939753004: device/bluetooth: Implement Unregister() of BlueotoothAudioSinkChromeOS and disconnection-related c… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/dbus/fake_bluetooth_media_transport_client.cc ('k') | device/bluetooth/bluetooth_audio_sink.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_audio_sink.h
diff --git a/device/bluetooth/bluetooth_audio_sink.h b/device/bluetooth/bluetooth_audio_sink.h
index 331ef0d83d1dac7653b745d899a694339ae7fce2..6abb8a5d14e43909ab140d00845ff152df95fa09 100644
--- a/device/bluetooth/bluetooth_audio_sink.h
+++ b/device/bluetooth/bluetooth_audio_sink.h
@@ -40,8 +40,9 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAudioSink
// Possible types of error raised by Audio Sink object.
enum ErrorCode {
ERROR_UNSUPPORTED_PLATFORM, // A2DP sink not supported on current platform.
- ERROR_INVALID_ADAPTER, // BluetoothAdapter not presented/powered.
- ERROR_NOT_REGISTERED, // BluetoothAudioSink not registered.
+ ERROR_INVALID_ADAPTER, // BluetoothAdapter not present/powered.
+ ERROR_NOT_REGISTERED, // BluetoothAudioSink not registered.
+ ERROR_NOT_UNREGISTERED, // BluetoothAudioSink not unregistered.
};
// Options to configure an A2DP audio sink.
@@ -81,6 +82,10 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAudioSink
// is called.
typedef base::Callback<void(ErrorCode)> ErrorCallback;
+ // Possible volumes for media transport are 0-127, and 128 is used to
+ // represent invalid volume.
+ static const uint16_t kInvalidVolume;
+
// Unregisters the audio sink. An audio sink will unregister itself
// automatically in its destructor, but calling Unregister is recommended,
// since user applications can be notified of an error returned by the call.
@@ -95,6 +100,9 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAudioSink
// Getters for state and volume.
virtual State GetState() const = 0;
+
+ // Returns the current volume level of the audio sink. The valid volumes are
+ // 0-127, and |kInvalidVolume| is returned instead if the volume is unknown.
virtual uint16_t GetVolume() const = 0;
protected:
« no previous file with comments | « chromeos/dbus/fake_bluetooth_media_transport_client.cc ('k') | device/bluetooth/bluetooth_audio_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698