Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 1 | object q_empty |
| 2 | enum QType ['none', 'qnull', 'qnum', 'qstring', 'qdict', 'qlist', 'qbool'] |
| 3 | prefix QTYPE |
Markus Armbruster | cf40a0a | 2018-02-11 10:35:55 +0100 | [diff] [blame] | 4 | module qapi-schema-test.json |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 5 | object TestStruct |
| 6 | member integer: int optional=False |
| 7 | member boolean: bool optional=False |
| 8 | member string: str optional=False |
| 9 | object NestedEnumsOne |
| 10 | member enum1: EnumOne optional=False |
| 11 | member enum2: EnumOne optional=True |
| 12 | member enum3: EnumOne optional=False |
| 13 | member enum4: EnumOne optional=True |
| 14 | enum MyEnum [] |
| 15 | object Empty1 |
| 16 | object Empty2 |
| 17 | base Empty1 |
| 18 | command user_def_cmd0 Empty2 -> Empty2 |
Igor Mammedov | 7b13f2c | 2018-05-11 19:15:59 +0200 | [diff] [blame] | 19 | gen=True success_response=True boxed=False oob=False preconfig=False |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 20 | enum QEnumTwo ['value1', 'value2'] |
| 21 | prefix QENUM_TWO |
| 22 | object UserDefOne |
| 23 | base UserDefZero |
| 24 | member string: str optional=False |
| 25 | member enum1: EnumOne optional=True |
Anton Nefedov | 800877b | 2018-06-18 11:40:05 +0300 | [diff] [blame] | 26 | enum EnumOne ['value1', 'value2', 'value3', 'value4'] |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 27 | object UserDefZero |
| 28 | member integer: int optional=False |
| 29 | object UserDefTwoDictDict |
| 30 | member userdef: UserDefOne optional=False |
| 31 | member string: str optional=False |
| 32 | object UserDefTwoDict |
| 33 | member string1: str optional=False |
| 34 | member dict2: UserDefTwoDictDict optional=False |
| 35 | member dict3: UserDefTwoDictDict optional=True |
| 36 | object UserDefTwo |
| 37 | member string0: str optional=False |
| 38 | member dict1: UserDefTwoDict optional=False |
Marc-André Lureau | 967c885 | 2018-07-03 17:56:35 +0200 | [diff] [blame] | 39 | object UserDefThree |
| 40 | member string0: str optional=False |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 41 | object ForceArrays |
| 42 | member unused1: UserDefOneList optional=False |
| 43 | member unused2: UserDefTwoList optional=False |
| 44 | member unused3: TestStructList optional=False |
| 45 | object UserDefA |
| 46 | member boolean: bool optional=False |
| 47 | member a_b: int optional=True |
| 48 | object UserDefB |
| 49 | member intb: int optional=False |
| 50 | member a-b: bool optional=True |
| 51 | object UserDefFlatUnion |
| 52 | base UserDefUnionBase |
| 53 | tag enum1 |
| 54 | case value1: UserDefA |
| 55 | case value2: UserDefB |
| 56 | case value3: UserDefB |
Anton Nefedov | 800877b | 2018-06-18 11:40:05 +0300 | [diff] [blame] | 57 | case value4: q_empty |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 58 | object UserDefUnionBase |
| 59 | base UserDefZero |
| 60 | member string: str optional=False |
| 61 | member enum1: EnumOne optional=False |
| 62 | object q_obj_UserDefFlatUnion2-base |
| 63 | member integer: int optional=True |
| 64 | member string: str optional=False |
| 65 | member enum1: QEnumTwo optional=False |
| 66 | object UserDefFlatUnion2 |
| 67 | base q_obj_UserDefFlatUnion2-base |
| 68 | tag enum1 |
| 69 | case value1: UserDefC |
| 70 | case value2: UserDefB |
| 71 | object WrapAlternate |
| 72 | member alt: UserDefAlternate optional=False |
| 73 | alternate UserDefAlternate |
| 74 | tag type |
| 75 | case udfu: UserDefFlatUnion |
| 76 | case e: EnumOne |
| 77 | case i: int |
| 78 | case n: null |
| 79 | object UserDefC |
| 80 | member string1: str optional=False |
| 81 | member string2: str optional=False |
Markus Armbruster | 8168ca8 | 2017-05-22 18:42:14 +0200 | [diff] [blame] | 82 | alternate AltEnumBool |
| 83 | tag type |
| 84 | case e: EnumOne |
| 85 | case b: bool |
Markus Armbruster | 8168ca8 | 2017-05-22 18:42:14 +0200 | [diff] [blame] | 86 | alternate AltEnumNum |
| 87 | tag type |
| 88 | case e: EnumOne |
| 89 | case n: number |
Markus Armbruster | 8168ca8 | 2017-05-22 18:42:14 +0200 | [diff] [blame] | 90 | alternate AltNumEnum |
| 91 | tag type |
| 92 | case n: number |
| 93 | case e: EnumOne |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 94 | alternate AltEnumInt |
| 95 | tag type |
| 96 | case e: EnumOne |
| 97 | case i: int |
Markus Armbruster | c064477 | 2017-05-22 18:42:15 +0200 | [diff] [blame] | 98 | alternate AltStrObj |
Eric Blake | da9cb19 | 2016-07-13 21:50:15 -0600 | [diff] [blame] | 99 | tag type |
Eric Blake | 9c51b44 | 2015-09-29 16:21:06 -0600 | [diff] [blame] | 100 | case s: str |
Markus Armbruster | c064477 | 2017-05-22 18:42:15 +0200 | [diff] [blame] | 101 | case o: TestStruct |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 102 | object q_obj_intList-wrapper |
| 103 | member data: intList optional=False |
| 104 | object q_obj_int8List-wrapper |
| 105 | member data: int8List optional=False |
| 106 | object q_obj_int16List-wrapper |
| 107 | member data: int16List optional=False |
| 108 | object q_obj_int32List-wrapper |
| 109 | member data: int32List optional=False |
| 110 | object q_obj_int64List-wrapper |
| 111 | member data: int64List optional=False |
| 112 | object q_obj_uint8List-wrapper |
| 113 | member data: uint8List optional=False |
| 114 | object q_obj_uint16List-wrapper |
| 115 | member data: uint16List optional=False |
| 116 | object q_obj_uint32List-wrapper |
| 117 | member data: uint32List optional=False |
| 118 | object q_obj_uint64List-wrapper |
| 119 | member data: uint64List optional=False |
| 120 | object q_obj_numberList-wrapper |
| 121 | member data: numberList optional=False |
| 122 | object q_obj_boolList-wrapper |
| 123 | member data: boolList optional=False |
| 124 | object q_obj_strList-wrapper |
| 125 | member data: strList optional=False |
| 126 | object q_obj_sizeList-wrapper |
| 127 | member data: sizeList optional=False |
| 128 | object q_obj_anyList-wrapper |
| 129 | member data: anyList optional=False |
| 130 | enum UserDefNativeListUnionKind ['integer', 's8', 's16', 's32', 's64', 'u8', 'u16', 'u32', 'u64', 'number', 'boolean', 'string', 'sizes', 'any'] |
Markus Armbruster | 156402e | 2015-09-16 13:06:08 +0200 | [diff] [blame] | 131 | object UserDefNativeListUnion |
Eric Blake | da34a9b | 2015-11-18 01:52:36 -0700 | [diff] [blame] | 132 | member type: UserDefNativeListUnionKind optional=False |
Eric Blake | da9cb19 | 2016-07-13 21:50:15 -0600 | [diff] [blame] | 133 | tag type |
Eric Blake | 7599697 | 2016-03-17 16:48:29 -0600 | [diff] [blame] | 134 | case integer: q_obj_intList-wrapper |
| 135 | case s8: q_obj_int8List-wrapper |
| 136 | case s16: q_obj_int16List-wrapper |
| 137 | case s32: q_obj_int32List-wrapper |
| 138 | case s64: q_obj_int64List-wrapper |
| 139 | case u8: q_obj_uint8List-wrapper |
| 140 | case u16: q_obj_uint16List-wrapper |
| 141 | case u32: q_obj_uint32List-wrapper |
| 142 | case u64: q_obj_uint64List-wrapper |
| 143 | case number: q_obj_numberList-wrapper |
| 144 | case boolean: q_obj_boolList-wrapper |
| 145 | case string: q_obj_strList-wrapper |
| 146 | case sizes: q_obj_sizeList-wrapper |
| 147 | case any: q_obj_anyList-wrapper |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 148 | command user_def_cmd None -> None |
Igor Mammedov | 7b13f2c | 2018-05-11 19:15:59 +0200 | [diff] [blame] | 149 | gen=True success_response=True boxed=False oob=False preconfig=False |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 150 | object q_obj_user_def_cmd1-arg |
| 151 | member ud1a: UserDefOne optional=False |
| 152 | command user_def_cmd1 q_obj_user_def_cmd1-arg -> None |
Igor Mammedov | 7b13f2c | 2018-05-11 19:15:59 +0200 | [diff] [blame] | 153 | gen=True success_response=True boxed=False oob=False preconfig=False |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 154 | object q_obj_user_def_cmd2-arg |
| 155 | member ud1a: UserDefOne optional=False |
| 156 | member ud1b: UserDefOne optional=True |
| 157 | command user_def_cmd2 q_obj_user_def_cmd2-arg -> UserDefTwo |
Igor Mammedov | 7b13f2c | 2018-05-11 19:15:59 +0200 | [diff] [blame] | 158 | gen=True success_response=True boxed=False oob=False preconfig=False |
Marc-André Lureau | ae6bf76 | 2018-08-30 17:58:10 +0200 | [diff] [blame] | 159 | command cmd-success-response None -> None |
| 160 | gen=True success_response=False boxed=False oob=False preconfig=False |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 161 | object q_obj_guest-get-time-arg |
| 162 | member a: int optional=False |
| 163 | member b: int optional=True |
| 164 | command guest-get-time q_obj_guest-get-time-arg -> int |
Igor Mammedov | 7b13f2c | 2018-05-11 19:15:59 +0200 | [diff] [blame] | 165 | gen=True success_response=True boxed=False oob=False preconfig=False |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 166 | object q_obj_guest-sync-arg |
| 167 | member arg: any optional=False |
| 168 | command guest-sync q_obj_guest-sync-arg -> any |
Igor Mammedov | 7b13f2c | 2018-05-11 19:15:59 +0200 | [diff] [blame] | 169 | gen=True success_response=True boxed=False oob=False preconfig=False |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 170 | command boxed-struct UserDefZero -> None |
Igor Mammedov | 7b13f2c | 2018-05-11 19:15:59 +0200 | [diff] [blame] | 171 | gen=True success_response=True boxed=True oob=False preconfig=False |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 172 | command boxed-union UserDefNativeListUnion -> None |
Igor Mammedov | 7b13f2c | 2018-05-11 19:15:59 +0200 | [diff] [blame] | 173 | gen=True success_response=True boxed=True oob=False preconfig=False |
| 174 | command test-flags-command None -> None |
| 175 | gen=True success_response=True boxed=False oob=True preconfig=True |
Markus Armbruster | 156402e | 2015-09-16 13:06:08 +0200 | [diff] [blame] | 176 | object UserDefOptions |
| 177 | member i64: intList optional=True |
| 178 | member u64: uint64List optional=True |
| 179 | member u16: uint16List optional=True |
| 180 | member i64x: int optional=True |
| 181 | member u64x: uint64 optional=True |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 182 | object EventStructOne |
| 183 | member struct1: UserDefOne optional=False |
Markus Armbruster | 156402e | 2015-09-16 13:06:08 +0200 | [diff] [blame] | 184 | member string: str optional=False |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 185 | member enum2: EnumOne optional=True |
| 186 | event EVENT_A None |
Eric Blake | 48825ca | 2016-07-13 21:50:19 -0600 | [diff] [blame] | 187 | boxed=False |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 188 | event EVENT_B None |
| 189 | boxed=False |
Eric Blake | 7599697 | 2016-03-17 16:48:29 -0600 | [diff] [blame] | 190 | object q_obj_EVENT_C-arg |
| 191 | member a: int optional=True |
| 192 | member b: UserDefOne optional=True |
| 193 | member c: str optional=False |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 194 | event EVENT_C q_obj_EVENT_C-arg |
| 195 | boxed=False |
Eric Blake | 7599697 | 2016-03-17 16:48:29 -0600 | [diff] [blame] | 196 | object q_obj_EVENT_D-arg |
| 197 | member a: EventStructOne optional=False |
| 198 | member b: str optional=False |
| 199 | member c: str optional=True |
| 200 | member enum3: EnumOne optional=True |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 201 | event EVENT_D q_obj_EVENT_D-arg |
| 202 | boxed=False |
| 203 | event EVENT_E UserDefZero |
| 204 | boxed=True |
| 205 | event EVENT_F UserDefAlternate |
| 206 | boxed=True |
| 207 | enum __org.qemu_x-Enum ['__org.qemu_x-value'] |
| 208 | object __org.qemu_x-Base |
| 209 | member __org.qemu_x-member1: __org.qemu_x-Enum optional=False |
| 210 | object __org.qemu_x-Struct |
| 211 | base __org.qemu_x-Base |
| 212 | member __org.qemu_x-member2: str optional=False |
| 213 | member wchar-t: int optional=True |
| 214 | object q_obj_str-wrapper |
| 215 | member data: str optional=False |
| 216 | enum __org.qemu_x-Union1Kind ['__org.qemu_x-branch'] |
| 217 | object __org.qemu_x-Union1 |
| 218 | member type: __org.qemu_x-Union1Kind optional=False |
| 219 | tag type |
| 220 | case __org.qemu_x-branch: q_obj_str-wrapper |
| 221 | object __org.qemu_x-Struct2 |
| 222 | member array: __org.qemu_x-Union1List optional=False |
| 223 | object __org.qemu_x-Union2 |
| 224 | base __org.qemu_x-Base |
| 225 | tag __org.qemu_x-member1 |
| 226 | case __org.qemu_x-value: __org.qemu_x-Struct2 |
| 227 | alternate __org.qemu_x-Alt |
| 228 | tag type |
| 229 | case __org.qemu_x-branch: str |
| 230 | case b: __org.qemu_x-Base |
| 231 | event __ORG.QEMU_X-EVENT __org.qemu_x-Struct |
| 232 | boxed=False |
Eric Blake | 7599697 | 2016-03-17 16:48:29 -0600 | [diff] [blame] | 233 | object q_obj___org.qemu_x-command-arg |
| 234 | member a: __org.qemu_x-EnumList optional=False |
| 235 | member b: __org.qemu_x-StructList optional=False |
| 236 | member c: __org.qemu_x-Union2 optional=False |
| 237 | member d: __org.qemu_x-Alt optional=False |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 238 | command __org.qemu_x-command q_obj___org.qemu_x-command-arg -> __org.qemu_x-Union1 |
Igor Mammedov | 7b13f2c | 2018-05-11 19:15:59 +0200 | [diff] [blame] | 239 | gen=True success_response=True boxed=False oob=False preconfig=False |
Marc-André Lureau | 967c885 | 2018-07-03 17:56:35 +0200 | [diff] [blame] | 240 | object TestIfStruct |
| 241 | member foo: int optional=False |
Marc-André Lureau | fbf09a2 | 2018-07-03 17:56:38 +0200 | [diff] [blame] | 242 | if ['defined(TEST_IF_STRUCT)'] |
Marc-André Lureau | 967c885 | 2018-07-03 17:56:35 +0200 | [diff] [blame] | 243 | enum TestIfEnum ['foo', 'bar'] |
Marc-André Lureau | fbf09a2 | 2018-07-03 17:56:38 +0200 | [diff] [blame] | 244 | if ['defined(TEST_IF_ENUM)'] |
Marc-André Lureau | 967c885 | 2018-07-03 17:56:35 +0200 | [diff] [blame] | 245 | object q_obj_TestStruct-wrapper |
| 246 | member data: TestStruct optional=False |
| 247 | enum TestIfUnionKind ['foo'] |
Marc-André Lureau | fbf09a2 | 2018-07-03 17:56:38 +0200 | [diff] [blame] | 248 | if ['defined(TEST_IF_UNION) && defined(TEST_IF_STRUCT)'] |
Marc-André Lureau | 967c885 | 2018-07-03 17:56:35 +0200 | [diff] [blame] | 249 | object TestIfUnion |
| 250 | member type: TestIfUnionKind optional=False |
| 251 | tag type |
| 252 | case foo: q_obj_TestStruct-wrapper |
Marc-André Lureau | fbf09a2 | 2018-07-03 17:56:38 +0200 | [diff] [blame] | 253 | if ['defined(TEST_IF_UNION) && defined(TEST_IF_STRUCT)'] |
Marc-André Lureau | 967c885 | 2018-07-03 17:56:35 +0200 | [diff] [blame] | 254 | alternate TestIfAlternate |
| 255 | tag type |
| 256 | case foo: int |
| 257 | case bar: TestStruct |
Marc-André Lureau | fbf09a2 | 2018-07-03 17:56:38 +0200 | [diff] [blame] | 258 | if ['defined(TEST_IF_ALT) && defined(TEST_IF_STRUCT)'] |
Marc-André Lureau | 967c885 | 2018-07-03 17:56:35 +0200 | [diff] [blame] | 259 | object q_obj_TestIfCmd-arg |
| 260 | member foo: TestIfStruct optional=False |
Marc-André Lureau | fbf09a2 | 2018-07-03 17:56:38 +0200 | [diff] [blame] | 261 | if ['defined(TEST_IF_CMD)', 'defined(TEST_IF_STRUCT)'] |
Marc-André Lureau | 967c885 | 2018-07-03 17:56:35 +0200 | [diff] [blame] | 262 | command TestIfCmd q_obj_TestIfCmd-arg -> UserDefThree |
| 263 | gen=True success_response=True boxed=False oob=False preconfig=False |
Marc-André Lureau | fbf09a2 | 2018-07-03 17:56:38 +0200 | [diff] [blame] | 264 | if ['defined(TEST_IF_CMD)', 'defined(TEST_IF_STRUCT)'] |
Marc-André Lureau | 967c885 | 2018-07-03 17:56:35 +0200 | [diff] [blame] | 265 | command TestCmdReturnDefThree None -> UserDefThree |
| 266 | gen=True success_response=True boxed=False oob=False preconfig=False |
| 267 | object q_obj_TestIfEvent-arg |
| 268 | member foo: TestIfStruct optional=False |
Marc-André Lureau | fbf09a2 | 2018-07-03 17:56:38 +0200 | [diff] [blame] | 269 | if ['defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT)'] |
Marc-André Lureau | 967c885 | 2018-07-03 17:56:35 +0200 | [diff] [blame] | 270 | event TestIfEvent q_obj_TestIfEvent-arg |
| 271 | boxed=False |
Marc-André Lureau | fbf09a2 | 2018-07-03 17:56:38 +0200 | [diff] [blame] | 272 | if ['defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT)'] |