summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build-aux/mbim-codegen/Message.py32
-rw-r--r--build-aux/mbim-codegen/ObjectList.py18
-rw-r--r--build-aux/mbim-codegen/Struct.py2
-rw-r--r--docs/reference/libmbim-glib/Makefile.am18
-rw-r--r--docs/reference/libmbim-glib/libmbim-glib-common.sections (renamed from docs/reference/libmbim-glib/libmbim-glib-sections.txt)0
-rw-r--r--docs/reference/libmbim-glib/libmbim-glib-docs.xml5
6 files changed, 61 insertions, 14 deletions
diff --git a/build-aux/mbim-codegen/Message.py b/build-aux/mbim-codegen/Message.py
index 4adea86..c345e5d 100644
--- a/build-aux/mbim-codegen/Message.py
+++ b/build-aux/mbim-codegen/Message.py
@@ -658,7 +658,33 @@ class Message:
"""
- Emit the sections
+ Emit the section content
"""
- def emit_sections(self, sfile):
- pass
+ def emit_section_content(self, sfile):
+ translations = { 'name_dashed' : utils.build_dashed_name(self.name),
+ 'underscore' : utils.build_underscore_name(self.fullname) }
+
+ template = (
+ '\n'
+ '<SUBSECTION ${name_dashed}>\n')
+ sfile.write(string.Template(template).substitute(translations))
+
+ if self.has_query:
+ template = (
+ '${underscore}_query_new\n')
+ sfile.write(string.Template(template).substitute(translations))
+
+ if self.has_set:
+ template = (
+ '${underscore}_set_new\n')
+ sfile.write(string.Template(template).substitute(translations))
+
+ if self.has_response:
+ template = (
+ '${underscore}_response_parse\n')
+ sfile.write(string.Template(template).substitute(translations))
+
+ if self.has_notification:
+ template = (
+ '${underscore}_notification_parse\n')
+ sfile.write(string.Template(template).substitute(translations))
diff --git a/build-aux/mbim-codegen/ObjectList.py b/build-aux/mbim-codegen/ObjectList.py
index 6e4899b..ddb5a68 100644
--- a/build-aux/mbim-codegen/ObjectList.py
+++ b/build-aux/mbim-codegen/ObjectList.py
@@ -95,21 +95,21 @@ class ObjectList:
translations = { 'service_dashed' : utils.build_dashed_name(self.service),
'service' : self.service }
- # Emit the section with all the types for the service
+ # Emit section header
template = (
'\n'
'<SECTION>\n'
- '<FILE>mbim-${service_dashed}-types</FILE>\n'
- '<TITLE>${service} data types</TITLE>\n')
+ '<FILE>mbim-${service_dashed}</FILE>\n'
+ '<TITLE>${service}</TITLE>\n')
sfile.write(string.Template(template).substitute(translations))
+ # Emit subsection per type
for struct in self.struct_list:
struct.emit_section_content(sfile)
- template = (
- '</SECTION>\n')
- sfile.write(template)
+ # Emit subsection per command
+ for command in self.command_list:
+ command.emit_section_content(sfile)
- # Emit per-command sections
- for item in self.command_list:
- item.emit_sections(sfile)
+ sfile.write(
+ '</SECTION>\n')
diff --git a/build-aux/mbim-codegen/Struct.py b/build-aux/mbim-codegen/Struct.py
index 3ea037d..325676f 100644
--- a/build-aux/mbim-codegen/Struct.py
+++ b/build-aux/mbim-codegen/Struct.py
@@ -247,7 +247,7 @@ class Struct:
'\n'
'/**\n'
' * ${name_underscore}_array_free:\n'
- ' * @array: a #NULL-terminated array of #${name} structs.\n'
+ ' * @array: a #NULL terminated array of #${name} structs.\n'
' *\n'
' * Frees the memory allocated for the array of #${name}s.\n'
' */\n'
diff --git a/docs/reference/libmbim-glib/Makefile.am b/docs/reference/libmbim-glib/Makefile.am
index c6d8a72..e4afc06 100644
--- a/docs/reference/libmbim-glib/Makefile.am
+++ b/docs/reference/libmbim-glib/Makefile.am
@@ -5,7 +5,18 @@ DOC_MODULE = libmbim-glib
# The top-level SGML file.
DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.xml
-BUILT_SOURCES =
+# Sections file building
+ALL_SECTIONS = \
+ $(srcdir)/libmbim-glib-common.sections \
+ $(top_builddir)/libmbim-glib/generated/mbim-basic-connect.sections
+
+$(DOC_MODULE)-sections.mstamp: $(ALL_SECTIONS)
+ $(AM_V_GEN) \
+ rm -f $(DOC_MODULE)-sections.txt && \
+ cat $(ALL_SECTIONS) > $(DOC_MODULE)-sections.txt && \
+ touch $(DOC_MODULE)-sections.mstamp
+
+BUILT_SOURCES = $(DOC_MODULE)-sections.mstamp
# Extra options to supply to gtkdoc-scan
SCAN_OPTIONS = --rebuild-types
@@ -53,6 +64,9 @@ include $(top_srcdir)/gtk-doc.make
EXTRA_DIST += \
+ libmbim-glib-common.sections \
+ $(DOC_MODULE)-sections.txt \
+ $(DOC_MODULE)-sections.mstamp \
version.xml.in \
$(DIAGRAMS) \
$(NULL)
@@ -71,6 +85,8 @@ CLEANFILES += \
$(DOC_MODULE).prerequisites \
$(DOC_MODULE).signals \
$(DOC_MODULE).types \
+ $(DOC_MODULE)-sections.txt \
+ $(DOC_MODULE)-sections.mstamp \
*.stamp \
-rf xml html tmpl \
$(NULL)
diff --git a/docs/reference/libmbim-glib/libmbim-glib-sections.txt b/docs/reference/libmbim-glib/libmbim-glib-common.sections
index 93cf759..93cf759 100644
--- a/docs/reference/libmbim-glib/libmbim-glib-sections.txt
+++ b/docs/reference/libmbim-glib/libmbim-glib-common.sections
diff --git a/docs/reference/libmbim-glib/libmbim-glib-docs.xml b/docs/reference/libmbim-glib/libmbim-glib-docs.xml
index ab3ef06..b54226d 100644
--- a/docs/reference/libmbim-glib/libmbim-glib-docs.xml
+++ b/docs/reference/libmbim-glib/libmbim-glib-docs.xml
@@ -48,6 +48,11 @@
<xi:include href="xml/mbim-utils.xml"/>
</chapter>
+ <chapter>
+ <title>Services</title>
+ <xi:include href="xml/mbim-basic-connect.xml"/>
+ </chapter>
+
<chapter id="object-tree">
<title>Object Hierarchy</title>
<xi:include href="xml/tree_index.sgml"/>