gdbus-codegen: Add --c-generate-object-manager option + doc improvements

Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
David Zeuthen 2011-04-12 11:50:34 -04:00
parent 8276d0e557
commit 76d3653721
8 changed files with 200 additions and 142 deletions

View File

@ -157,7 +157,9 @@ expand_content_files = \
migrating-posix.xml \ migrating-posix.xml \
migrating-gnome-vfs.xml \ migrating-gnome-vfs.xml \
migrating-gconf.xml \ migrating-gconf.xml \
migrating-gdbus.xml migrating-gdbus.xml \
gdbus-codegen.xml \
$(NULL)
extra_files = \ extra_files = \
version.xml.in \ version.xml.in \

View File

@ -8,15 +8,16 @@
<refnamediv> <refnamediv>
<refname>gdbus-codegen</refname> <refname>gdbus-codegen</refname>
<refpurpose>GLib D-Bus code generator</refpurpose> <refpurpose>GLib D-Bus code and documentation generator</refpurpose>
</refnamediv> </refnamediv>
<refsynopsisdiv> <refsynopsisdiv>
<cmdsynopsis> <cmdsynopsis>
<command>gdbus-codegen</command> <command>gdbus-codegen</command>
<arg><option>--interface-prefix</option> <replaceable>org.project.Prefix</replaceable></arg> <arg><option>--interface-prefix</option> <replaceable>org.project.Prefix</replaceable></arg>
<arg><option>--c-namespace</option> <replaceable>YourProject</replaceable></arg>
<arg><option>--generate-c-code</option> <replaceable>OUTFILES</replaceable></arg> <arg><option>--generate-c-code</option> <replaceable>OUTFILES</replaceable></arg>
<arg><option>--c-namespace</option> <replaceable>YourProject</replaceable></arg>
<arg><option>--c-generate-object-manager</option></arg>
<arg><option>--generate-docbook</option> <replaceable>OUTFILES</replaceable></arg> <arg><option>--generate-docbook</option> <replaceable>OUTFILES</replaceable></arg>
<group choice="plain" rep="repeat"> <group choice="plain" rep="repeat">
<arg> <arg>
@ -40,23 +41,39 @@
<para> <para>
<command>gdbus-codegen</command> is used to generate code and/or <command>gdbus-codegen</command> is used to generate code and/or
documentation for one or more D-Bus interfaces. The tool reads documentation for one or more D-Bus interfaces. The tool reads
D-Bus Introspection XML files and generates output files. The tool <ulink
currently supports generating C code (via url="http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format">D-Bus
Introspection XML</ulink> files and generates output files. The
tool currently supports generating C code (via
<option>--generate-c-code</option>) and Docbook XML (via <option>--generate-c-code</option>) and Docbook XML (via
<option>--generate-docbook</option>). <option>--generate-docbook</option>).
</para> </para>
</refsect1>
<refsect1>
<title>Generating C code</title>
<para> <para>
When generating C code, an abstract When generating C code, an abstract
<type>GInterface</type>-derived type is generated for each D-Bus #GTypeInterface<!-- -->-derived type is generated for each D-Bus
interface. Additionally, for every generated type, interface. Additionally, for every generated type,
<type>FooBar</type>, two concrete instantiable types, <type>FooBar</type>, two concrete instantiable types,
<type>FooBarProxy</type> and <type>FooBarStub</type>, implementing <type>FooBarProxy</type> and <type>FooBarStub</type>, implementing
said interface are also generated. The former is derived from said interface are also generated. The former is derived from
<type>GDBusProxy</type> and intended for use on the client side #GDBusProxy and intended for use on the client side
while the latter is derived from the while the latter is derived from the
<type>GDBusInterfaceStub</type> type making it easy to export on a #GDBusInterfaceStub type making it easy to export on a
<type>GDBusConnection</type> either directly or via a #GDBusConnection either directly or via a
<type>GDBusObjectManagerServer</type>. #GDBusObjectManagerServer instance.
</para>
</refsect1>
<refsect1>
<title>Generating Docbook documentation</title>
<para>
Each generated Docbook XML file (see the
<option>--generate-docbook</option> option for details) is a <ulink
url="http://www.docbook.org/tdg/en/html/refentry.html"><literal>RefEntry</literal></ulink>
article describing the D-Bus interface.
</para> </para>
</refsect1> </refsect1>
@ -85,10 +102,9 @@
<listitem> <listitem>
<para> <para>
Generate Docbook Documentation for each D-Bus interface and Generate Docbook Documentation for each D-Bus interface and
put it in put it in <filename>OUTFILES-NAME.xml</filename> where
<filename>OUTFILES-org.Project.IfaceName.xml</filename> (where <literal>NAME</literal> is a place-holder for the interface
<literal>org.Project.IfaceName</literal> is a place-holder for name, e.g. <literal>net.Corp.FooBar</literal> and so on.
the interface name).
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -114,6 +130,17 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>--c-generate-object-manager</option></term>
<listitem>
<para>
If this option is passed a #GDBusObjectManagerClient
subclass with an appropriate #GDBusProxyTypeFunc is
generated.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>--annotate</option></term> <term><option>--annotate</option></term>
<listitem> <listitem>
@ -192,7 +219,7 @@ gdbus-codegen --c-namespace MyApp \
<term><literal>org.gtk.GDBus.C.ForceGVariant</literal></term> <term><literal>org.gtk.GDBus.C.ForceGVariant</literal></term>
<listitem> <listitem>
<para> <para>
If set to a non-empty string, a <type>GVariant</type> will If set to a non-empty string, a #GVariant instance will
be used instead of the natural C type. This annotation can be used instead of the natural C type. This annotation can
be used on any <literal>&lt;arg&gt;</literal> and be used on any <literal>&lt;arg&gt;</literal> and
<literal>&lt;property&gt;</literal> element. <literal>&lt;property&gt;</literal> element.
@ -318,7 +345,7 @@ gdbus-codegen --generate-c-code myapp-generated \
two files called two files called
<filename>myapp-generated.[ch]</filename> are <filename>myapp-generated.[ch]</filename> are
generated. The files provide an abstract generated. The files provide an abstract
<type>GInterface</type>-derived type called #GTypeInterface<!-- -->-derived type called
<type>MyAppFrobber</type> as well as two instantiable types with <type>MyAppFrobber</type> as well as two instantiable types with
the same name but suffixed with <type>Proxy</type> and the same name but suffixed with <type>Proxy</type> and
<type>Stub</type>. The generated file, roughly, contains the <type>Stub</type>. The generated file, roughly, contains the
@ -425,13 +452,13 @@ my_app_frobber_proxy_new_sync (GDBusConnection *connection,
]]></programlisting></informalexample> ]]></programlisting></informalexample>
<para> <para>
Thus, for every D-Bus method, there will be three C functions for Thus, for every D-Bus method, there will be three C functions for
calling the method, one <type>GObject</type> signal for handling calling the method, one #GObject signal for handling an incoming
an incoming call and one C function for completing an incoming call and one C function for completing an incoming call. For every
call. For every D-Bus signal, there's one <type>GObject</type> D-Bus signal, there's one #GObject signal and one C function for
signal and one C function for emitting it. For every D-Bus emitting it. For every D-Bus property, two C functions are
property, two C functions are generated (one setter, one getter) generated (one setter, one getter) and one #GObject property. The
and one <type>GObject</type> property. The following table following table summarizes the generated facilities and where they
summarizes the generated facilities and where they are applicable: are applicable:
</para> </para>
<informaltable> <informaltable>
<tgroup cols="3"> <tgroup cols="3">
@ -461,12 +488,12 @@ my_app_frobber_proxy_new_sync (GDBusConnection *connection,
<row> <row>
<entry>Properties (Reading)</entry> <entry>Properties (Reading)</entry>
<entry>Use <function>m_a_f_get_verbose()</function> or <parameter>:verbose</parameter>.</entry> <entry>Use <function>m_a_f_get_verbose()</function> or <parameter>:verbose</parameter>.</entry>
<entry>Implement <type>GObject</type>'s <function>get_property()</function> vfunc.</entry> <entry>Implement #GObject<!-- -->'s <function>get_property()</function> vfunc.</entry>
</row> </row>
<row> <row>
<entry>Properties (writing)</entry> <entry>Properties (writing)</entry>
<entry>Use <function>m_a_f_set_verbose()</function> or <parameter>:verbose</parameter>.</entry> <entry>Use <function>m_a_f_set_verbose()</function> or <parameter>:verbose</parameter>.</entry>
<entry>Implement <type>GObject</type>'s <function>set_property()</function> vfunc.</entry> <entry>Implement #GObject<!-- -->'s <function>set_property()</function> vfunc.</entry>
</row> </row>
</tbody> </tbody>
</tgroup> </tgroup>
@ -494,27 +521,26 @@ my_app_frobber_proxy_new_sync (GDBusConnection *connection,
g_object_unref (proxy); g_object_unref (proxy);
]]></programlisting></informalexample> ]]></programlisting></informalexample>
<para> <para>
Instead of using the generic <type>GDBusProxy</type> facilities, Instead of using the generic #GDBusProxy facilities, one can use
one can use the generated methods such as the generated methods such as
<function>my_app_frobber_call_hello_world()</function> to invoke <function>my_app_frobber_call_hello_world()</function> to invoke
the <function>net.Corp.MyApp.Frobber.HelloWorld()</function> the <function>net.Corp.MyApp.Frobber.HelloWorld()</function>
D-Bus method, connect to the the D-Bus method, connect to the the
<function>::notification</function> GObject signal to receive <function>::notification</function> GObject signal to receive
the <function>net.Corp.MyApp.Frobber::Notication</function> D-Bus the <function>net.Corp.MyApp.Frobber::Notication</function>
signal and get/set the D-Bus signal and get/set the
<parameter>net.Corp.MyApp.Frobber:Verbose</parameter> D-Bus <parameter>net.Corp.MyApp.Frobber:Verbose</parameter> D-Bus
Property using either the GObject property Property using either the GObject property
<parameter>:verbose</parameter> or the <parameter>:verbose</parameter> or the
<function>my_app_get_verbose()</function> and <function>my_app_get_verbose()</function> and
<function>my_app_set_verbose()</function> methods. Use the <function>my_app_set_verbose()</function> methods. Use the
standard <function>GObject::notify</function> signal to listen standard #GObject::notify signal to listen to property changes.
to property changes.
</para> </para>
<para> <para>
Note that all property access is via <type>GDBusProxy</type>'s Note that all property access is via #GDBusProxy<!-- -->'s
property cache so no IO is ever done when reading properties. property cache so no IO is ever done when reading properties.
Also note that setting a property will cause Also note that setting a property will cause the
<function>org.freedesktop.DBus.Properties.Set()</function> to be <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties">org.freedesktop.DBus.Properties.Set</ulink> method to be
called on the remote object. This call, however, is asynchronous called on the remote object. This call, however, is asynchronous
so setting a property won't block. Further, the change is so setting a property won't block. Further, the change is
delayed and no error checking is possible. delayed and no error checking is possible.
@ -525,27 +551,27 @@ my_app_frobber_proxy_new_sync (GDBusConnection *connection,
<title>Server-side usage</title> <title>Server-side usage</title>
<para> <para>
The generated <type>MyAppFrobber</type> interface is designed so The generated <type>MyAppFrobber</type> interface is designed so
it is easy to implement it in a <type>GObject</type> it is easy to implement it in a #GObject
subclass. For example, to handle subclass. For example, to handle
<function>HelloWorld()</function> method invocations, set the <function>HelloWorld()</function> method invocations, set the
vfunc for <function>handle_hello_hello_world()</function> in the vfunc for <function>handle_hello_hello_world()</function> in the
<type>MyAppFrobberIface</type> structure. Similary, to handle <type>MyAppFrobberIface</type> structure. Similary, to handle
the <parameter>net.Corp.MyApp.Frobber:Verbose</parameter> the <parameter>net.Corp.MyApp.Frobber:Verbose</parameter>
property override the <parameter>:verbose</parameter> GObject property override the <parameter>:verbose</parameter> #GObject
property from the subclass. To emit a signal, use property from the subclass. To emit a signal, use
e.g. <function>my_app_emit_signal()</function> or e.g. <function>my_app_emit_signal()</function> or
<function>g_signal_emit_by_name()</function>. g_signal_emit_by_name().
</para> </para>
<para> <para>
Instead of subclassing, it is often easier to use the generated Instead of subclassing, it is often easier to use the generated
<type>MyAppFrobberStub</type> subclass. To handle incoming <type>MyAppFrobberStub</type> subclass. To handle incoming
method calls, use <function>g_signal_connect()</function> with method calls, use <function>g_signal_connect()</function> with
the <function>::handle-*</function> signals and instead of the <function>::handle-*</function> signals and instead of
overriding <type>GObject</type>'s overriding #GObject<!-- -->'s
<function>get_property()</function> and <function>get_property()</function> and
<function>set_property()</function> vfuncs, use <function>set_property()</function> vfuncs, use
<function>g_object_get()</function> and g_object_get() and
<function>g_object_set()</function> or the generated property g_object_set() or the generated property
getters and setters (the generated class has an internal getters and setters (the generated class has an internal
property bag implementation). property bag implementation).
</para> </para>
@ -593,13 +619,13 @@ on_handle_hello_world (MyAppFrobber *object,
]]></programlisting></informalexample> ]]></programlisting></informalexample>
<para> <para>
To facility atomic changesets (multiple properties changing at To facility atomic changesets (multiple properties changing at
the same time), <function>GObject::notify</function> signals are the same time), #GObject::notify signals are queued up when
queued up when received. The queue is drained in an idle handler received. The queue is drained in an idle handler and will cause
and will cause emissions of the emissions of the <ulink
<function>org.freedesktop.DBus.Properties::PropertiesChanged</function> url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties">org.freedesktop.DBus.Properties::PropertiesChanged</ulink>
signal with all the properties that has changed. Use signal with all the properties that has changed. Use
<function>g_dbus_interface_stub_flush()</function> to empty the g_dbus_interface_stub_flush() or g_dbus_object_stub_flush() to
queue immediately. empty the queue immediately.
</para> </para>
</refsect2> </refsect2>
</refsect1> </refsect1>
@ -607,24 +633,41 @@ on_handle_hello_world (MyAppFrobber *object,
<refsect1> <refsect1>
<title>C Type Mapping</title> <title>C Type Mapping</title>
<para> <para>
Scalar types, strings (including object paths (type-string Scalar types
<literal>o</literal>), signatures (type-string (type-strings
<literal>g</literal>) and bytestrings (type-string <link linkend="G-VARIANT-TYPE-BOOLEAN:CAPS">'b'</link>,
<literal>ay</literal>)) and arrays of string (type-string <link linkend="G-VARIANT-TYPE-BYTE:CAPS">'y'</link>,
<literal>as</literal>) and arrays of bytestrings (type-string <link linkend="G-VARIANT-TYPE-INT16:CAPS">'n'</link>,
<literal>aay</literal>) are mapped to the natural types, <link linkend="G-VARIANT-TYPE-UINT16:CAPS">'q'</link>,
e.g. <type>gboolean</type>, <type>gdouble</type>, <link linkend="G-VARIANT-TYPE-INT32:CAPS">'i'</link>,
<type>gint</type>, <type>gchar*</type>, <type>gchar **</type> and <link linkend="G-VARIANT-TYPE-UINT32:CAPS">'u'</link>,
so on. Everything else is mapped to the <type>GVariant</type> <link linkend="G-VARIANT-TYPE-INT64:CAPS">'x'</link>,
<link linkend="G-VARIANT-TYPE-UINT64:CAPS">'t'</link>,
<link linkend="G-VARIANT-TYPE-HANDLE:CAPS">'h'</link> and
<link linkend="G-VARIANT-TYPE-DOUBLE:CAPS">'d'</link>)
),
strings (type-strings
<link linkend="G-VARIANT-TYPE-STRING:CAPS">'s'</link>,
<link linkend="G-VARIANT-TYPE-BYTESTRING:CAPS">'ay'</link>,
<link linkend="G-VARIANT-TYPE-OBJECT-PATH:CAPS">'o'</link> and
<link linkend="G-VARIANT-TYPE-SIGNATURE:CAPS">'g'</link>) and
arrays of string (type-strings
<link linkend="G-VARIANT-TYPE-STRING-ARRAY:CAPS">'as'</link> and
<link linkend="G-VARIANT-TYPE-BYTESTRING-ARRAY:CAPS">'aay'</link>)
are mapped to the natural types,
e.g. #gboolean, #gdouble, #gint, <link linkend="gchararray">gchar*</link>,
<link linkend="GStrv">gchar**</link> and
so on. Everything else is mapped to the #GVariant
type. type.
</para> </para>
<para> <para>
This automatic mapping can be turned off by using the annotation This automatic mapping can be turned off by using the annotation
<literal>org.gtk.GDBus.C.ForceGVariant</literal> - if used then a <literal>org.gtk.GDBus.C.ForceGVariant</literal> - if used then a
<type>GVariant</type> is always exchanged instead of the #GVariant is always exchanged instead of the
corresponding native C type. This annotation may be convenient to corresponding native C type. This annotation may be convenient to
use when using the type-string <literal>ay</literal> for data with use when using
embedded NUL bytes. bytestrings (type-string <link linkend="G-VARIANT-TYPE-BYTESTRING:CAPS">'ay'</link>)
for data that could have embedded NUL bytes.
</para> </para>
</refsect1> </refsect1>
@ -648,7 +691,7 @@ on_handle_hello_world (MyAppFrobber *object,
<refsect1> <refsect1>
<title>Author</title> <title>Author</title>
<para> <para>
Written by David Zeuthen <email>zeuthen@gmail.com</email> with Written by David Zeuthen <email>zeuthen(at)gmail.com</email> with
a lot of help from many others. a lot of help from many others.
</para> </para>
</refsect1> </refsect1>

View File

@ -205,7 +205,7 @@
<xi:include href="gsettings.xml"/> <xi:include href="gsettings.xml"/>
<xi:include href="glib-compile-schemas.xml"/> <xi:include href="glib-compile-schemas.xml"/>
<xi:include href="gdbus.xml"/> <xi:include href="gdbus.xml"/>
<xi:include href="gdbus-codegen.xml"/> <xi:include href="xml/gdbus-codegen.xml"/>
</chapter> </chapter>
</part> </part>

View File

@ -238,7 +238,7 @@ on_name_acquired (GDBusConnection *connection,
</section> </section>
<section id="gdbus-example-gdbus-codegen"> <section id="gdbus-example-gdbus-codegen">
<title>Generating code with gdbus-codegen</title> <title>Using gdbus-codegen</title>
<para> <para>
dbus-glib comes with <command>dbus-binding-tool</command>, which dbus-glib comes with <command>dbus-binding-tool</command>, which
@ -251,9 +251,10 @@ on_name_acquired (GDBusConnection *connection,
<para> <para>
If this XML is processed like this If this XML is processed like this
<informalexample><programlisting><![CDATA[ <informalexample><programlisting><![CDATA[
gdbus-codegen --c-namespace Example \ gdbus-codegen --interface-prefix org.gtk.GDBus.Example.ObjectManager. \
--interface-prefix org.gtk.GDBus.Example.ObjectManager. \
--generate-c-code generated-code \ --generate-c-code generated-code \
--c-namespace Example \
--c-generate-object-manager \
--generate-docbook generated-docs \ --generate-docbook generated-docs \
gdbus-example-objectmanager.xml gdbus-example-objectmanager.xml
]]></programlisting></informalexample> ]]></programlisting></informalexample>

View File

@ -10,7 +10,8 @@ import dbustypes
# ---------------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------------
class CodeGenerator: class CodeGenerator:
def __init__(self, ifaces, namespace, interface_prefix, h, c): def __init__(self, ifaces, namespace, interface_prefix, generate_objmanager, h, c):
self.generate_objmanager = generate_objmanager
self.ifaces = ifaces self.ifaces = ifaces
self.h = h self.h = h
self.c = c self.c = c
@ -417,6 +418,7 @@ class CodeGenerator:
self.h.write('\n') self.h.write('\n')
# Finally, the proxy manager # Finally, the proxy manager
if self.generate_objmanager:
self.h.write('\n') self.h.write('\n')
self.h.write('/* ---- */\n') self.h.write('/* ---- */\n')
self.h.write('\n') self.h.write('\n')
@ -1915,5 +1917,6 @@ class CodeGenerator:
self.generate_method_completers(i) self.generate_method_completers(i)
self.generate_proxy(i) self.generate_proxy(i)
self.generate_stub(i) self.generate_stub(i)
if self.generate_objmanager:
self.generate_object_manager_client() self.generate_object_manager_client()
self.generate_outro() self.generate_outro()

View File

@ -132,6 +132,8 @@ def codegen_main():
help='String to strip from D-Bus interface names for code and docs') help='String to strip from D-Bus interface names for code and docs')
arg_parser.add_argument('--c-namespace', nargs='?', metavar='NAMESPACE', default='', arg_parser.add_argument('--c-namespace', nargs='?', metavar='NAMESPACE', default='',
help='The namespace to use for generated C code') help='The namespace to use for generated C code')
arg_parser.add_argument('--c-generate-object-manager', action='store_true',
help='Generate a GDBusObjectManagerClient subclass when generating C code')
arg_parser.add_argument('--generate-c-code', nargs='?', metavar='OUTFILES', arg_parser.add_argument('--generate-c-code', nargs='?', metavar='OUTFILES',
help='Generate C code in OUTFILES.[ch]') help='Generate C code in OUTFILES.[ch]')
arg_parser.add_argument('--generate-docbook', nargs='?', metavar='OUTFILES', arg_parser.add_argument('--generate-docbook', nargs='?', metavar='OUTFILES',
@ -154,10 +156,15 @@ def codegen_main():
i.post_process(args.interface_prefix, args.c_namespace) i.post_process(args.interface_prefix, args.c_namespace)
c_code = args.generate_c_code c_code = args.generate_c_code
print "args.c_generate_object_manager=", args.c_generate_object_manager
if c_code: if c_code:
h = file(c_code + '.h', 'w') h = file(c_code + '.h', 'w')
c = file(c_code + '.c', 'w') c = file(c_code + '.c', 'w')
gen = codegen.CodeGenerator(all_ifaces, args.c_namespace, args.interface_prefix, h, c); gen = codegen.CodeGenerator(all_ifaces,
args.c_namespace,
args.interface_prefix,
args.c_generate_object_manager,
h, c);
ret = gen.generate() ret = gen.generate()
docbook = args.generate_docbook docbook = args.generate_docbook

View File

@ -242,9 +242,10 @@ gdbus_bz627724_LDADD = $(progs_ldadd)
gdbus-test-codegen-generated.h gdbus-test-codegen-generated.c : test-codegen.xml gdbus-test-codegen-generated.h gdbus-test-codegen-generated.c : test-codegen.xml
$(PYTHON) $(top_srcdir)/gio/gdbus-codegen/codegen_main.py \ $(PYTHON) $(top_srcdir)/gio/gdbus-codegen/codegen_main.py \
--c-namespace Foo \
--interface-prefix org.project. \ --interface-prefix org.project. \
--generate-c-code gdbus-test-codegen-generated \ --generate-c-code gdbus-test-codegen-generated \
--c-generate-object-manager \
--c-namespace Foo \
--generate-docbook gdbus-test-codegen-generated-doc \ --generate-docbook gdbus-test-codegen-generated-doc \
--annotate "org.project.Bar" Key1 Value1 \ --annotate "org.project.Bar" Key1 Value1 \
--annotate "org.project.Bar" org.gtk.GDBus.Internal Value2 \ --annotate "org.project.Bar" org.gtk.GDBus.Internal Value2 \
@ -443,8 +444,9 @@ proxy_LDADD = $(progs_ldadd) \
gdbus-example-objectmanager-generated.h gdbus-example-objectmanager-generated.c : gdbus-example-objectmanager.xml gdbus-example-objectmanager-generated.h gdbus-example-objectmanager-generated.c : gdbus-example-objectmanager.xml
$(PYTHON) $(top_srcdir)/gio/gdbus-codegen/codegen_main.py \ $(PYTHON) $(top_srcdir)/gio/gdbus-codegen/codegen_main.py \
--c-namespace Example \
--interface-prefix org.gtk.GDBus.Example.ObjectManager. \ --interface-prefix org.gtk.GDBus.Example.ObjectManager. \
--c-namespace Example \
--c-generate-object-manager \
--generate-c-code gdbus-example-objectmanager-generated \ --generate-c-code gdbus-example-objectmanager-generated \
--generate-docbook gdbus-example-objectmanager-generated \ --generate-docbook gdbus-example-objectmanager-generated \
gdbus-example-objectmanager.xml \ gdbus-example-objectmanager.xml \

View File

@ -44,7 +44,7 @@
</interface> </interface>
<!-- org.gtk.GDBus.Example.ObjectManager.Cat: <!-- org.gtk.GDBus.Example.ObjectManager.Cat:
@short_description: Another interface doc generated by gdbus-codegen @short_description: More example docs generated by gdbus-codegen
This D-Bus interface is used to describe a cat. Right now there This D-Bus interface is used to describe a cat. Right now there
are no properties, methods or signals associated with this are no properties, methods or signals associated with this