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-tpm.h"
16#include "qapi-visit-tpm.h"
17
18const QEnumLookup TpmModel_lookup = {
19 .array = (const char *const[]) {
20 [TPM_MODEL_TPM_TIS] = "tpm-tis",
21 [TPM_MODEL_TPM_CRB] = "tpm-crb",
22 },
23 .size = TPM_MODEL__MAX
24};
25
26void qapi_free_TpmModelList(TpmModelList *obj)
27{
28 Visitor *v;
29
30 if (!obj) {
31 return;
32 }
33
34 v = qapi_dealloc_visitor_new();
35 visit_type_TpmModelList(v, NULL, &obj, NULL);
36 visit_free(v);
37}
38
39const QEnumLookup TpmType_lookup = {
40 .array = (const char *const[]) {
41 [TPM_TYPE_PASSTHROUGH] = "passthrough",
42 [TPM_TYPE_EMULATOR] = "emulator",
43 },
44 .size = TPM_TYPE__MAX
45};
46
47void qapi_free_TpmTypeList(TpmTypeList *obj)
48{
49 Visitor *v;
50
51 if (!obj) {
52 return;
53 }
54
55 v = qapi_dealloc_visitor_new();
56 visit_type_TpmTypeList(v, NULL, &obj, NULL);
57 visit_free(v);
58}
59
60void qapi_free_TPMPassthroughOptions(TPMPassthroughOptions *obj)
61{
62 Visitor *v;
63
64 if (!obj) {
65 return;
66 }
67
68 v = qapi_dealloc_visitor_new();
69 visit_type_TPMPassthroughOptions(v, NULL, &obj, NULL);
70 visit_free(v);
71}
72
73void qapi_free_TPMEmulatorOptions(TPMEmulatorOptions *obj)
74{
75 Visitor *v;
76
77 if (!obj) {
78 return;
79 }
80
81 v = qapi_dealloc_visitor_new();
82 visit_type_TPMEmulatorOptions(v, NULL, &obj, NULL);
83 visit_free(v);
84}
85
86const QEnumLookup TpmTypeOptionsKind_lookup = {
87 .array = (const char *const[]) {
88 [TPM_TYPE_OPTIONS_KIND_PASSTHROUGH] = "passthrough",
89 [TPM_TYPE_OPTIONS_KIND_EMULATOR] = "emulator",
90 },
91 .size = TPM_TYPE_OPTIONS_KIND__MAX
92};
93
94void qapi_free_TpmTypeOptions(TpmTypeOptions *obj)
95{
96 Visitor *v;
97
98 if (!obj) {
99 return;
100 }
101
102 v = qapi_dealloc_visitor_new();
103 visit_type_TpmTypeOptions(v, NULL, &obj, NULL);
104 visit_free(v);
105}
106
107void qapi_free_TPMInfo(TPMInfo *obj)
108{
109 Visitor *v;
110
111 if (!obj) {
112 return;
113 }
114
115 v = qapi_dealloc_visitor_new();
116 visit_type_TPMInfo(v, NULL, &obj, NULL);
117 visit_free(v);
118}
119
120void qapi_free_TPMInfoList(TPMInfoList *obj)
121{
122 Visitor *v;
123
124 if (!obj) {
125 return;
126 }
127
128 v = qapi_dealloc_visitor_new();
129 visit_type_TPMInfoList(v, NULL, &obj, NULL);
130 visit_free(v);
131}
132
133/* Dummy declaration to prevent empty .o file */
134char qapi_dummy_qapi_types_tpm_c;
135