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 QAPI_TYPES_TPM_H
14#define QAPI_TYPES_TPM_H
15
16#include "qapi/qapi-builtin-types.h"
17
18typedef enum TpmModel {
19 TPM_MODEL_TPM_TIS,
20 TPM_MODEL_TPM_CRB,
21 TPM_MODEL__MAX,
22} TpmModel;
23
24#define TpmModel_str(val) \
25 qapi_enum_lookup(&TpmModel_lookup, (val))
26
27extern const QEnumLookup TpmModel_lookup;
28
29typedef struct TpmModelList TpmModelList;
30
31typedef enum TpmType {
32 TPM_TYPE_PASSTHROUGH,
33 TPM_TYPE_EMULATOR,
34 TPM_TYPE__MAX,
35} TpmType;
36
37#define TpmType_str(val) \
38 qapi_enum_lookup(&TpmType_lookup, (val))
39
40extern const QEnumLookup TpmType_lookup;
41
42typedef struct TpmTypeList TpmTypeList;
43
44typedef struct TPMPassthroughOptions TPMPassthroughOptions;
45
46typedef struct TPMEmulatorOptions TPMEmulatorOptions;
47
48typedef struct q_obj_TPMPassthroughOptions_wrapper q_obj_TPMPassthroughOptions_wrapper;
49
50typedef struct q_obj_TPMEmulatorOptions_wrapper q_obj_TPMEmulatorOptions_wrapper;
51
52typedef enum TpmTypeOptionsKind {
53 TPM_TYPE_OPTIONS_KIND_PASSTHROUGH,
54 TPM_TYPE_OPTIONS_KIND_EMULATOR,
55 TPM_TYPE_OPTIONS_KIND__MAX,
56} TpmTypeOptionsKind;
57
58#define TpmTypeOptionsKind_str(val) \
59 qapi_enum_lookup(&TpmTypeOptionsKind_lookup, (val))
60
61extern const QEnumLookup TpmTypeOptionsKind_lookup;
62
63typedef struct TpmTypeOptions TpmTypeOptions;
64
65typedef struct TPMInfo TPMInfo;
66
67typedef struct TPMInfoList TPMInfoList;
68
69struct TpmModelList {
70 TpmModelList *next;
71 TpmModel value;
72};
73
74void qapi_free_TpmModelList(TpmModelList *obj);
75
76struct TpmTypeList {
77 TpmTypeList *next;
78 TpmType value;
79};
80
81void qapi_free_TpmTypeList(TpmTypeList *obj);
82
83struct TPMPassthroughOptions {
84 bool has_path;
85 char *path;
86 bool has_cancel_path;
87 char *cancel_path;
88};
89
90void qapi_free_TPMPassthroughOptions(TPMPassthroughOptions *obj);
91
92struct TPMEmulatorOptions {
93 char *chardev;
94};
95
96void qapi_free_TPMEmulatorOptions(TPMEmulatorOptions *obj);
97
98struct q_obj_TPMPassthroughOptions_wrapper {
99 TPMPassthroughOptions *data;
100};
101
102struct q_obj_TPMEmulatorOptions_wrapper {
103 TPMEmulatorOptions *data;
104};
105
106struct TpmTypeOptions {
107 TpmTypeOptionsKind type;
108 union { /* union tag is @type */
109 q_obj_TPMPassthroughOptions_wrapper passthrough;
110 q_obj_TPMEmulatorOptions_wrapper emulator;
111 } u;
112};
113
114void qapi_free_TpmTypeOptions(TpmTypeOptions *obj);
115
116struct TPMInfo {
117 char *id;
118 TpmModel model;
119 TpmTypeOptions *options;
120};
121
122void qapi_free_TPMInfo(TPMInfo *obj);
123
124struct TPMInfoList {
125 TPMInfoList *next;
126 TPMInfo *value;
127};
128
129void qapi_free_TPMInfoList(TPMInfoList *obj);
130
131#endif /* QAPI_TYPES_TPM_H */
132