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-job.h" |
16 | #include "qapi-visit-job.h" |
17 | |
18 | const QEnumLookup JobType_lookup = { |
19 | .array = (const char *const[]) { |
20 | [JOB_TYPE_COMMIT] = "commit" , |
21 | [JOB_TYPE_STREAM] = "stream" , |
22 | [JOB_TYPE_MIRROR] = "mirror" , |
23 | [JOB_TYPE_BACKUP] = "backup" , |
24 | [JOB_TYPE_CREATE] = "create" , |
25 | }, |
26 | .size = JOB_TYPE__MAX |
27 | }; |
28 | |
29 | const QEnumLookup JobStatus_lookup = { |
30 | .array = (const char *const[]) { |
31 | [JOB_STATUS_UNDEFINED] = "undefined" , |
32 | [JOB_STATUS_CREATED] = "created" , |
33 | [JOB_STATUS_RUNNING] = "running" , |
34 | [JOB_STATUS_PAUSED] = "paused" , |
35 | [JOB_STATUS_READY] = "ready" , |
36 | [JOB_STATUS_STANDBY] = "standby" , |
37 | [JOB_STATUS_WAITING] = "waiting" , |
38 | [JOB_STATUS_PENDING] = "pending" , |
39 | [JOB_STATUS_ABORTING] = "aborting" , |
40 | [JOB_STATUS_CONCLUDED] = "concluded" , |
41 | [JOB_STATUS_NULL] = "null" , |
42 | }, |
43 | .size = JOB_STATUS__MAX |
44 | }; |
45 | |
46 | const QEnumLookup JobVerb_lookup = { |
47 | .array = (const char *const[]) { |
48 | [JOB_VERB_CANCEL] = "cancel" , |
49 | [JOB_VERB_PAUSE] = "pause" , |
50 | [JOB_VERB_RESUME] = "resume" , |
51 | [JOB_VERB_SET_SPEED] = "set-speed" , |
52 | [JOB_VERB_COMPLETE] = "complete" , |
53 | [JOB_VERB_DISMISS] = "dismiss" , |
54 | [JOB_VERB_FINALIZE] = "finalize" , |
55 | }, |
56 | .size = JOB_VERB__MAX |
57 | }; |
58 | |
59 | void qapi_free_JobInfo(JobInfo *obj) |
60 | { |
61 | Visitor *v; |
62 | |
63 | if (!obj) { |
64 | return; |
65 | } |
66 | |
67 | v = qapi_dealloc_visitor_new(); |
68 | visit_type_JobInfo(v, NULL, &obj, NULL); |
69 | visit_free(v); |
70 | } |
71 | |
72 | void qapi_free_JobInfoList(JobInfoList *obj) |
73 | { |
74 | Visitor *v; |
75 | |
76 | if (!obj) { |
77 | return; |
78 | } |
79 | |
80 | v = qapi_dealloc_visitor_new(); |
81 | visit_type_JobInfoList(v, NULL, &obj, NULL); |
82 | visit_free(v); |
83 | } |
84 | |
85 | /* Dummy declaration to prevent empty .o file */ |
86 | char qapi_dummy_qapi_types_job_c; |
87 | |