| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROMEOS_DBUS_CRAS_AUDIO_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_CRAS_AUDIO_CLIENT_H_ |
| 6 #define CHROMEOS_DBUS_CRAS_AUDIO_CLIENT_H_ | 6 #define CHROMEOS_DBUS_CRAS_AUDIO_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
| 10 #include "chromeos/chromeos_export.h" | 10 #include "chromeos/chromeos_export.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 protected: | 42 protected: |
| 43 virtual ~Observer(); | 43 virtual ~Observer(); |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 virtual ~CrasAudioClient(); | 46 virtual ~CrasAudioClient(); |
| 47 | 47 |
| 48 // Adds and removes the observer. | 48 // Adds and removes the observer. |
| 49 virtual void AddObserver(Observer* observer) = 0; | 49 virtual void AddObserver(Observer* observer) = 0; |
| 50 virtual void RemoveObserver(Observer* observer) = 0; | 50 virtual void RemoveObserver(Observer* observer) = 0; |
| 51 // Returns true if this object has the given observer. | 51 // Returns true if this object has the given observer. |
| 52 virtual bool HasObserver(Observer* observer) = 0; | 52 virtual bool HasObserver(const Observer* observer) const = 0; |
| 53 | 53 |
| 54 // GetVolumeStateCallback is used for GetVolumeState method. It receives | 54 // GetVolumeStateCallback is used for GetVolumeState method. It receives |
| 55 // 2 arguments, |volume_state| which containing both input and output volume | 55 // 2 arguments, |volume_state| which containing both input and output volume |
| 56 // state data, and |success| which indicates whether or not the request | 56 // state data, and |success| which indicates whether or not the request |
| 57 // succeeded. | 57 // succeeded. |
| 58 typedef base::Callback<void(const VolumeState&, bool)> GetVolumeStateCallback; | 58 typedef base::Callback<void(const VolumeState&, bool)> GetVolumeStateCallback; |
| 59 | 59 |
| 60 // GetNodesCallback is used for GetNodes method. It receives 2 arguments, | 60 // GetNodesCallback is used for GetNodes method. It receives 2 arguments, |
| 61 // |audio_nodes| which containing a list of audio nodes data and | 61 // |audio_nodes| which containing a list of audio nodes data and |
| 62 // |success| which indicates whether or not the request succeeded. | 62 // |success| which indicates whether or not the request succeeded. |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 // Create() should be used instead. | 129 // Create() should be used instead. |
| 130 CrasAudioClient(); | 130 CrasAudioClient(); |
| 131 | 131 |
| 132 private: | 132 private: |
| 133 DISALLOW_COPY_AND_ASSIGN(CrasAudioClient); | 133 DISALLOW_COPY_AND_ASSIGN(CrasAudioClient); |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 } // namespace chromeos | 136 } // namespace chromeos |
| 137 | 137 |
| 138 #endif // CHROMEOS_DBUS_CRAS_AUDIO_CLIENT_H_ | 138 #endif // CHROMEOS_DBUS_CRAS_AUDIO_CLIENT_H_ |
| OLD | NEW |