1 #ifndef ANDROID_HARDWARE_AUTOMOTIVE_AUDIOCONTROL_ENUMS_H
2 #define ANDROID_HARDWARE_AUTOMOTIVE_AUDIOCONTROL_ENUMS_H
3 
4 #include <array>
5 #include <string>
6 
7 #include <xsdc/XsdcSupport.h>
8 
9 namespace android {
10     namespace hardware {
11         namespace automotive {
12             namespace audiocontrol {
13                 enum class ContentTypeEnum {
14                     UNKNOWN = -1,
15                     AUDIO_CONTENT_TYPE_UNKNOWN,
16                     AUDIO_CONTENT_TYPE_SPEECH,
17                     AUDIO_CONTENT_TYPE_MUSIC,
18                     AUDIO_CONTENT_TYPE_MOVIE,
19                     AUDIO_CONTENT_TYPE_SONIFICATION,
20                 };
21                 ContentTypeEnum stringToContentTypeEnum(const std::string& value);
22                 std::string toString(ContentTypeEnum o);
23 
24                 enum class UsageEnumType {
25                     UNKNOWN = -1,
26                     AUDIO_USAGE_UNKNOWN,
27                     AUDIO_USAGE_MEDIA,
28                     AUDIO_USAGE_VOICE_COMMUNICATION,
29                     AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING,
30                     AUDIO_USAGE_ALARM,
31                     AUDIO_USAGE_NOTIFICATION,
32                     AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE,
33                     AUDIO_USAGE_NOTIFICATION_COMMUNICATION_REQUEST,
34                     AUDIO_USAGE_NOTIFICATION_COMMUNICATION_INSTANT,
35                     AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED,
36                     AUDIO_USAGE_NOTIFICATION_EVENT,
37                     AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY,
38                     AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE,
39                     AUDIO_USAGE_ASSISTANCE_SONIFICATION,
40                     AUDIO_USAGE_GAME,
41                     AUDIO_USAGE_VIRTUAL_SOURCE,
42                     AUDIO_USAGE_ASSISTANT,
43                     AUDIO_USAGE_CALL_ASSISTANT,
44                     AUDIO_USAGE_EMERGENCY,
45                     AUDIO_USAGE_SAFETY,
46                     AUDIO_USAGE_VEHICLE_STATUS,
47                     AUDIO_USAGE_ANNOUNCEMENT,
48                 };
49                 UsageEnumType stringToUsageEnumType(const std::string& value);
50                 std::string toString(UsageEnumType o);
51 
52                 enum class ActivationType {
53                     UNKNOWN = -1,
54                     onBoot,
55                     onSourceChanged,
56                     onPlaybackChanged,
57                 };
58                 ActivationType stringToActivationType(const std::string& value);
59                 std::string toString(ActivationType o);
60 
61                 enum class OutDeviceType {
62                     UNKNOWN = -1,
63                     AUDIO_DEVICE_OUT_SPEAKER,
64                     AUDIO_DEVICE_OUT_WIRED_HEADSET,
65                     AUDIO_DEVICE_OUT_WIRED_HEADPHONE,
66                     AUDIO_DEVICE_OUT_BLUETOOTH_A2DP,
67                     AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES,
68                     AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER,
69                     AUDIO_DEVICE_OUT_HDMI,
70                     AUDIO_DEVICE_OUT_HDMI_EARC,
71                     AUDIO_DEVICE_OUT_AUX_DIGITAL,
72                     AUDIO_DEVICE_OUT_USB_ACCESSORY,
73                     AUDIO_DEVICE_OUT_USB_DEVICE,
74                     AUDIO_DEVICE_OUT_LINE,
75                     AUDIO_DEVICE_OUT_HDMI_ARC,
76                     AUDIO_DEVICE_OUT_AUX_LINE,
77                     AUDIO_DEVICE_OUT_SPEAKER_SAFE,
78                     AUDIO_DEVICE_OUT_BUS,
79                     AUDIO_DEVICE_OUT_USB_HEADSET,
80                     AUDIO_DEVICE_OUT_BLE_HEADSET,
81                     AUDIO_DEVICE_OUT_BLE_SPEAKER,
82                     AUDIO_DEVICE_OUT_BLE_BROADCAST,
83                     AUDIO_DEVICE_OUT_DEFAULT,
84                     TYPE_BUILTIN_SPEAKER,
85                     TYPE_WIRED_HEADSET,
86                     TYPE_WIRED_HEADPHONES,
87                     TYPE_BLUETOOTH_A2DP,
88                     TYPE_HDMI,
89                     TYPE_USB_ACCESSORY,
90                     TYPE_USB_DEVICE,
91                     TYPE_USB_HEADSET,
92                     TYPE_AUX_LINE,
93                     TYPE_BUS,
94                     TYPE_BLE_HEADSET,
95                     TYPE_BLE_SPEAKER,
96                     TYPE_BLE_BROADCAST,
97                 };
98                 OutDeviceType stringToOutDeviceType(const std::string& value);
99                 std::string toString(OutDeviceType o);
100 
101                 enum class InDeviceType {
102                     UNKNOWN = -1,
103                     AUDIO_DEVICE_IN_COMMUNICATION,
104                     AUDIO_DEVICE_IN_AMBIENT,
105                     AUDIO_DEVICE_IN_BUILTIN_MIC,
106                     AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET,
107                     AUDIO_DEVICE_IN_WIRED_HEADSET,
108                     AUDIO_DEVICE_IN_AUX_DIGITAL,
109                     AUDIO_DEVICE_IN_HDMI,
110                     AUDIO_DEVICE_IN_VOICE_CALL,
111                     AUDIO_DEVICE_IN_TELEPHONY_RX,
112                     AUDIO_DEVICE_IN_BACK_MIC,
113                     AUDIO_DEVICE_IN_REMOTE_SUBMIX,
114                     AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET,
115                     AUDIO_DEVICE_IN_DGTL_DOCK_HEADSET,
116                     AUDIO_DEVICE_IN_USB_ACCESSORY,
117                     AUDIO_DEVICE_IN_USB_DEVICE,
118                     AUDIO_DEVICE_IN_FM_TUNER,
119                     AUDIO_DEVICE_IN_TV_TUNER,
120                     AUDIO_DEVICE_IN_LINE,
121                     AUDIO_DEVICE_IN_SPDIF,
122                     AUDIO_DEVICE_IN_BLUETOOTH_A2DP,
123                     AUDIO_DEVICE_IN_LOOPBACK,
124                     AUDIO_DEVICE_IN_IP,
125                     AUDIO_DEVICE_IN_BUS,
126                     AUDIO_DEVICE_IN_PROXY,
127                     AUDIO_DEVICE_IN_USB_HEADSET,
128                     AUDIO_DEVICE_IN_BLUETOOTH_BLE,
129                     AUDIO_DEVICE_IN_HDMI_ARC,
130                     AUDIO_DEVICE_IN_ECHO_REFERENCE,
131                     AUDIO_DEVICE_IN_DEFAULT,
132                     AUDIO_DEVICE_IN_STUB,
133                 };
134                 InDeviceType stringToInDeviceType(const std::string& value);
135                 std::string toString(InDeviceType o);
136 
137             } // audiocontrol
138         } // automotive
139     } // hardware
140 } // android
141 
142 //
143 // global type declarations for package
144 //
145 
146 namespace android {
147     namespace details {
148         template<> inline constexpr std::array<::android::hardware::automotive::audiocontrol::ContentTypeEnum, 5> xsdc_enum_values<::android::hardware::automotive::audiocontrol::ContentTypeEnum> = {
149             ::android::hardware::automotive::audiocontrol::ContentTypeEnum::AUDIO_CONTENT_TYPE_UNKNOWN,
150             ::android::hardware::automotive::audiocontrol::ContentTypeEnum::AUDIO_CONTENT_TYPE_SPEECH,
151             ::android::hardware::automotive::audiocontrol::ContentTypeEnum::AUDIO_CONTENT_TYPE_MUSIC,
152             ::android::hardware::automotive::audiocontrol::ContentTypeEnum::AUDIO_CONTENT_TYPE_MOVIE,
153             ::android::hardware::automotive::audiocontrol::ContentTypeEnum::AUDIO_CONTENT_TYPE_SONIFICATION,
154         };
155         template<> inline constexpr std::array<::android::hardware::automotive::audiocontrol::UsageEnumType, 22> xsdc_enum_values<::android::hardware::automotive::audiocontrol::UsageEnumType> = {
156             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_UNKNOWN,
157             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_MEDIA,
158             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_VOICE_COMMUNICATION,
159             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING,
160             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_ALARM,
161             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_NOTIFICATION,
162             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE,
163             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_NOTIFICATION_COMMUNICATION_REQUEST,
164             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_NOTIFICATION_COMMUNICATION_INSTANT,
165             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED,
166             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_NOTIFICATION_EVENT,
167             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY,
168             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE,
169             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_ASSISTANCE_SONIFICATION,
170             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_GAME,
171             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_VIRTUAL_SOURCE,
172             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_ASSISTANT,
173             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_CALL_ASSISTANT,
174             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_EMERGENCY,
175             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_SAFETY,
176             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_VEHICLE_STATUS,
177             ::android::hardware::automotive::audiocontrol::UsageEnumType::AUDIO_USAGE_ANNOUNCEMENT,
178         };
179         template<> inline constexpr std::array<::android::hardware::automotive::audiocontrol::ActivationType, 3> xsdc_enum_values<::android::hardware::automotive::audiocontrol::ActivationType> = {
180             ::android::hardware::automotive::audiocontrol::ActivationType::onBoot,
181             ::android::hardware::automotive::audiocontrol::ActivationType::onSourceChanged,
182             ::android::hardware::automotive::audiocontrol::ActivationType::onPlaybackChanged,
183         };
184         template<> inline constexpr std::array<::android::hardware::automotive::audiocontrol::OutDeviceType, 34> xsdc_enum_values<::android::hardware::automotive::audiocontrol::OutDeviceType> = {
185             ::android::hardware::automotive::audiocontrol::OutDeviceType::AUDIO_DEVICE_OUT_SPEAKER,
186             ::android::hardware::automotive::audiocontrol::OutDeviceType::AUDIO_DEVICE_OUT_WIRED_HEADSET,
187             ::android::hardware::automotive::audiocontrol::OutDeviceType::AUDIO_DEVICE_OUT_WIRED_HEADPHONE,
188             ::android::hardware::automotive::audiocontrol::OutDeviceType::AUDIO_DEVICE_OUT_BLUETOOTH_A2DP,
189             ::android::hardware::automotive::audiocontrol::OutDeviceType::AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES,
190             ::android::hardware::automotive::audiocontrol::OutDeviceType::AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER,
191             ::android::hardware::automotive::audiocontrol::OutDeviceType::AUDIO_DEVICE_OUT_HDMI,
192             ::android::hardware::automotive::audiocontrol::OutDeviceType::AUDIO_DEVICE_OUT_HDMI_EARC,
193             ::android::hardware::automotive::audiocontrol::OutDeviceType::AUDIO_DEVICE_OUT_AUX_DIGITAL,
194             ::android::hardware::automotive::audiocontrol::OutDeviceType::AUDIO_DEVICE_OUT_USB_ACCESSORY,
195             ::android::hardware::automotive::audiocontrol::OutDeviceType::AUDIO_DEVICE_OUT_USB_DEVICE,
196             ::android::hardware::automotive::audiocontrol::OutDeviceType::AUDIO_DEVICE_OUT_LINE,
197             ::android::hardware::automotive::audiocontrol::OutDeviceType::AUDIO_DEVICE_OUT_HDMI_ARC,
198             ::android::hardware::automotive::audiocontrol::OutDeviceType::AUDIO_DEVICE_OUT_AUX_LINE,
199             ::android::hardware::automotive::audiocontrol::OutDeviceType::AUDIO_DEVICE_OUT_SPEAKER_SAFE,
200             ::android::hardware::automotive::audiocontrol::OutDeviceType::AUDIO_DEVICE_OUT_BUS,
201             ::android::hardware::automotive::audiocontrol::OutDeviceType::AUDIO_DEVICE_OUT_USB_HEADSET,
202             ::android::hardware::automotive::audiocontrol::OutDeviceType::AUDIO_DEVICE_OUT_BLE_HEADSET,
203             ::android::hardware::automotive::audiocontrol::OutDeviceType::AUDIO_DEVICE_OUT_BLE_SPEAKER,
204             ::android::hardware::automotive::audiocontrol::OutDeviceType::AUDIO_DEVICE_OUT_BLE_BROADCAST,
205             ::android::hardware::automotive::audiocontrol::OutDeviceType::AUDIO_DEVICE_OUT_DEFAULT,
206             ::android::hardware::automotive::audiocontrol::OutDeviceType::TYPE_BUILTIN_SPEAKER,
207             ::android::hardware::automotive::audiocontrol::OutDeviceType::TYPE_WIRED_HEADSET,
208             ::android::hardware::automotive::audiocontrol::OutDeviceType::TYPE_WIRED_HEADPHONES,
209             ::android::hardware::automotive::audiocontrol::OutDeviceType::TYPE_BLUETOOTH_A2DP,
210             ::android::hardware::automotive::audiocontrol::OutDeviceType::TYPE_HDMI,
211             ::android::hardware::automotive::audiocontrol::OutDeviceType::TYPE_USB_ACCESSORY,
212             ::android::hardware::automotive::audiocontrol::OutDeviceType::TYPE_USB_DEVICE,
213             ::android::hardware::automotive::audiocontrol::OutDeviceType::TYPE_USB_HEADSET,
214             ::android::hardware::automotive::audiocontrol::OutDeviceType::TYPE_AUX_LINE,
215             ::android::hardware::automotive::audiocontrol::OutDeviceType::TYPE_BUS,
216             ::android::hardware::automotive::audiocontrol::OutDeviceType::TYPE_BLE_HEADSET,
217             ::android::hardware::automotive::audiocontrol::OutDeviceType::TYPE_BLE_SPEAKER,
218             ::android::hardware::automotive::audiocontrol::OutDeviceType::TYPE_BLE_BROADCAST,
219         };
220         template<> inline constexpr std::array<::android::hardware::automotive::audiocontrol::InDeviceType, 30> xsdc_enum_values<::android::hardware::automotive::audiocontrol::InDeviceType> = {
221             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_COMMUNICATION,
222             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_AMBIENT,
223             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_BUILTIN_MIC,
224             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET,
225             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_WIRED_HEADSET,
226             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_AUX_DIGITAL,
227             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_HDMI,
228             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_VOICE_CALL,
229             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_TELEPHONY_RX,
230             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_BACK_MIC,
231             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_REMOTE_SUBMIX,
232             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET,
233             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_DGTL_DOCK_HEADSET,
234             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_USB_ACCESSORY,
235             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_USB_DEVICE,
236             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_FM_TUNER,
237             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_TV_TUNER,
238             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_LINE,
239             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_SPDIF,
240             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_BLUETOOTH_A2DP,
241             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_LOOPBACK,
242             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_IP,
243             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_BUS,
244             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_PROXY,
245             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_USB_HEADSET,
246             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_BLUETOOTH_BLE,
247             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_HDMI_ARC,
248             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_ECHO_REFERENCE,
249             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_DEFAULT,
250             ::android::hardware::automotive::audiocontrol::InDeviceType::AUDIO_DEVICE_IN_STUB,
251         };
252     }  // namespace details
253 }  // namespace android
254 
255 #endif // ANDROID_HARDWARE_AUTOMOTIVE_AUDIOCONTROL_ENUMS_H
256