Index: chromeos/dbus/cras_audio_client.h |
diff --git a/chromeos/dbus/cras_audio_client.h b/chromeos/dbus/cras_audio_client.h |
index 23063d8a2b2dc13fd308a9a6a4a619fe7f6d0a87..6d5def26f2207f62676372a9a55e8ccde588f91d 100644 |
--- a/chromeos/dbus/cras_audio_client.h |
+++ b/chromeos/dbus/cras_audio_client.h |
@@ -63,11 +63,18 @@ class CHROMEOS_EXPORT CrasAudioClient : public DBusClient { |
// |success| which indicates whether or not the request succeeded. |
typedef base::Callback<void(const AudioNodeList&, bool)> GetNodesCallback; |
+ // ErrorCallback is used for cras dbus method error response. It receives 2 |
+ // arguments, |error_name| indicates the dbus error name, and |error_message| |
+ // contains the detailed dbus error message. |
+ typedef base::Callback<void(const std::string&, |
+ const std::string&)> ErrorCallback; |
+ |
// 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; |
+ virtual void GetNodes(const GetNodesCallback& callback, |
+ const ErrorCallback& error_callback) = 0; |
// Sets output volume of the given |node_id| to |volume|, in the rage of |
// [0, 100]. |