1 | /* AUTOMATICALLY GENERATED, DO NOT MODIFY */ |
2 | |
3 | /* |
4 | * Schema-defined QAPI types |
5 | * |
6 | * Copyright IBM, Corp. 2011 |
7 | * Copyright (c) 2013-2018 Red Hat Inc. |
8 | * |
9 | * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. |
10 | * See the COPYING.LIB file in the top-level directory. |
11 | */ |
12 | |
13 | #include "qemu/osdep.h" |
14 | #include "qapi/dealloc-visitor.h" |
15 | #include "qapi-types-audio.h" |
16 | #include "qapi-visit-audio.h" |
17 | |
18 | void qapi_free_AudiodevPerDirectionOptions(AudiodevPerDirectionOptions *obj) |
19 | { |
20 | Visitor *v; |
21 | |
22 | if (!obj) { |
23 | return; |
24 | } |
25 | |
26 | v = qapi_dealloc_visitor_new(); |
27 | visit_type_AudiodevPerDirectionOptions(v, NULL, &obj, NULL); |
28 | visit_free(v); |
29 | } |
30 | |
31 | void qapi_free_AudiodevGenericOptions(AudiodevGenericOptions *obj) |
32 | { |
33 | Visitor *v; |
34 | |
35 | if (!obj) { |
36 | return; |
37 | } |
38 | |
39 | v = qapi_dealloc_visitor_new(); |
40 | visit_type_AudiodevGenericOptions(v, NULL, &obj, NULL); |
41 | visit_free(v); |
42 | } |
43 | |
44 | void qapi_free_AudiodevAlsaPerDirectionOptions(AudiodevAlsaPerDirectionOptions *obj) |
45 | { |
46 | Visitor *v; |
47 | |
48 | if (!obj) { |
49 | return; |
50 | } |
51 | |
52 | v = qapi_dealloc_visitor_new(); |
53 | visit_type_AudiodevAlsaPerDirectionOptions(v, NULL, &obj, NULL); |
54 | visit_free(v); |
55 | } |
56 | |
57 | void qapi_free_AudiodevAlsaOptions(AudiodevAlsaOptions *obj) |
58 | { |
59 | Visitor *v; |
60 | |
61 | if (!obj) { |
62 | return; |
63 | } |
64 | |
65 | v = qapi_dealloc_visitor_new(); |
66 | visit_type_AudiodevAlsaOptions(v, NULL, &obj, NULL); |
67 | visit_free(v); |
68 | } |
69 | |
70 | void qapi_free_AudiodevCoreaudioPerDirectionOptions(AudiodevCoreaudioPerDirectionOptions *obj) |
71 | { |
72 | Visitor *v; |
73 | |
74 | if (!obj) { |
75 | return; |
76 | } |
77 | |
78 | v = qapi_dealloc_visitor_new(); |
79 | visit_type_AudiodevCoreaudioPerDirectionOptions(v, NULL, &obj, NULL); |
80 | visit_free(v); |
81 | } |
82 | |
83 | void qapi_free_AudiodevCoreaudioOptions(AudiodevCoreaudioOptions *obj) |
84 | { |
85 | Visitor *v; |
86 | |
87 | if (!obj) { |
88 | return; |
89 | } |
90 | |
91 | v = qapi_dealloc_visitor_new(); |
92 | visit_type_AudiodevCoreaudioOptions(v, NULL, &obj, NULL); |
93 | visit_free(v); |
94 | } |
95 | |
96 | void qapi_free_AudiodevDsoundOptions(AudiodevDsoundOptions *obj) |
97 | { |
98 | Visitor *v; |
99 | |
100 | if (!obj) { |
101 | return; |
102 | } |
103 | |
104 | v = qapi_dealloc_visitor_new(); |
105 | visit_type_AudiodevDsoundOptions(v, NULL, &obj, NULL); |
106 | visit_free(v); |
107 | } |
108 | |
109 | void qapi_free_AudiodevOssPerDirectionOptions(AudiodevOssPerDirectionOptions *obj) |
110 | { |
111 | Visitor *v; |
112 | |
113 | if (!obj) { |
114 | return; |
115 | } |
116 | |
117 | v = qapi_dealloc_visitor_new(); |
118 | visit_type_AudiodevOssPerDirectionOptions(v, NULL, &obj, NULL); |
119 | visit_free(v); |
120 | } |
121 | |
122 | void qapi_free_AudiodevOssOptions(AudiodevOssOptions *obj) |
123 | { |
124 | Visitor *v; |
125 | |
126 | if (!obj) { |
127 | return; |
128 | } |
129 | |
130 | v = qapi_dealloc_visitor_new(); |
131 | visit_type_AudiodevOssOptions(v, NULL, &obj, NULL); |
132 | visit_free(v); |
133 | } |
134 | |
135 | void qapi_free_AudiodevPaPerDirectionOptions(AudiodevPaPerDirectionOptions *obj) |
136 | { |
137 | Visitor *v; |
138 | |
139 | if (!obj) { |
140 | return; |
141 | } |
142 | |
143 | v = qapi_dealloc_visitor_new(); |
144 | visit_type_AudiodevPaPerDirectionOptions(v, NULL, &obj, NULL); |
145 | visit_free(v); |
146 | } |
147 | |
148 | void qapi_free_AudiodevPaOptions(AudiodevPaOptions *obj) |
149 | { |
150 | Visitor *v; |
151 | |
152 | if (!obj) { |
153 | return; |
154 | } |
155 | |
156 | v = qapi_dealloc_visitor_new(); |
157 | visit_type_AudiodevPaOptions(v, NULL, &obj, NULL); |
158 | visit_free(v); |
159 | } |
160 | |
161 | void qapi_free_AudiodevWavOptions(AudiodevWavOptions *obj) |
162 | { |
163 | Visitor *v; |
164 | |
165 | if (!obj) { |
166 | return; |
167 | } |
168 | |
169 | v = qapi_dealloc_visitor_new(); |
170 | visit_type_AudiodevWavOptions(v, NULL, &obj, NULL); |
171 | visit_free(v); |
172 | } |
173 | |
174 | const QEnumLookup AudioFormat_lookup = { |
175 | .array = (const char *const[]) { |
176 | [AUDIO_FORMAT_U8] = "u8" , |
177 | [AUDIO_FORMAT_S8] = "s8" , |
178 | [AUDIO_FORMAT_U16] = "u16" , |
179 | [AUDIO_FORMAT_S16] = "s16" , |
180 | [AUDIO_FORMAT_U32] = "u32" , |
181 | [AUDIO_FORMAT_S32] = "s32" , |
182 | }, |
183 | .size = AUDIO_FORMAT__MAX |
184 | }; |
185 | |
186 | const QEnumLookup AudiodevDriver_lookup = { |
187 | .array = (const char *const[]) { |
188 | [AUDIODEV_DRIVER_NONE] = "none" , |
189 | [AUDIODEV_DRIVER_ALSA] = "alsa" , |
190 | [AUDIODEV_DRIVER_COREAUDIO] = "coreaudio" , |
191 | [AUDIODEV_DRIVER_DSOUND] = "dsound" , |
192 | [AUDIODEV_DRIVER_OSS] = "oss" , |
193 | [AUDIODEV_DRIVER_PA] = "pa" , |
194 | [AUDIODEV_DRIVER_SDL] = "sdl" , |
195 | [AUDIODEV_DRIVER_SPICE] = "spice" , |
196 | [AUDIODEV_DRIVER_WAV] = "wav" , |
197 | }, |
198 | .size = AUDIODEV_DRIVER__MAX |
199 | }; |
200 | |
201 | void qapi_free_Audiodev(Audiodev *obj) |
202 | { |
203 | Visitor *v; |
204 | |
205 | if (!obj) { |
206 | return; |
207 | } |
208 | |
209 | v = qapi_dealloc_visitor_new(); |
210 | visit_type_Audiodev(v, NULL, &obj, NULL); |
211 | visit_free(v); |
212 | } |
213 | |
214 | /* Dummy declaration to prevent empty .o file */ |
215 | char qapi_dummy_qapi_types_audio_c; |
216 | |