[tracker/miner-web: 27/31] libtracker-miner: Avoid DBus interface duplication



commit acc3453b90e125044b2484b3e5409bd7d0eb2226
Author: Adrien Bustany <madcat mymadcat com>
Date:   Thu Nov 12 15:34:39 2009 -0300

    libtracker-miner: Avoid DBus interface duplication
    
    The tracker-miner.xml DBus interface file was previously duplicated in
    tracker-miner-web.xml. This commit removes that duplication.

 data/dbus/tracker-miner-web.xml  |   43 --------------------------------------
 src/libtracker-miner/Makefile.am |    9 +++++++-
 2 files changed, 8 insertions(+), 44 deletions(-)
---
diff --git a/data/dbus/tracker-miner-web.xml b/data/dbus/tracker-miner-web.xml
index bff941e..5c17a6a 100644
--- a/data/dbus/tracker-miner-web.xml
+++ b/data/dbus/tracker-miner-web.xml
@@ -1,49 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <node name="/">
-  <interface name="org.freedesktop.Tracker1.Miner">
-    <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="tracker_miner_dbus"/>
-    <method name="GetStatus">
-      <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
-      <arg type="s" name="status" direction="out" />
-    </method>
-    <method name="GetProgress">
-      <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
-      <arg type="d" name="progress" direction="out" />
-    </method>
-    <method name="GetPauseDetails">
-      <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
-      <arg type="as" name="pause_applications" direction="out" />
-      <arg type="as" name="pause_reasons" direction="out" />
-    </method>
-    <method name="Pause">
-      <annotation name="org.freedesktop.DBus.GLib.Async"  value="true"/>
-      <arg type="s" name="application" direction="in" />
-      <arg type="s" name="reason" direction="in" />
-      <arg type="i" name="cookie" direction="out" />
-    </method>
-    <method name="Resume">
-      <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
-      <arg type="i" name="cookie" direction="in" />
-    </method>
-
-    <!-- Signals -->
-    <signal name="Started" />
-    <signal name="Stopped">
-      <arg type="b" name="interrupted" />
-    </signal>
-    <signal name="Paused" />
-    <signal name="Resumed" />
-    <signal name="Progress">
-      <arg type="s" name="status" />
-      <arg type="d" name="progress" />
-    </signal>
-    <signal name="Error">
-      <arg type="i" name="code"/>
-      <arg type="s" name="reason"/>
-    </signal>
-  </interface>
-
   <interface name="org.freedesktop.Tracker1.Miner.Web">
     <method name="Authenticate">
       <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
diff --git a/src/libtracker-miner/Makefile.am b/src/libtracker-miner/Makefile.am
index 9e5e1c4..f9b210c 100644
--- a/src/libtracker-miner/Makefile.am
+++ b/src/libtracker-miner/Makefile.am
@@ -133,13 +133,20 @@ libtracker-miner-web.vala.stamp: $(libtracker_miner_la_VALASOURCES)
 	$(VALAC) -C $(VALAPKGS) $(VALAFLAGS) -H tracker-password-provider.h --library tracker-password-provider-$(TRACKER_API_VERSION) $^
 	touch $@
 
+# Custom rule to avoid API duplication. Custom shell script to workaround
+# a dbus-binding-tool bug where it generates bad code when passed two files
+# on the command line (though the man page says it supports it)
+tracker-miner-web-glue.h: $(top_srcdir)/data/dbus/tracker-miner-web.xml $(top_srcdir)/data/dbus/tracker-miner.xml
+	$(top_srcdir)/src/libtracker-miner/merge_interfaces.sh $^ > $(top_srcdir)/src/libtracker-miner/tracker-miner-web-full.xml
+	$(AM_V_GEN)$(DBUSBINDINGTOOL) --mode=glib-server --output=$@ --prefix=tracker_miner_web $(top_srcdir)/src/libtracker-miner/tracker-miner-web-full.xml
+
 %-glue.h: $(top_srcdir)/data/dbus/%.xml
 	$(AM_V_GEN)$(DBUSBINDINGTOOL) --mode=glib-server --output=$@ --prefix=$(subst -,_,$*) $^
 
 %-client.h: $(top_srcdir)/data/dbus/%.xml
 	$(AM_V_GEN)$(DBUSBINDINGTOOL) --mode=glib-client --output=$@ --prefix=$(subst -,_,$*) $^
 
-BUILT_SOURCES = $(dbus_sources) $(marshal_sources) libtracker-miner-web.vala.stamp
+BUILT_SOURCES = $(dbus_sources) $(marshal_sources) libtracker-miner-web.vala.stamp tracker-miner-web-full.xml
 
 CLEANFILES = $(BUILT_SOURCES)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]