1/* AUTOMATICALLY GENERATED, DO NOT MODIFY */
2
3/*
4 * Schema-defined QAPI/QMP commands
5 *
6 * Copyright IBM, Corp. 2011
7 * Copyright (C) 2014-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/visitor.h"
15#include "qapi/qmp/qdict.h"
16#include "qapi/qobject-output-visitor.h"
17#include "qapi/qobject-input-visitor.h"
18#include "qapi/dealloc-visitor.h"
19#include "qapi/error.h"
20#include "qapi-visit-transaction.h"
21#include "qapi-commands-transaction.h"
22
23
24void qmp_marshal_transaction(QDict *args, QObject **ret, Error **errp)
25{
26 Error *err = NULL;
27 Visitor *v;
28 q_obj_transaction_arg arg = {0};
29
30 v = qobject_input_visitor_new(QOBJECT(args));
31 visit_start_struct(v, NULL, NULL, 0, &err);
32 if (err) {
33 goto out;
34 }
35 visit_type_q_obj_transaction_arg_members(v, &arg, &err);
36 if (!err) {
37 visit_check_struct(v, &err);
38 }
39 visit_end_struct(v, NULL);
40 if (err) {
41 goto out;
42 }
43
44 qmp_transaction(arg.actions, arg.has_properties, arg.properties, &err);
45
46out:
47 error_propagate(errp, err);
48 visit_free(v);
49 v = qapi_dealloc_visitor_new();
50 visit_start_struct(v, NULL, NULL, 0, NULL);
51 visit_type_q_obj_transaction_arg_members(v, &arg, NULL);
52 visit_end_struct(v, NULL);
53 visit_free(v);
54}
55
56/* Dummy declaration to prevent empty .o file */
57char qapi_dummy_qapi_commands_transaction_c;
58