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" |
11 #include "chromeos/dbus/audio_node.h" | 11 #include "chromeos/dbus/audio_node.h" |
12 #include "chromeos/dbus/dbus_client.h" | 12 #include "chromeos/dbus/dbus_client.h" |
13 #include "chromeos/dbus/dbus_client_implementation_type.h" | |
14 #include "chromeos/dbus/volume_state.h" | 13 #include "chromeos/dbus/volume_state.h" |
15 | 14 |
16 namespace chromeos { | 15 namespace chromeos { |
17 | 16 |
18 // CrasAudioClient is used to communicate with the cras audio dbus interface. | 17 // CrasAudioClient is used to communicate with the cras audio dbus interface. |
19 class CHROMEOS_EXPORT CrasAudioClient : public DBusClient { | 18 class CHROMEOS_EXPORT CrasAudioClient : public DBusClient { |
20 public: | 19 public: |
21 // Interface for observing changes from the cras audio changes. | 20 // Interface for observing changes from the cras audio changes. |
22 class Observer { | 21 class Observer { |
23 public: | 22 public: |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // Sets input mute state to |mute_on| value. | 89 // Sets input mute state to |mute_on| value. |
91 virtual void SetInputMute(bool mute_on) = 0; | 90 virtual void SetInputMute(bool mute_on) = 0; |
92 | 91 |
93 // Sets the active output node to |node_id|. | 92 // Sets the active output node to |node_id|. |
94 virtual void SetActiveOutputNode(uint64 node_id) = 0; | 93 virtual void SetActiveOutputNode(uint64 node_id) = 0; |
95 | 94 |
96 // Sets the active input node to |node_id|. | 95 // Sets the active input node to |node_id|. |
97 virtual void SetActiveInputNode(uint64 node_id) = 0; | 96 virtual void SetActiveInputNode(uint64 node_id) = 0; |
98 | 97 |
99 // Creates the instance. | 98 // Creates the instance. |
100 static CrasAudioClient* Create(DBusClientImplementationType type); | 99 static CrasAudioClient* Create(); |
101 | 100 |
102 protected: | 101 protected: |
103 // Create() should be used instead. | 102 // Create() should be used instead. |
104 CrasAudioClient(); | 103 CrasAudioClient(); |
105 | 104 |
106 private: | 105 private: |
107 | 106 |
108 DISALLOW_COPY_AND_ASSIGN(CrasAudioClient); | 107 DISALLOW_COPY_AND_ASSIGN(CrasAudioClient); |
109 }; | 108 }; |
110 | 109 |
111 } // namespace chromeos | 110 } // namespace chromeos |
112 | 111 |
113 #endif // CHROMEOS_DBUS_CRAS_AUDIO_CLIENT_H_ | 112 #endif // CHROMEOS_DBUS_CRAS_AUDIO_CLIENT_H_ |
OLD | NEW |