gdbus-codegen: Generate gtk-doc section docs

This is nice to have if using gtk-doc on the generated code. We could
also generate -sections.txt and .types files but we don't do that
right now...

Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
David Zeuthen 2011-04-19 14:39:47 -04:00
parent 7a1d420889
commit bd5da131a2

View File

@ -2218,6 +2218,17 @@ class CodeGenerator:
' */\n'
'\n')
self.c.write(self.docbook_gen.expand(
'/**\n'
' * SECTION:%sObjectManagerClient\n'
' * @title: %sObjectManagerClient\n'
' * @short_description: Generated #GDBusObjectManagerClient subclass\n'
' *\n'
' * This section contains a #GDBusObjectManagerClient that uses %sobject_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc.\n'
' */\n'
%(self.namespace, self.namespace, self.ns_lower)))
self.c.write('\n')
self.c.write(self.docbook_gen.expand(
'/**\n'
' * %sObjectManagerClient:\n'
@ -2514,15 +2525,29 @@ class CodeGenerator:
# ---------------------------------------------------------------------------------------------------
def generate_interface_intro(self, i):
self.c.write('/* ------------------------------------------------------------------------\n'
' * Code for interface %s\n'
' * ------------------------------------------------------------------------\n'
' */\n'
'\n'%(i.name))
self.c.write(self.docbook_gen.expand(
'/**\n'
' * SECTION:%s\n'
' * @title: %s\n'
' * @short_description: Generated C code for the %s D-Bus interface\n'
' *\n'
' * This section contains code for working with the #%s D-Bus interface in C.\n'
' */\n'
%(i.camel_name, i.camel_name, i.name, i.name)))
self.c.write('\n')
def generate(self):
self.generate_intro()
self.declare_types()
for i in self.ifaces:
self.c.write('/* ------------------------------------------------------------------------\n'
' * Code for interface %s\n'
' * ------------------------------------------------------------------------\n'
' */\n'
'\n'%(i.name))
self.generate_interface_intro(i)
self.generate_introspection_for_interface(i)
self.generate_interface(i)
self.generate_property_accessors(i)