[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 22/36] docs: move D-Bus VMState documentation to source XML
From: |
marcandre . lureau |
Subject: |
[PULL v2 22/36] docs: move D-Bus VMState documentation to source XML |
Date: |
Tue, 21 Dec 2021 10:58:41 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Use the source XML document as single reference, importing its
documentation via the dbus-doc directive.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
---
docs/interop/dbus-vmstate.rst | 52 ++++++-----------------------------
backends/dbus-vmstate1.xml | 42 +++++++++++++++++++++++++++-
2 files changed, 49 insertions(+), 45 deletions(-)
diff --git a/docs/interop/dbus-vmstate.rst b/docs/interop/dbus-vmstate.rst
index 1d719c1c604f..5fb3f279e280 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
-=========
-
-On object path ``/org/qemu/VMState1``, the following
-``org.qemu.VMState1`` interface should be implemented:
-
-.. code:: xml
-
- <interface name="org.qemu.VMState1">
- <property name="Id" type="s" access="read"/>
- <method name="Load">
- <arg type="ay" name="data" direction="in"/>
- </method>
- <method name="Save">
- <arg type="ay" name="data" direction="out"/>
- </method>
- </interface>
-
-"Id" property
--------------
-
-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.
+.. only:: sphinx4
-The helper may be initially started in a waiting state (with
-an --incoming argument for example), and it may resume on success.
+ .. dbus-doc:: backends/dbus-vmstate1.xml
-An error may be returned to the caller.
+.. only:: not sphinx4
-Save(out u8[] bytes) method
----------------------------
+ .. warning::
+ Sphinx 4 is required to build D-Bus documentation.
-The method called on the source to get the current state to be
-migrated. The helper should continue to run normally.
+ This is the content of ``backends/dbus-vmstate1.xml``:
-An error may be returned to the caller.
+ .. literalinclude:: ../../backends/dbus-vmstate1.xml
+ :language: xml
diff --git a/backends/dbus-vmstate1.xml b/backends/dbus-vmstate1.xml
index cc8563be4c92..601ee8dc7e4d 100644
--- a/backends/dbus-vmstate1.xml
+++ b/backends/dbus-vmstate1.xml
@@ -1,10 +1,50 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="utf-8"?>
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
+ <!--
+ org.qemu.VMState1:
+
+ This interface must be implemented at the object path
+ ``/org/qemu/VMState1`` to support helper migration.
+ -->
<interface name="org.qemu.VMState1">
+
+ <!--
+ Id:
+
+ A string that identifies the helper uniquely. (maximum 256 bytes
+ including terminating NUL byte)
+
+ .. note::
+
+ The VMState helper ID namespace is its own namespace. In particular,
+ it is not related to QEMU "id" used in -object/-device objects.
+ -->
<property name="Id" type="s" access="read"/>
+
+ <!--
+ Load:
+ @data: data to restore the state.
+
+ 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.
+ -->
<method name="Load">
<arg type="ay" name="data" direction="in"/>
</method>
+
+ <!--
+ Save:
+ @data: state data to save for later resume.
+
+ 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.
+ -->
<method name="Save">
<arg type="ay" name="data" direction="out"/>
</method>
--
2.34.1.8.g35151cf07204
- [PULL v2 12/36] ui: make gl_block use a counter, (continued)
- [PULL v2 12/36] ui: make gl_block use a counter, marcandre . lureau, 2021/12/21
- [PULL v2 13/36] ui: add a gl-unblock warning timer, marcandre . lureau, 2021/12/21
- [PULL v2 14/36] ui: simplify gl unblock & flush, marcandre . lureau, 2021/12/21
- [PULL v2 15/36] ui: dispatch GL events to all listeners, marcandre . lureau, 2021/12/21
- [PULL v2 16/36] ui: split the GL context in a different object, marcandre . lureau, 2021/12/21
- [PULL v2 17/36] ui: move qemu_spice_fill_device_address to ui/util.c, marcandre . lureau, 2021/12/21
- [PULL v2 18/36] console: save current scanout details, marcandre . lureau, 2021/12/21
- [PULL v2 19/36] scripts: teach modinfo to skip non-C sources, marcandre . lureau, 2021/12/21
- [PULL v2 20/36] docs/sphinx: add sphinx modules to include D-Bus documentation, marcandre . lureau, 2021/12/21
- [PULL v2 21/36] backends: move dbus-vmstate1.xml to backends/, marcandre . lureau, 2021/12/21
- [PULL v2 22/36] docs: move D-Bus VMState documentation to source XML,
marcandre . lureau <=
- [PULL v2 23/36] docs: add dbus-display documentation, marcandre . lureau, 2021/12/21
- [PULL v2 24/36] build-sys: set glib dependency version, marcandre . lureau, 2021/12/21
- [PULL v2 25/36] ui: add a D-Bus display backend, marcandre . lureau, 2021/12/21
- [PULL v2 26/36] ui/dbus: add p2p=on/off option, marcandre . lureau, 2021/12/21
- [PULL v2 27/36] tests/qtests: add qtest_qmp_add_client(), marcandre . lureau, 2021/12/21
- [PULL v2 28/36] tests: start dbus-display-test, marcandre . lureau, 2021/12/21
- [PULL v2 29/36] audio: add "dbus" audio backend, marcandre . lureau, 2021/12/21
- [PULL v2 30/36] ui/dbus: add clipboard interface, marcandre . lureau, 2021/12/21
- [PULL v2 31/36] chardev: teach socket to accept no addresses, marcandre . lureau, 2021/12/21
- [PULL v2 32/36] chardev: make socket derivable, marcandre . lureau, 2021/12/21