summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2010-06-09 12:34:01 +0200
committerPatrick Ohly <patrick.ohly@intel.com>2010-06-09 12:34:01 +0200
commitd24ddd1e3adcf6ec625213003bd5bb963ea919e4 (patch)
tree2ee0d8ce3f40d4f9d606a3c6b7716048f5f9a218 /src
parentda4bab20df847769e963e59c36e513b362786545 (diff)
Qt D-Bus bindings: install interface files in /usr/share/dbus-1/interfacesqt-binding
As suggested by Sascha Peilicke, this patch adds installation of service files in the dbus-1/interfaces directory. The files are named after the interface they implemented (org.syncevolution.Server.xml, ...) and contain the Qt annotations. Kudos to Yongsheng for making spec-strip-doc.xsl configurable.
Diffstat (limited to 'src')
-rw-r--r--src/dbus/interfaces/Makefile.am18
-rw-r--r--src/dbus/interfaces/spec-strip-docs.xsl13
2 files changed, 30 insertions, 1 deletions
diff --git a/src/dbus/interfaces/Makefile.am b/src/dbus/interfaces/Makefile.am
index 6424dd84..e4aa53ad 100644
--- a/src/dbus/interfaces/Makefile.am
+++ b/src/dbus/interfaces/Makefile.am
@@ -37,11 +37,29 @@ endif
CLEANFILES = $(BUILT_SOURCES) stamp-syncevo-dbus-glue.h
EXTRA_DIST = syncevo-marshal.list \
spec-strip-docs.xsl \
+ spec-strip-docs-plus-annotations.xsl \
spec-to-docbook.xsl \
syncevo-connection-full.xml \
syncevo-server-full.xml \
syncevo-session-full.xml
+if COND_DBUS
+# Install .xml interface description including Qt <annotation>s,
+# but without <doc:*>, in share/dbus-1/interfaces. We reuse
+# the $(DBUS_SERVICES_DIR) here, based on the assumption that the
+# "services" and "interfaces" directory are in the same directory.
+interfacesdir = $(DBUS_SERVICES_DIR)/../interfaces
+interfaces_DATA = org.syncevolution.Server.xml org.syncevolution.Session.xml org.syncevolution.Connection.xml
+CLEANFILES += $(interfaces_DATA)
+SPEC_TO_INTERFACE = $(XSLT) --stringparam use-annotation yes -o $@ $(srcdir)/spec-strip-docs.xsl $<
+org.syncevolution.Server.xml: syncevo-server-full.xml spec-strip-docs.xsl
+ $(SPEC_TO_INTERFACE)
+org.syncevolution.Session.xml: syncevo-session-full.xml spec-strip-docs.xsl
+ $(SPEC_TO_INTERFACE)
+org.syncevolution.Connection.xml: syncevo-connection-full.xml spec-strip-docs.xsl
+ $(SPEC_TO_INTERFACE)
+endif
+
if COND_GUI
%-bindings.h: stamp-%-bindings.h
@true
diff --git a/src/dbus/interfaces/spec-strip-docs.xsl b/src/dbus/interfaces/spec-strip-docs.xsl
index b5ed75f8..82923b10 100644
--- a/src/dbus/interfaces/spec-strip-docs.xsl
+++ b/src/dbus/interfaces/spec-strip-docs.xsl
@@ -11,6 +11,9 @@
doctype-system="http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"
doctype-public="-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" />
+ <!-- preserve annotations -->
+ <xsl:param name="use-annotation" select="'no'"/>
+
<xsl:template match="*">
<xsl:copy>
<xsl:for-each select="@*">
@@ -33,7 +36,15 @@
</node>
</xsl:template>
- <xsl:template match="annotation"/>
+ <xsl:template match="annotation">
+ <xsl:if test="$use-annotation='yes'">
+ <xsl:copy>
+ <xsl:for-each select="@*">
+ <xsl:copy/>
+ </xsl:for-each>
+ </xsl:copy>
+ </xsl:if>
+ </xsl:template>
<xsl:template match="doc:*"/>
<xsl:template match="text()"/>
</xsl:stylesheet>