From d2f25776ca4044ce4f19a4065cc0e4d2566f32ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 6 Oct 2021 01:35:29 +0400 Subject: [PATCH] docs: move D-Bus VMState documentation to source XML MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the source XML document as single reference, importing its documentation via the dbus-doc directive. Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- backends/dbus-vmstate1.xml | 42 +++++++++++++++++++++++++++- docs/interop/dbus-vmstate.rst | 52 ++++++----------------------------- 2 files changed, 49 insertions(+), 45 deletions(-) diff --git a/backends/dbus-vmstate1.xml b/backends/dbus-vmstate1.xml index cc8563be4c..601ee8dc7e 100644 --- a/backends/dbus-vmstate1.xml +++ b/backends/dbus-vmstate1.xml @@ -1,10 +1,50 @@ - + + + + + + + + diff --git a/docs/interop/dbus-vmstate.rst b/docs/interop/dbus-vmstate.rst index 1d719c1c60..5fb3f279e2 100644 --- a/docs/interop/dbus-vmstate.rst +++ b/docs/interop/dbus-vmstate.rst @@ -2,9 +2,6 @@ D-Bus VMState ============= -Introduction -============ - The QEMU dbus-vmstate object's aim is to migrate helpers' data running on a QEMU D-Bus bus. (refer to the :doc:`dbus` document for some recommendations on D-Bus usage) @@ -26,49 +23,16 @@ dbus-vmstate object can be configured with the expected list of helpers by setting its ``id-list`` property, with a comma-separated ``Id`` list. -Interface -========= +.. only:: sphinx4 -On object path ``/org/qemu/VMState1``, the following -``org.qemu.VMState1`` interface should be implemented: + .. dbus-doc:: backends/dbus-vmstate1.xml -.. code:: xml +.. only:: not sphinx4 - - - - - - - - - + .. warning:: + Sphinx 4 is required to build D-Bus documentation. -"Id" property -------------- + This is the content of ``backends/dbus-vmstate1.xml``: -A string that identifies the helper uniquely. (maximum 256 bytes -including terminating NUL byte) - -.. note:: - - The helper ID namespace is a separate namespace. In particular, it is not - related to QEMU "id" used in -object/-device objects. - -Load(in u8[] bytes) method --------------------------- - -The method called on destination with the state to restore. - -The helper may be initially started in a waiting state (with -an --incoming argument for example), and it may resume on success. - -An error may be returned to the caller. - -Save(out u8[] bytes) method ---------------------------- - -The method called on the source to get the current state to be -migrated. The helper should continue to run normally. - -An error may be returned to the caller. + .. literalinclude:: ../../backends/dbus-vmstate1.xml + :language: xml