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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 // Called when active audio input node changed to new node with |node_id|. | 42 // Called when active audio input node changed to new node with |node_id|. |
43 virtual void ActiveInputNodeChanged(uint64_t node_id); | 43 virtual void ActiveInputNodeChanged(uint64_t node_id); |
44 | 44 |
45 // Called when output node's volume changed. | 45 // Called when output node's volume changed. |
46 virtual void OutputNodeVolumeChanged(uint64_t node_id, int volume); | 46 virtual void OutputNodeVolumeChanged(uint64_t node_id, int volume); |
47 | 47 |
48 protected: | 48 protected: |
49 virtual ~Observer(); | 49 virtual ~Observer(); |
50 }; | 50 }; |
51 | 51 |
52 enum VideoFacingMode { NONE = 0, USER, ENVIRONMENT }; | |
jennyz
2017/01/18 00:01:37
First: CrasAudioClient is a thin wrap for cras dbu
shenghao
2017/01/18 10:41:12
Moved to CrasAudioHandler
| |
53 | |
52 ~CrasAudioClient() override; | 54 ~CrasAudioClient() override; |
53 | 55 |
54 // Adds and removes the observer. | 56 // Adds and removes the observer. |
55 virtual void AddObserver(Observer* observer) = 0; | 57 virtual void AddObserver(Observer* observer) = 0; |
56 virtual void RemoveObserver(Observer* observer) = 0; | 58 virtual void RemoveObserver(Observer* observer) = 0; |
57 // Returns true if this object has the given observer. | 59 // Returns true if this object has the given observer. |
58 virtual bool HasObserver(const Observer* observer) const = 0; | 60 virtual bool HasObserver(const Observer* observer) const = 0; |
59 | 61 |
62 virtual void OnVideoCaptureStarted(VideoFacingMode facing) {} | |
jennyz
2017/01/18 00:01:37
Move this to CrasAudioHandler.
shenghao
2017/01/18 10:41:12
Done.
| |
63 | |
60 // GetVolumeStateCallback is used for GetVolumeState method. It receives | 64 // GetVolumeStateCallback is used for GetVolumeState method. It receives |
61 // 2 arguments, |volume_state| which containing both input and output volume | 65 // 2 arguments, |volume_state| which containing both input and output volume |
62 // state data, and |success| which indicates whether or not the request | 66 // state data, and |success| which indicates whether or not the request |
63 // succeeded. | 67 // succeeded. |
64 typedef base::Callback<void(const VolumeState&, bool)> GetVolumeStateCallback; | 68 typedef base::Callback<void(const VolumeState&, bool)> GetVolumeStateCallback; |
65 | 69 |
66 // GetNodesCallback is used for GetNodes method. It receives 2 arguments, | 70 // GetNodesCallback is used for GetNodes method. It receives 2 arguments, |
67 // |audio_nodes| which containing a list of audio nodes data and | 71 // |audio_nodes| which containing a list of audio nodes data and |
68 // |success| which indicates whether or not the request succeeded. | 72 // |success| which indicates whether or not the request succeeded. |
69 typedef base::Callback<void(const AudioNodeList&, bool)> GetNodesCallback; | 73 typedef base::Callback<void(const AudioNodeList&, bool)> GetNodesCallback; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
147 // Create() should be used instead. | 151 // Create() should be used instead. |
148 CrasAudioClient(); | 152 CrasAudioClient(); |
149 | 153 |
150 private: | 154 private: |
151 DISALLOW_COPY_AND_ASSIGN(CrasAudioClient); | 155 DISALLOW_COPY_AND_ASSIGN(CrasAudioClient); |
152 }; | 156 }; |
153 | 157 |
154 } // namespace chromeos | 158 } // namespace chromeos |
155 | 159 |
156 #endif // CHROMEOS_DBUS_CRAS_AUDIO_CLIENT_H_ | 160 #endif // CHROMEOS_DBUS_CRAS_AUDIO_CLIENT_H_ |
OLD | NEW |