qmp-commands.h revision 910aea96b67d7f0357f586c47f20848ec435aa1b
4 * schema-defined QAPI function prototypes
5 *
6 * Copyright IBM, Corp. 2011
7 *
8 * Authors:
9 *  Anthony Liguori   <aliguori@us.ibm.com>
10 *
11 * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
12 * See the COPYING.LIB file in the top-level directory.
13 *
14 */
16#ifndef QMP_COMMANDS_H
17#define QMP_COMMANDS_H
19#include "qapi-types.h"
20#include "qapi/qmp/qdict.h"
21#include "qapi/error.h"
23void qmp_add_client(const char * protocol, const char * fdname, bool has_skipauth, bool skipauth, bool has_tls, bool tls, Error **errp);
24int qmp_marshal_input_add_client(Monitor *mon, const QDict *qdict, QObject **ret);
25NameInfo * qmp_query_name(Error **errp);
26int qmp_marshal_input_query_name(Monitor *mon, const QDict *qdict, QObject **ret);
27VersionInfo * qmp_query_version(Error **errp);
28int qmp_marshal_input_query_version(Monitor *mon, const QDict *qdict, QObject **ret);
29KvmInfo * qmp_query_kvm(Error **errp);
30int qmp_marshal_input_query_kvm(Monitor *mon, const QDict *qdict, QObject **ret);
31StatusInfo * qmp_query_status(Error **errp);
32int qmp_marshal_input_query_status(Monitor *mon, const QDict *qdict, QObject **ret);
33UuidInfo * qmp_query_uuid(Error **errp);
34int qmp_marshal_input_query_uuid(Monitor *mon, const QDict *qdict, QObject **ret);
35ChardevInfoList * qmp_query_chardev(Error **errp);
36int qmp_marshal_input_query_chardev(Monitor *mon, const QDict *qdict, QObject **ret);
37void qmp_ringbuf_write(const char * device, const char * data, bool has_format, DataFormat format, Error **errp);
38int qmp_marshal_input_ringbuf_write(Monitor *mon, const QDict *qdict, QObject **ret);
39char * qmp_ringbuf_read(const char * device, int64_t size, bool has_format, DataFormat format, Error **errp);
40int qmp_marshal_input_ringbuf_read(Monitor *mon, const QDict *qdict, QObject **ret);
41CommandInfoList * qmp_query_commands(Error **errp);
42int qmp_marshal_input_query_commands(Monitor *mon, const QDict *qdict, QObject **ret);
43EventInfoList * qmp_query_events(Error **errp);
44int qmp_marshal_input_query_events(Monitor *mon, const QDict *qdict, QObject **ret);
45MigrationInfo * qmp_query_migrate(Error **errp);
46int qmp_marshal_input_query_migrate(Monitor *mon, const QDict *qdict, QObject **ret);
47void qmp_migrate_set_capabilities(MigrationCapabilityStatusList * capabilities, Error **errp);
48int qmp_marshal_input_migrate_set_capabilities(Monitor *mon, const QDict *qdict, QObject **ret);
49MigrationCapabilityStatusList * qmp_query_migrate_capabilities(Error **errp);
50int qmp_marshal_input_query_migrate_capabilities(Monitor *mon, const QDict *qdict, QObject **ret);
51MouseInfoList * qmp_query_mice(Error **errp);
52int qmp_marshal_input_query_mice(Monitor *mon, const QDict *qdict, QObject **ret);
53CpuInfoList * qmp_query_cpus(Error **errp);
54int qmp_marshal_input_query_cpus(Monitor *mon, const QDict *qdict, QObject **ret);
55BlockInfoList * qmp_query_block(Error **errp);
56int qmp_marshal_input_query_block(Monitor *mon, const QDict *qdict, QObject **ret);
57BlockStatsList * qmp_query_blockstats(Error **errp);
58int qmp_marshal_input_query_blockstats(Monitor *mon, const QDict *qdict, QObject **ret);
59VncInfo * qmp_query_vnc(Error **errp);
60int qmp_marshal_input_query_vnc(Monitor *mon, const QDict *qdict, QObject **ret);
61SpiceInfo * qmp_query_spice(Error **errp);
62int qmp_marshal_input_query_spice(Monitor *mon, const QDict *qdict, QObject **ret);
63BalloonInfo * qmp_query_balloon(Error **errp);
64int qmp_marshal_input_query_balloon(Monitor *mon, const QDict *qdict, QObject **ret);
65PciInfoList * qmp_query_pci(Error **errp);
66int qmp_marshal_input_query_pci(Monitor *mon, const QDict *qdict, QObject **ret);
67BlockJobInfoList * qmp_query_block_jobs(Error **errp);
68int qmp_marshal_input_query_block_jobs(Monitor *mon, const QDict *qdict, QObject **ret);
69void qmp_quit(Error **errp);
70int qmp_marshal_input_quit(Monitor *mon, const QDict *qdict, QObject **ret);
71void qmp_stop(Error **errp);
72int qmp_marshal_input_stop(Monitor *mon, const QDict *qdict, QObject **ret);
73void qmp_system_reset(Error **errp);
74int qmp_marshal_input_system_reset(Monitor *mon, const QDict *qdict, QObject **ret);
75void qmp_system_powerdown(Error **errp);
76int qmp_marshal_input_system_powerdown(Monitor *mon, const QDict *qdict, QObject **ret);
77void qmp_cpu(int64_t index, Error **errp);
78int qmp_marshal_input_cpu(Monitor *mon, const QDict *qdict, QObject **ret);
79void qmp_cpu_add(int64_t id, Error **errp);
80int qmp_marshal_input_cpu_add(Monitor *mon, const QDict *qdict, QObject **ret);
81void qmp_memsave(int64_t val, int64_t size, const char * filename, bool has_cpu_index, int64_t cpu_index, Error **errp);
82int qmp_marshal_input_memsave(Monitor *mon, const QDict *qdict, QObject **ret);
83void qmp_pmemsave(int64_t val, int64_t size, const char * filename, Error **errp);
84int qmp_marshal_input_pmemsave(Monitor *mon, const QDict *qdict, QObject **ret);
85void qmp_cont(Error **errp);
86int qmp_marshal_input_cont(Monitor *mon, const QDict *qdict, QObject **ret);
87void qmp_system_wakeup(Error **errp);
88int qmp_marshal_input_system_wakeup(Monitor *mon, const QDict *qdict, QObject **ret);
89void qmp_inject_nmi(Error **errp);
90int qmp_marshal_input_inject_nmi(Monitor *mon, const QDict *qdict, QObject **ret);
91void qmp_set_link(const char * name, bool up, Error **errp);
92int qmp_marshal_input_set_link(Monitor *mon, const QDict *qdict, QObject **ret);
93void qmp_block_passwd(const char * device, const char * password, Error **errp);
94int qmp_marshal_input_block_passwd(Monitor *mon, const QDict *qdict, QObject **ret);
95void qmp_balloon(int64_t value, Error **errp);
96int qmp_marshal_input_balloon(Monitor *mon, const QDict *qdict, QObject **ret);
97void qmp_block_resize(const char * device, int64_t size, Error **errp);
98int qmp_marshal_input_block_resize(Monitor *mon, const QDict *qdict, QObject **ret);
99void qmp_transaction(TransactionActionList * actions, Error **errp);
100int qmp_marshal_input_transaction(Monitor *mon, const QDict *qdict, QObject **ret);
101void qmp_blockdev_snapshot_sync(const char * device, const char * snapshot_file, bool has_format, const char * format, bool has_mode, NewImageMode mode, Error **errp);
102int qmp_marshal_input_blockdev_snapshot_sync(Monitor *mon, const QDict *qdict, QObject **ret);
103void qmp_blockdev_snapshot_internal_sync(const char * device, const char * name, Error **errp);
104int qmp_marshal_input_blockdev_snapshot_internal_sync(Monitor *mon, const QDict *qdict, QObject **ret);
105SnapshotInfo * qmp_blockdev_snapshot_delete_internal_sync(const char * device, bool has_id, const char * id, bool has_name, const char * name, Error **errp);
106int qmp_marshal_input_blockdev_snapshot_delete_internal_sync(Monitor *mon, const QDict *qdict, QObject **ret);
107char * qmp_human_monitor_command(const char * command_line, bool has_cpu_index, int64_t cpu_index, Error **errp);
108int qmp_marshal_input_human_monitor_command(Monitor *mon, const QDict *qdict, QObject **ret);
109void qmp_block_commit(const char * device, bool has_base, const char * base, const char * top, bool has_speed, int64_t speed, Error **errp);
110int qmp_marshal_input_block_commit(Monitor *mon, const QDict *qdict, QObject **ret);
111void qmp_drive_backup(const char * device, const char * target, bool has_format, const char * format, MirrorSyncMode sync, bool has_mode, NewImageMode mode, bool has_speed, int64_t speed, bool has_on_source_error, BlockdevOnError on_source_error, bool has_on_target_error, BlockdevOnError on_target_error, Error **errp);
112int qmp_marshal_input_drive_backup(Monitor *mon, const QDict *qdict, QObject **ret);
113void qmp_drive_mirror(const char * device, const char * target, bool has_format, const char * format, MirrorSyncMode sync, bool has_mode, NewImageMode mode, bool has_speed, int64_t speed, bool has_granularity, uint32_t granularity, bool has_buf_size, int64_t buf_size, bool has_on_source_error, BlockdevOnError on_source_error, bool has_on_target_error, BlockdevOnError on_target_error, Error **errp);
114int qmp_marshal_input_drive_mirror(Monitor *mon, const QDict *qdict, QObject **ret);
115void qmp_migrate_cancel(Error **errp);
116int qmp_marshal_input_migrate_cancel(Monitor *mon, const QDict *qdict, QObject **ret);
117void qmp_migrate_set_downtime(double value, Error **errp);
118int qmp_marshal_input_migrate_set_downtime(Monitor *mon, const QDict *qdict, QObject **ret);
119void qmp_migrate_set_speed(int64_t value, Error **errp);
120int qmp_marshal_input_migrate_set_speed(Monitor *mon, const QDict *qdict, QObject **ret);
121void qmp_migrate_set_cache_size(int64_t value, Error **errp);
122int qmp_marshal_input_migrate_set_cache_size(Monitor *mon, const QDict *qdict, QObject **ret);
123int64_t qmp_query_migrate_cache_size(Error **errp);
124int qmp_marshal_input_query_migrate_cache_size(Monitor *mon, const QDict *qdict, QObject **ret);
125ObjectPropertyInfoList * qmp_qom_list(const char * path, Error **errp);
126int qmp_marshal_input_qom_list(Monitor *mon, const QDict *qdict, QObject **ret);
127void qmp_set_password(const char * protocol, const char * password, bool has_connected, const char * connected, Error **errp);
128int qmp_marshal_input_set_password(Monitor *mon, const QDict *qdict, QObject **ret);
129void qmp_expire_password(const char * protocol, const char * time, Error **errp);
130int qmp_marshal_input_expire_password(Monitor *mon, const QDict *qdict, QObject **ret);
131void qmp_eject(const char * device, bool has_force, bool force, Error **errp);
132int qmp_marshal_input_eject(Monitor *mon, const QDict *qdict, QObject **ret);
133void qmp_change_vnc_password(const char * password, Error **errp);
134int qmp_marshal_input_change_vnc_password(Monitor *mon, const QDict *qdict, QObject **ret);
135void qmp_change(const char * device, const char * target, bool has_arg, const char * arg, Error **errp);
136int qmp_marshal_input_change(Monitor *mon, const QDict *qdict, QObject **ret);
137void qmp_block_set_io_throttle(const char * device, int64_t bps, int64_t bps_rd, int64_t bps_wr, int64_t iops, int64_t iops_rd, int64_t iops_wr, bool has_bps_max, int64_t bps_max, bool has_bps_rd_max, int64_t bps_rd_max, bool has_bps_wr_max, int64_t bps_wr_max, bool has_iops_max, int64_t iops_max, bool has_iops_rd_max, int64_t iops_rd_max, bool has_iops_wr_max, int64_t iops_wr_max, bool has_iops_size, int64_t iops_size, Error **errp);
138int qmp_marshal_input_block_set_io_throttle(Monitor *mon, const QDict *qdict, QObject **ret);
139void qmp_block_stream(const char * device, bool has_base, const char * base, bool has_speed, int64_t speed, bool has_on_error, BlockdevOnError on_error, Error **errp);
140int qmp_marshal_input_block_stream(Monitor *mon, const QDict *qdict, QObject **ret);
141void qmp_block_job_set_speed(const char * device, int64_t speed, Error **errp);
142int qmp_marshal_input_block_job_set_speed(Monitor *mon, const QDict *qdict, QObject **ret);
143void qmp_block_job_cancel(const char * device, bool has_force, bool force, Error **errp);
144int qmp_marshal_input_block_job_cancel(Monitor *mon, const QDict *qdict, QObject **ret);
145void qmp_block_job_pause(const char * device, Error **errp);
146int qmp_marshal_input_block_job_pause(Monitor *mon, const QDict *qdict, QObject **ret);
147void qmp_block_job_resume(const char * device, Error **errp);
148int qmp_marshal_input_block_job_resume(Monitor *mon, const QDict *qdict, QObject **ret);
149void qmp_block_job_complete(const char * device, Error **errp);
150int qmp_marshal_input_block_job_complete(Monitor *mon, const QDict *qdict, QObject **ret);
151ObjectTypeInfoList * qmp_qom_list_types(bool has_implements, const char * implements, bool has_abstract, bool abstract, Error **errp);
152int qmp_marshal_input_qom_list_types(Monitor *mon, const QDict *qdict, QObject **ret);
153DevicePropertyInfoList * qmp_device_list_properties(const char * q_typename, Error **errp);
154int qmp_marshal_input_device_list_properties(Monitor *mon, const QDict *qdict, QObject **ret);
155void qmp_migrate(const char * uri, bool has_blk, bool blk, bool has_inc, bool inc, bool has_detach, bool detach, Error **errp);
156int qmp_marshal_input_migrate(Monitor *mon, const QDict *qdict, QObject **ret);
157void qmp_xen_save_devices_state(const char * filename, Error **errp);
158int qmp_marshal_input_xen_save_devices_state(Monitor *mon, const QDict *qdict, QObject **ret);
159void qmp_xen_set_global_dirty_log(bool enable, Error **errp);
160int qmp_marshal_input_xen_set_global_dirty_log(Monitor *mon, const QDict *qdict, QObject **ret);
161void qmp_device_del(const char * id, Error **errp);
162int qmp_marshal_input_device_del(Monitor *mon, const QDict *qdict, QObject **ret);
163void qmp_dump_guest_memory(bool paging, const char * protocol, bool has_begin, int64_t begin, bool has_length, int64_t length, Error **errp);
164int qmp_marshal_input_dump_guest_memory(Monitor *mon, const QDict *qdict, QObject **ret);
165void qmp_netdev_del(const char * id, Error **errp);
166int qmp_marshal_input_netdev_del(Monitor *mon, const QDict *qdict, QObject **ret);
167void qmp_getfd(const char * fdname, Error **errp);
168int qmp_marshal_input_getfd(Monitor *mon, const QDict *qdict, QObject **ret);
169void qmp_closefd(const char * fdname, Error **errp);
170int qmp_marshal_input_closefd(Monitor *mon, const QDict *qdict, QObject **ret);
171MachineInfoList * qmp_query_machines(Error **errp);
172int qmp_marshal_input_query_machines(Monitor *mon, const QDict *qdict, QObject **ret);
173CpuDefinitionInfoList * qmp_query_cpu_definitions(Error **errp);
174int qmp_marshal_input_query_cpu_definitions(Monitor *mon, const QDict *qdict, QObject **ret);
175AddfdInfo * qmp_add_fd(bool has_fdset_id, int64_t fdset_id, bool has_opaque, const char * opaque, Error **errp);
176int qmp_marshal_input_add_fd(Monitor *mon, const QDict *qdict, QObject **ret);
177void qmp_remove_fd(int64_t fdset_id, bool has_fd, int64_t fd, Error **errp);
178int qmp_marshal_input_remove_fd(Monitor *mon, const QDict *qdict, QObject **ret);
179FdsetInfoList * qmp_query_fdsets(Error **errp);
180int qmp_marshal_input_query_fdsets(Monitor *mon, const QDict *qdict, QObject **ret);
181TargetInfo * qmp_query_target(Error **errp);
182int qmp_marshal_input_query_target(Monitor *mon, const QDict *qdict, QObject **ret);
183void qmp_send_key(KeyValueList * keys, bool has_hold_time, int64_t hold_time, Error **errp);
184int qmp_marshal_input_send_key(Monitor *mon, const QDict *qdict, QObject **ret);
185void qmp_screendump(const char * filename, Error **errp);
186int qmp_marshal_input_screendump(Monitor *mon, const QDict *qdict, QObject **ret);
187void qmp_nbd_server_start(SocketAddress * addr, Error **errp);
188int qmp_marshal_input_nbd_server_start(Monitor *mon, const QDict *qdict, QObject **ret);
189void qmp_nbd_server_add(const char * device, bool has_writable, bool writable, Error **errp);
190int qmp_marshal_input_nbd_server_add(Monitor *mon, const QDict *qdict, QObject **ret);
191void qmp_nbd_server_stop(Error **errp);
192int qmp_marshal_input_nbd_server_stop(Monitor *mon, const QDict *qdict, QObject **ret);
193ChardevReturn * qmp_chardev_add(const char * id, ChardevBackend * backend, Error **errp);
194int qmp_marshal_input_chardev_add(Monitor *mon, const QDict *qdict, QObject **ret);
195void qmp_chardev_remove(const char * id, Error **errp);
196int qmp_marshal_input_chardev_remove(Monitor *mon, const QDict *qdict, QObject **ret);
197TpmModelList * qmp_query_tpm_models(Error **errp);
198int qmp_marshal_input_query_tpm_models(Monitor *mon, const QDict *qdict, QObject **ret);
199TpmTypeList * qmp_query_tpm_types(Error **errp);
200int qmp_marshal_input_query_tpm_types(Monitor *mon, const QDict *qdict, QObject **ret);
201TPMInfoList * qmp_query_tpm(Error **errp);
202int qmp_marshal_input_query_tpm(Monitor *mon, const QDict *qdict, QObject **ret);
203CommandLineOptionInfoList * qmp_query_command_line_options(bool has_option, const char * option, Error **errp);
204int qmp_marshal_input_query_command_line_options(Monitor *mon, const QDict *qdict, QObject **ret);
205RxFilterInfoList * qmp_query_rx_filter(bool has_name, const char * name, Error **errp);
206int qmp_marshal_input_query_rx_filter(Monitor *mon, const QDict *qdict, QObject **ret);
207void qmp_blockdev_add(BlockdevOptions * options, Error **errp);
208int qmp_marshal_input_blockdev_add(Monitor *mon, const QDict *qdict, QObject **ret);