From cff8b2c6fcdc9492d1141da11f55615843fa0a5e Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 20 Dec 2013 23:21:10 +0100 Subject: monitor: add object-add (QMP) and object_add (HMP) command Add two commands that are the monitor counterparts of -object. The commands have the same Visitor-based implementation, but use different kinds of visitors so that the HMP command has a DWIM string-based syntax, while the QMP variant accepts a stricter JSON-based properties dictionary. Signed-off-by: Paolo Bonzini Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Luiz Capitulino --- include/monitor/monitor.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/monitor') diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h index 10fa0e390c..22d8b8f3e0 100644 --- a/include/monitor/monitor.h +++ b/include/monitor/monitor.h @@ -93,6 +93,9 @@ int monitor_read_password(Monitor *mon, ReadLineFunc *readline_func, int qmp_qom_set(Monitor *mon, const QDict *qdict, QObject **ret); int qmp_qom_get(Monitor *mon, const QDict *qdict, QObject **ret); +int qmp_object_add(Monitor *mon, const QDict *qdict, QObject **ret); +void object_add(const char *type, const char *id, const QDict *qdict, + Visitor *v, Error **errp); AddfdInfo *monitor_fdset_add_fd(int fd, bool has_fdset_id, int64_t fdset_id, bool has_opaque, const char *opaque, -- cgit v1.2.3