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

Unified Diff: chromeos/dbus/cras_audio_client.h

Issue 13863007: Integrate audio dbus api: GetNodes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
Index: chromeos/dbus/cras_audio_client.h
diff --git a/chromeos/dbus/cras_audio_client.h b/chromeos/dbus/cras_audio_client.h
index 969bfb0b3d88f725702d5341448a3c5cc72d7038..cf12fa27070613bc9198f20ff7e72d61714f7746 100644
--- a/chromeos/dbus/cras_audio_client.h
+++ b/chromeos/dbus/cras_audio_client.h
@@ -8,6 +8,7 @@
#include "base/callback.h"
#include "base/observer_list.h"
#include "chromeos/chromeos_export.h"
+#include "chromeos/dbus/audio_node.h"
#include "chromeos/dbus/dbus_client_implementation_type.h"
#include "chromeos/dbus/volume_state.h"
@@ -45,13 +46,22 @@ class CHROMEOS_EXPORT CrasAudioClient {
virtual bool HasObserver(Observer* observer) = 0;
// GetVolumeStateCallback is used for GetVolumeState method. It receives
- // 1 argument, |volume_state| which containing both input and output volume
- // state data.
- typedef base::Callback<void(const VolumeState&)> GetVolumeStateCallback;
+ // 2 arguments, |volume_state| which containing both input and output volume
+ // state data, and |success| which indicates whether or not the request
+ // succeeded.
+ typedef base::Callback<void(const VolumeState&, bool)> GetVolumeStateCallback;
+
+ // GetNodesCallback is used for GetNodes method. It receives 2 arguments,
+ // |audio_nodes| which containing a list of audio nodes data and
+ // |success| which indicates whether or not the request succeeded.
+ typedef base::Callback<void(const AudioNodeList&, bool)> GetNodesCallback;
// Gets the volume state, asynchronously.
virtual void GetVolumeState(const GetVolumeStateCallback& callback) = 0;
+ // Gets an array of audio input and output nodes.
+ virtual void GetNodes(const GetNodesCallback& callback) = 0;
+
// Sets output volume to |volume|, in the range of [0, 100].
virtual void SetOutputVolume(int32 volume) = 0;

Powered by Google App Engine
This is Rietveld 408576698