qmp: Replace monitor_json_emitter{,raw}() by qmp_{queue,send}_response()
authorMarkus Armbruster <armbru@redhat.com>
Tue, 3 Jul 2018 08:53:50 +0000 (10:53 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 3 Jul 2018 21:18:56 +0000 (23:18 +0200)
commit65e3fe6743af08bd0bc79b3d6158e91d572afc57
tree6f448aa5f3877f257a64849ddb1b78de7604d028
parentd43b16945afa8457b03aee543a110c4ff0b7f070
qmp: Replace monitor_json_emitter{,raw}() by qmp_{queue,send}_response()

monitor_json_emitter() and monitor_json_emitter_raw() are
unnecessarily general: they can send arbitrary JSON values, even
though we only ever use them for QMP, which may send only JSON
objects.

Specialize the argument from QObject * to QDict *, and rename to
qmp_queue_response(), qmp_send_response().

All callers but one lose an upcast.  The lone exception gains a
downcast; the next commit will get rid of it.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180703085358.13941-25-armbru@redhat.com>
monitor.c