gdbus-codegen: Improve documentation

Recent changes has extended the functionality of `gdbus-codegen`
by implementing new options.

This patch extends the documentation including the behaviour of
the new options along the old ones.

(Wording tweaked by Philip Withnall before pushing.)

https://bugzilla.gnome.org/show_bug.cgi?id=791015
This commit is contained in:
Iñigo Martínez 2018-01-27 13:13:39 +01:00 committed by Philip Withnall
parent 93042e0052
commit 3ef83618d9

View File

@ -67,9 +67,9 @@
url="http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format">D-Bus
Introspection XML</ulink> from files passed as additional
arguments on the command line and generates output files.
It currently supports generating C code (via
<option>--generate-c-code</option>) and Docbook XML (via
<option>--generate-docbook</option>).
It currently supports generating C source code (via
<option>--body</option>) or header (via <option>--header</option>)
and Docbook XML (via <option>--generate-docbook</option>).
</para>
</refsect1>
@ -88,6 +88,20 @@
#GDBusConnection either directly or via a
#GDBusObjectManagerServer instance.
</para>
<para>
For C code generation either <option>--body</option> that
generates source code, or <option>--header</option> that
generates headers, can be used. These options must be used along with
<option>--output</option>, which is used to specify the file to output to.
</para>
<para>
Both files can be generated at the same time by using
<option>--generate-c-code</option>, but this option is deprecated.
In this case <option>--output</option> cannot be used due to the
generation of multiple files. Instead pass
<option>--output-directory</option> to specify the directory to put
the output files in. By default the current directory will be used.
</para>
<para>
The name of each generated C type is derived from the D-Bus
interface name stripped with the prefix given with
@ -188,6 +202,11 @@
<literal>NAME</literal> is a place-holder for the interface
name, e.g. <literal>net.Corp.FooBar</literal> and so on.
</para>
<para>
Pass <option>--output-directory</option> to specify the directory
to put the output files in. By default the current directory
will be used.
</para>
</listitem>
</varlistentry>
@ -262,6 +281,11 @@
<para>
Directory to output generated source to. Equivalent to changing directory before generation.
</para>
<para>
This option cannot be used with neither <option>--body</option> nor
<option>--header</option>, and <option>--output</option> must be used.
</para>
</listitem>
</varlistentry>