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 | #ifndef QGA_QAPI_TYPES_H |
14 | #define QGA_QAPI_TYPES_H |
15 | |
16 | #include "qapi/qapi-builtin-types.h" |
17 | |
18 | typedef struct q_obj_guest_sync_delimited_arg q_obj_guest_sync_delimited_arg; |
19 | |
20 | typedef struct q_obj_guest_sync_arg q_obj_guest_sync_arg; |
21 | |
22 | typedef struct q_obj_guest_set_time_arg q_obj_guest_set_time_arg; |
23 | |
24 | typedef struct GuestAgentCommandInfo GuestAgentCommandInfo; |
25 | |
26 | typedef struct GuestAgentCommandInfoList GuestAgentCommandInfoList; |
27 | |
28 | typedef struct GuestAgentInfo GuestAgentInfo; |
29 | |
30 | typedef struct q_obj_guest_shutdown_arg q_obj_guest_shutdown_arg; |
31 | |
32 | typedef struct q_obj_guest_file_open_arg q_obj_guest_file_open_arg; |
33 | |
34 | typedef struct q_obj_guest_file_close_arg q_obj_guest_file_close_arg; |
35 | |
36 | typedef struct GuestFileRead GuestFileRead; |
37 | |
38 | typedef struct q_obj_guest_file_read_arg q_obj_guest_file_read_arg; |
39 | |
40 | typedef struct GuestFileWrite GuestFileWrite; |
41 | |
42 | typedef struct q_obj_guest_file_write_arg q_obj_guest_file_write_arg; |
43 | |
44 | typedef struct GuestFileSeek GuestFileSeek; |
45 | |
46 | typedef enum QGASeek { |
47 | QGA_SEEK_SET, |
48 | QGA_SEEK_CUR, |
49 | QGA_SEEK_END, |
50 | QGA_SEEK__MAX, |
51 | } QGASeek; |
52 | |
53 | #define QGASeek_str(val) \ |
54 | qapi_enum_lookup(&QGASeek_lookup, (val)) |
55 | |
56 | extern const QEnumLookup QGASeek_lookup; |
57 | |
58 | typedef struct GuestFileWhence GuestFileWhence; |
59 | |
60 | typedef struct q_obj_guest_file_seek_arg q_obj_guest_file_seek_arg; |
61 | |
62 | typedef struct q_obj_guest_file_flush_arg q_obj_guest_file_flush_arg; |
63 | |
64 | typedef enum GuestFsfreezeStatus { |
65 | GUEST_FSFREEZE_STATUS_THAWED, |
66 | GUEST_FSFREEZE_STATUS_FROZEN, |
67 | GUEST_FSFREEZE_STATUS__MAX, |
68 | } GuestFsfreezeStatus; |
69 | |
70 | #define GuestFsfreezeStatus_str(val) \ |
71 | qapi_enum_lookup(&GuestFsfreezeStatus_lookup, (val)) |
72 | |
73 | extern const QEnumLookup GuestFsfreezeStatus_lookup; |
74 | |
75 | typedef struct q_obj_guest_fsfreeze_freeze_list_arg q_obj_guest_fsfreeze_freeze_list_arg; |
76 | |
77 | typedef struct GuestFilesystemTrimResult GuestFilesystemTrimResult; |
78 | |
79 | typedef struct GuestFilesystemTrimResultList GuestFilesystemTrimResultList; |
80 | |
81 | typedef struct GuestFilesystemTrimResponse GuestFilesystemTrimResponse; |
82 | |
83 | typedef struct q_obj_guest_fstrim_arg q_obj_guest_fstrim_arg; |
84 | |
85 | typedef enum GuestIpAddressType { |
86 | GUEST_IP_ADDRESS_TYPE_IPV4, |
87 | GUEST_IP_ADDRESS_TYPE_IPV6, |
88 | GUEST_IP_ADDRESS_TYPE__MAX, |
89 | } GuestIpAddressType; |
90 | |
91 | #define GuestIpAddressType_str(val) \ |
92 | qapi_enum_lookup(&GuestIpAddressType_lookup, (val)) |
93 | |
94 | extern const QEnumLookup GuestIpAddressType_lookup; |
95 | |
96 | typedef struct GuestIpAddress GuestIpAddress; |
97 | |
98 | typedef struct GuestNetworkInterfaceStat GuestNetworkInterfaceStat; |
99 | |
100 | typedef struct GuestIpAddressList GuestIpAddressList; |
101 | |
102 | typedef struct GuestNetworkInterface GuestNetworkInterface; |
103 | |
104 | typedef struct GuestNetworkInterfaceList GuestNetworkInterfaceList; |
105 | |
106 | typedef struct GuestLogicalProcessor GuestLogicalProcessor; |
107 | |
108 | typedef struct GuestLogicalProcessorList GuestLogicalProcessorList; |
109 | |
110 | typedef struct q_obj_guest_set_vcpus_arg q_obj_guest_set_vcpus_arg; |
111 | |
112 | typedef enum GuestDiskBusType { |
113 | GUEST_DISK_BUS_TYPE_IDE, |
114 | GUEST_DISK_BUS_TYPE_FDC, |
115 | GUEST_DISK_BUS_TYPE_SCSI, |
116 | GUEST_DISK_BUS_TYPE_VIRTIO, |
117 | GUEST_DISK_BUS_TYPE_XEN, |
118 | GUEST_DISK_BUS_TYPE_USB, |
119 | GUEST_DISK_BUS_TYPE_UML, |
120 | GUEST_DISK_BUS_TYPE_SATA, |
121 | GUEST_DISK_BUS_TYPE_SD, |
122 | GUEST_DISK_BUS_TYPE_UNKNOWN, |
123 | GUEST_DISK_BUS_TYPE_IEEE1394, |
124 | GUEST_DISK_BUS_TYPE_SSA, |
125 | GUEST_DISK_BUS_TYPE_FIBRE, |
126 | GUEST_DISK_BUS_TYPE_RAID, |
127 | GUEST_DISK_BUS_TYPE_ISCSI, |
128 | GUEST_DISK_BUS_TYPE_SAS, |
129 | GUEST_DISK_BUS_TYPE_MMC, |
130 | GUEST_DISK_BUS_TYPE_VIRTUAL, |
131 | GUEST_DISK_BUS_TYPE_FILE_BACKED_VIRTUAL, |
132 | GUEST_DISK_BUS_TYPE__MAX, |
133 | } GuestDiskBusType; |
134 | |
135 | #define GuestDiskBusType_str(val) \ |
136 | qapi_enum_lookup(&GuestDiskBusType_lookup, (val)) |
137 | |
138 | extern const QEnumLookup GuestDiskBusType_lookup; |
139 | |
140 | typedef struct GuestPCIAddress GuestPCIAddress; |
141 | |
142 | typedef struct GuestDiskAddress GuestDiskAddress; |
143 | |
144 | typedef struct GuestDiskAddressList GuestDiskAddressList; |
145 | |
146 | typedef struct GuestFilesystemInfo GuestFilesystemInfo; |
147 | |
148 | typedef struct GuestFilesystemInfoList GuestFilesystemInfoList; |
149 | |
150 | typedef struct q_obj_guest_set_user_password_arg q_obj_guest_set_user_password_arg; |
151 | |
152 | typedef struct GuestMemoryBlock GuestMemoryBlock; |
153 | |
154 | typedef struct GuestMemoryBlockList GuestMemoryBlockList; |
155 | |
156 | typedef enum GuestMemoryBlockResponseType { |
157 | GUEST_MEMORY_BLOCK_RESPONSE_TYPE_SUCCESS, |
158 | GUEST_MEMORY_BLOCK_RESPONSE_TYPE_NOT_FOUND, |
159 | GUEST_MEMORY_BLOCK_RESPONSE_TYPE_OPERATION_NOT_SUPPORTED, |
160 | GUEST_MEMORY_BLOCK_RESPONSE_TYPE_OPERATION_FAILED, |
161 | GUEST_MEMORY_BLOCK_RESPONSE_TYPE__MAX, |
162 | } GuestMemoryBlockResponseType; |
163 | |
164 | #define GuestMemoryBlockResponseType_str(val) \ |
165 | qapi_enum_lookup(&GuestMemoryBlockResponseType_lookup, (val)) |
166 | |
167 | extern const QEnumLookup GuestMemoryBlockResponseType_lookup; |
168 | |
169 | typedef struct GuestMemoryBlockResponse GuestMemoryBlockResponse; |
170 | |
171 | typedef struct q_obj_guest_set_memory_blocks_arg q_obj_guest_set_memory_blocks_arg; |
172 | |
173 | typedef struct GuestMemoryBlockResponseList GuestMemoryBlockResponseList; |
174 | |
175 | typedef struct GuestMemoryBlockInfo GuestMemoryBlockInfo; |
176 | |
177 | typedef struct GuestExecStatus GuestExecStatus; |
178 | |
179 | typedef struct q_obj_guest_exec_status_arg q_obj_guest_exec_status_arg; |
180 | |
181 | typedef struct GuestExec GuestExec; |
182 | |
183 | typedef struct q_obj_guest_exec_arg q_obj_guest_exec_arg; |
184 | |
185 | typedef struct GuestHostName GuestHostName; |
186 | |
187 | typedef struct GuestUser GuestUser; |
188 | |
189 | typedef struct GuestUserList GuestUserList; |
190 | |
191 | typedef struct GuestTimezone GuestTimezone; |
192 | |
193 | typedef struct GuestOSInfo GuestOSInfo; |
194 | |
195 | struct q_obj_guest_sync_delimited_arg { |
196 | int64_t id; |
197 | }; |
198 | |
199 | struct q_obj_guest_sync_arg { |
200 | int64_t id; |
201 | }; |
202 | |
203 | struct q_obj_guest_set_time_arg { |
204 | bool has_time; |
205 | int64_t time; |
206 | }; |
207 | |
208 | struct GuestAgentCommandInfo { |
209 | char *name; |
210 | bool enabled; |
211 | bool success_response; |
212 | }; |
213 | |
214 | void qapi_free_GuestAgentCommandInfo(GuestAgentCommandInfo *obj); |
215 | |
216 | struct GuestAgentCommandInfoList { |
217 | GuestAgentCommandInfoList *next; |
218 | GuestAgentCommandInfo *value; |
219 | }; |
220 | |
221 | void qapi_free_GuestAgentCommandInfoList(GuestAgentCommandInfoList *obj); |
222 | |
223 | struct GuestAgentInfo { |
224 | char *version; |
225 | GuestAgentCommandInfoList *supported_commands; |
226 | }; |
227 | |
228 | void qapi_free_GuestAgentInfo(GuestAgentInfo *obj); |
229 | |
230 | struct q_obj_guest_shutdown_arg { |
231 | bool has_mode; |
232 | char *mode; |
233 | }; |
234 | |
235 | struct q_obj_guest_file_open_arg { |
236 | char *path; |
237 | bool has_mode; |
238 | char *mode; |
239 | }; |
240 | |
241 | struct q_obj_guest_file_close_arg { |
242 | int64_t handle; |
243 | }; |
244 | |
245 | struct GuestFileRead { |
246 | int64_t count; |
247 | char *buf_b64; |
248 | bool eof; |
249 | }; |
250 | |
251 | void qapi_free_GuestFileRead(GuestFileRead *obj); |
252 | |
253 | struct q_obj_guest_file_read_arg { |
254 | int64_t handle; |
255 | bool has_count; |
256 | int64_t count; |
257 | }; |
258 | |
259 | struct GuestFileWrite { |
260 | int64_t count; |
261 | bool eof; |
262 | }; |
263 | |
264 | void qapi_free_GuestFileWrite(GuestFileWrite *obj); |
265 | |
266 | struct q_obj_guest_file_write_arg { |
267 | int64_t handle; |
268 | char *buf_b64; |
269 | bool has_count; |
270 | int64_t count; |
271 | }; |
272 | |
273 | struct GuestFileSeek { |
274 | int64_t position; |
275 | bool eof; |
276 | }; |
277 | |
278 | void qapi_free_GuestFileSeek(GuestFileSeek *obj); |
279 | |
280 | struct GuestFileWhence { |
281 | QType type; |
282 | union { /* union tag is @type */ |
283 | int64_t value; |
284 | QGASeek name; |
285 | } u; |
286 | }; |
287 | |
288 | void qapi_free_GuestFileWhence(GuestFileWhence *obj); |
289 | |
290 | struct q_obj_guest_file_seek_arg { |
291 | int64_t handle; |
292 | int64_t offset; |
293 | GuestFileWhence *whence; |
294 | }; |
295 | |
296 | struct q_obj_guest_file_flush_arg { |
297 | int64_t handle; |
298 | }; |
299 | |
300 | struct q_obj_guest_fsfreeze_freeze_list_arg { |
301 | bool has_mountpoints; |
302 | strList *mountpoints; |
303 | }; |
304 | |
305 | struct GuestFilesystemTrimResult { |
306 | char *path; |
307 | bool has_trimmed; |
308 | int64_t trimmed; |
309 | bool has_minimum; |
310 | int64_t minimum; |
311 | bool has_error; |
312 | char *error; |
313 | }; |
314 | |
315 | void qapi_free_GuestFilesystemTrimResult(GuestFilesystemTrimResult *obj); |
316 | |
317 | struct GuestFilesystemTrimResultList { |
318 | GuestFilesystemTrimResultList *next; |
319 | GuestFilesystemTrimResult *value; |
320 | }; |
321 | |
322 | void qapi_free_GuestFilesystemTrimResultList(GuestFilesystemTrimResultList *obj); |
323 | |
324 | struct GuestFilesystemTrimResponse { |
325 | GuestFilesystemTrimResultList *paths; |
326 | }; |
327 | |
328 | void qapi_free_GuestFilesystemTrimResponse(GuestFilesystemTrimResponse *obj); |
329 | |
330 | struct q_obj_guest_fstrim_arg { |
331 | bool has_minimum; |
332 | int64_t minimum; |
333 | }; |
334 | |
335 | struct GuestIpAddress { |
336 | char *ip_address; |
337 | GuestIpAddressType ip_address_type; |
338 | int64_t prefix; |
339 | }; |
340 | |
341 | void qapi_free_GuestIpAddress(GuestIpAddress *obj); |
342 | |
343 | struct GuestNetworkInterfaceStat { |
344 | uint64_t rx_bytes; |
345 | uint64_t rx_packets; |
346 | uint64_t rx_errs; |
347 | uint64_t rx_dropped; |
348 | uint64_t tx_bytes; |
349 | uint64_t tx_packets; |
350 | uint64_t tx_errs; |
351 | uint64_t tx_dropped; |
352 | }; |
353 | |
354 | void qapi_free_GuestNetworkInterfaceStat(GuestNetworkInterfaceStat *obj); |
355 | |
356 | struct GuestIpAddressList { |
357 | GuestIpAddressList *next; |
358 | GuestIpAddress *value; |
359 | }; |
360 | |
361 | void qapi_free_GuestIpAddressList(GuestIpAddressList *obj); |
362 | |
363 | struct GuestNetworkInterface { |
364 | char *name; |
365 | bool has_hardware_address; |
366 | char *hardware_address; |
367 | bool has_ip_addresses; |
368 | GuestIpAddressList *ip_addresses; |
369 | bool has_statistics; |
370 | GuestNetworkInterfaceStat *statistics; |
371 | }; |
372 | |
373 | void qapi_free_GuestNetworkInterface(GuestNetworkInterface *obj); |
374 | |
375 | struct GuestNetworkInterfaceList { |
376 | GuestNetworkInterfaceList *next; |
377 | GuestNetworkInterface *value; |
378 | }; |
379 | |
380 | void qapi_free_GuestNetworkInterfaceList(GuestNetworkInterfaceList *obj); |
381 | |
382 | struct GuestLogicalProcessor { |
383 | int64_t logical_id; |
384 | bool online; |
385 | bool has_can_offline; |
386 | bool can_offline; |
387 | }; |
388 | |
389 | void qapi_free_GuestLogicalProcessor(GuestLogicalProcessor *obj); |
390 | |
391 | struct GuestLogicalProcessorList { |
392 | GuestLogicalProcessorList *next; |
393 | GuestLogicalProcessor *value; |
394 | }; |
395 | |
396 | void qapi_free_GuestLogicalProcessorList(GuestLogicalProcessorList *obj); |
397 | |
398 | struct q_obj_guest_set_vcpus_arg { |
399 | GuestLogicalProcessorList *vcpus; |
400 | }; |
401 | |
402 | struct GuestPCIAddress { |
403 | int64_t domain; |
404 | int64_t bus; |
405 | int64_t slot; |
406 | int64_t function; |
407 | }; |
408 | |
409 | void qapi_free_GuestPCIAddress(GuestPCIAddress *obj); |
410 | |
411 | struct GuestDiskAddress { |
412 | GuestPCIAddress *pci_controller; |
413 | GuestDiskBusType bus_type; |
414 | int64_t bus; |
415 | int64_t target; |
416 | int64_t unit; |
417 | bool has_serial; |
418 | char *serial; |
419 | bool has_dev; |
420 | char *dev; |
421 | }; |
422 | |
423 | void qapi_free_GuestDiskAddress(GuestDiskAddress *obj); |
424 | |
425 | struct GuestDiskAddressList { |
426 | GuestDiskAddressList *next; |
427 | GuestDiskAddress *value; |
428 | }; |
429 | |
430 | void qapi_free_GuestDiskAddressList(GuestDiskAddressList *obj); |
431 | |
432 | struct GuestFilesystemInfo { |
433 | char *name; |
434 | char *mountpoint; |
435 | char *type; |
436 | bool has_used_bytes; |
437 | uint64_t used_bytes; |
438 | bool has_total_bytes; |
439 | uint64_t total_bytes; |
440 | GuestDiskAddressList *disk; |
441 | }; |
442 | |
443 | void qapi_free_GuestFilesystemInfo(GuestFilesystemInfo *obj); |
444 | |
445 | struct GuestFilesystemInfoList { |
446 | GuestFilesystemInfoList *next; |
447 | GuestFilesystemInfo *value; |
448 | }; |
449 | |
450 | void qapi_free_GuestFilesystemInfoList(GuestFilesystemInfoList *obj); |
451 | |
452 | struct q_obj_guest_set_user_password_arg { |
453 | char *username; |
454 | char *password; |
455 | bool crypted; |
456 | }; |
457 | |
458 | struct GuestMemoryBlock { |
459 | uint64_t phys_index; |
460 | bool online; |
461 | bool has_can_offline; |
462 | bool can_offline; |
463 | }; |
464 | |
465 | void qapi_free_GuestMemoryBlock(GuestMemoryBlock *obj); |
466 | |
467 | struct GuestMemoryBlockList { |
468 | GuestMemoryBlockList *next; |
469 | GuestMemoryBlock *value; |
470 | }; |
471 | |
472 | void qapi_free_GuestMemoryBlockList(GuestMemoryBlockList *obj); |
473 | |
474 | struct GuestMemoryBlockResponse { |
475 | uint64_t phys_index; |
476 | GuestMemoryBlockResponseType response; |
477 | bool has_error_code; |
478 | int64_t error_code; |
479 | }; |
480 | |
481 | void qapi_free_GuestMemoryBlockResponse(GuestMemoryBlockResponse *obj); |
482 | |
483 | struct q_obj_guest_set_memory_blocks_arg { |
484 | GuestMemoryBlockList *mem_blks; |
485 | }; |
486 | |
487 | struct GuestMemoryBlockResponseList { |
488 | GuestMemoryBlockResponseList *next; |
489 | GuestMemoryBlockResponse *value; |
490 | }; |
491 | |
492 | void qapi_free_GuestMemoryBlockResponseList(GuestMemoryBlockResponseList *obj); |
493 | |
494 | struct GuestMemoryBlockInfo { |
495 | uint64_t size; |
496 | }; |
497 | |
498 | void qapi_free_GuestMemoryBlockInfo(GuestMemoryBlockInfo *obj); |
499 | |
500 | struct GuestExecStatus { |
501 | bool exited; |
502 | bool has_exitcode; |
503 | int64_t exitcode; |
504 | bool has_signal; |
505 | int64_t signal; |
506 | bool has_out_data; |
507 | char *out_data; |
508 | bool has_err_data; |
509 | char *err_data; |
510 | bool has_out_truncated; |
511 | bool out_truncated; |
512 | bool has_err_truncated; |
513 | bool err_truncated; |
514 | }; |
515 | |
516 | void qapi_free_GuestExecStatus(GuestExecStatus *obj); |
517 | |
518 | struct q_obj_guest_exec_status_arg { |
519 | int64_t pid; |
520 | }; |
521 | |
522 | struct GuestExec { |
523 | int64_t pid; |
524 | }; |
525 | |
526 | void qapi_free_GuestExec(GuestExec *obj); |
527 | |
528 | struct q_obj_guest_exec_arg { |
529 | char *path; |
530 | bool has_arg; |
531 | strList *arg; |
532 | bool has_env; |
533 | strList *env; |
534 | bool has_input_data; |
535 | char *input_data; |
536 | bool has_capture_output; |
537 | bool capture_output; |
538 | }; |
539 | |
540 | struct GuestHostName { |
541 | char *host_name; |
542 | }; |
543 | |
544 | void qapi_free_GuestHostName(GuestHostName *obj); |
545 | |
546 | struct GuestUser { |
547 | char *user; |
548 | double login_time; |
549 | bool has_domain; |
550 | char *domain; |
551 | }; |
552 | |
553 | void qapi_free_GuestUser(GuestUser *obj); |
554 | |
555 | struct GuestUserList { |
556 | GuestUserList *next; |
557 | GuestUser *value; |
558 | }; |
559 | |
560 | void qapi_free_GuestUserList(GuestUserList *obj); |
561 | |
562 | struct GuestTimezone { |
563 | bool has_zone; |
564 | char *zone; |
565 | int64_t offset; |
566 | }; |
567 | |
568 | void qapi_free_GuestTimezone(GuestTimezone *obj); |
569 | |
570 | struct GuestOSInfo { |
571 | bool has_kernel_release; |
572 | char *kernel_release; |
573 | bool has_kernel_version; |
574 | char *kernel_version; |
575 | bool has_machine; |
576 | char *machine; |
577 | bool has_id; |
578 | char *id; |
579 | bool has_name; |
580 | char *name; |
581 | bool has_pretty_name; |
582 | char *pretty_name; |
583 | bool has_version; |
584 | char *version; |
585 | bool has_version_id; |
586 | char *version_id; |
587 | bool has_variant; |
588 | char *variant; |
589 | bool has_variant_id; |
590 | char *variant_id; |
591 | }; |
592 | |
593 | void qapi_free_GuestOSInfo(GuestOSInfo *obj); |
594 | |
595 | #endif /* QGA_QAPI_TYPES_H */ |
596 | |