[tracker/gdbus-porting-rebased: 57/65] build: Removed dbus-glib from pkg-config unless needed and fixed includes



commit 0981b9644528ef6a1ec019574936e483143d8f5e
Author: Martyn Russell <martyn lanedo com>
Date:   Fri Jan 7 15:46:32 2011 +0000

    build: Removed dbus-glib from pkg-config unless needed and fixed includes
    
    We now split the old dbus-glib work into
    libtracker-common/tracker-dbus-glib.h so old locations can include
    that specifically. It is not in the libtracker-common/tracker-common.h
    because that will eventually go.
    
    Headers now don't include libtracker-common/tracker-dbus.h in a lot of
    places they don't need to.
    
    tracker-control: Removed dbus-glib dependency. Removed unused
    dbus-binding-tool client generation.

 configure.ac                                       |   43 +++----------
 src/libtracker-client/tracker.c                    |    7 ++
 src/libtracker-common/Makefile.am                  |    2 +
 src/libtracker-common/tracker-dbus-glib.c          |   48 ++++++++++++++
 src/libtracker-common/tracker-dbus-glib.h          |   69 ++++++++++++++++++++
 src/libtracker-common/tracker-dbus.c               |   24 -------
 src/libtracker-common/tracker-dbus.h               |   48 --------------
 src/libtracker-data/tracker-data-manager.c         |    2 -
 src/libtracker-data/tracker-data-query.c           |    2 -
 src/libtracker-data/tracker-data-update.c          |    1 -
 src/libtracker-data/tracker-db-dbus.c              |    2 -
 src/libtracker-data/tracker-db-interface-sqlite.c  |    2 +-
 src/libtracker-extract/tracker-guarantee.c         |    3 +-
 src/libtracker-fts/tracker-fts.c                   |    2 +-
 src/libtracker-fts/tracker-parser-utils.c          |    3 +-
 src/libtracker-miner/tracker-miner-dbus.h          |    1 -
 src/miners/fs/tracker-miner-files.c                |   19 +++--
 src/miners/rss/tracker-miner-rss.c                 |    2 +-
 src/tracker-control/Makefile.am                    |   12 ----
 src/tracker-control/tracker-control.c              |    4 +-
 src/tracker-extract/tracker-extract.h              |    3 -
 src/tracker-store/tracker-backup.c                 |    2 +-
 src/tracker-store/tracker-resources.c              |    2 +-
 src/tracker-store/tracker-statistics.c             |    2 +-
 src/tracker-store/tracker-status.c                 |    2 +-
 src/tracker-store/tracker-steroids.h               |    2 +
 .../tracker-writeback-dispatcher.c                 |    4 +-
 tests/libtracker-common/tracker-dbus-test.c        |    8 ++-
 28 files changed, 170 insertions(+), 151 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 1ff2fb1..c47f1eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -215,6 +215,7 @@ PKG_CHECK_MODULES(GVDB, [$GVDB_REQUIRED])
 # Check requirements for libtracker-bus
 LIBTRACKER_BUS_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                          gio-unix-2.0 >= $GLIB_REQUIRED"
+
 PKG_CHECK_MODULES(LIBTRACKER_BUS, [$LIBTRACKER_BUS_REQUIRED])
 
 # Check requirements for libtracker-client
@@ -223,6 +224,7 @@ LIBTRACKER_CLIENT_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                             gio-unix-2.0 >= $GLIB_REQUIRED
                             dbus-1       >= $DBUS_REQUIRED
                             dbus-glib-1  >= $DBUS_GLIB_REQUIRED"
+
 PKG_CHECK_MODULES(LIBTRACKER_CLIENT, [$LIBTRACKER_CLIENT_REQUIRED])
 
 LIBTRACKER_CLIENT_CFLAGS="$LIBTRACKER_CLIENT_CFLAGS -Wno-deprecated-declarations"
@@ -232,13 +234,12 @@ LIBTRACKER_COMMON_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                             gio-unix-2.0 >= $GLIB_REQUIRED
                             dbus-1       >= $DBUS_REQUIRED
                             dbus-glib-1  >= $DBUS_GLIB_REQUIRED"
+
 PKG_CHECK_MODULES(LIBTRACKER_COMMON, [$LIBTRACKER_COMMON_REQUIRED])
 
 # Check requirements for libtracker-data
 LIBTRACKER_DATA_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                           gio-unix-2.0 >= $GLIB_REQUIRED
-                          dbus-1       >= $DBUS_REQUIRED
-                          dbus-glib-1  >= $DBUS_GLIB_REQUIRED
                           sqlite3      >= $SQLITE_REQUIRED
                           uuid"
 PKG_CHECK_MODULES(LIBTRACKER_DATA, [$LIBTRACKER_DATA_REQUIRED])
@@ -253,9 +254,7 @@ PKG_CHECK_MODULES(LIBTRACKER_DIRECT, [$LIBTRACKER_DIRECT_REQUIRED])
 
 # Check requirements for libtracker-extract
 LIBTRACKER_EXTRACT_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
-                             gio-unix-2.0 >= $GLIB_REQUIRED
-                             dbus-1       >= $DBUS_REQUIRED
-                             dbus-glib-1  >= $DBUS_GLIB_REQUIRED"
+                             gio-unix-2.0 >= $GLIB_REQUIRED"
 
 PKG_CHECK_MODULES(LIBTRACKER_EXTRACT, [$LIBTRACKER_EXTRACT_REQUIRED])
 
@@ -263,8 +262,6 @@ PKG_CHECK_MODULES(LIBTRACKER_EXTRACT, [$LIBTRACKER_EXTRACT_REQUIRED])
 LIBTRACKER_FTS_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                          gio-unix-2.0 >= $GLIB_REQUIRED
                          gthread-2.0  >= $GLIB_REQUIRED
-                         dbus-1       >= $DBUS_REQUIRED
-                         dbus-glib-1  >= $DBUS_GLIB_REQUIRED
                          sqlite3      >= $SQLITE_REQUIRED"
 
 PKG_CHECK_MODULES(LIBTRACKER_FTS, [$LIBTRACKER_FTS_REQUIRED])
@@ -288,8 +285,6 @@ PKG_CHECK_MODULES(LIBTRACKER_SPARQL, [$LIBTRACKER_SPARQL_REQUIRED])
 TRACKER_CONTROL_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                           gio-unix-2.0 >= $GLIB_REQUIRED
                           gthread-2.0  >= $GLIB_REQUIRED
-                          dbus-1       >= $DBUS_REQUIRED
-                          dbus-glib-1  >= $DBUS_GLIB_REQUIRED
                           uuid"
 
 PKG_CHECK_MODULES(TRACKER_CONTROL, [$TRACKER_CONTROL_REQUIRED])
@@ -323,9 +318,7 @@ TRACKER_STORE_LIBS="$TRACKER_STORE_LIBS -lz -lm"
 TRACKER_EXTRACT_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                           gio-unix-2.0 >= $GLIB_REQUIRED
                           gthread-2.0  >= $GLIB_REQUIRED
-                          gmodule-2.0  >= $GLIB_REQUIRED
-                          dbus-1       >= $DBUS_REQUIRED
-                          dbus-glib-1  >= $DBUS_GLIB_REQUIRED"
+                          gmodule-2.0  >= $GLIB_REQUIRED"
 
 PKG_CHECK_MODULES(TRACKER_EXTRACT, [$TRACKER_EXTRACT_REQUIRED])
 
@@ -343,9 +336,7 @@ PKG_CHECK_MODULES(TRACKER_WRITEBACK, [$TRACKER_WRITEBACK_REQUIRED])
 TRACKER_MINER_FS_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                            gio-unix-2.0 >= $GLIB_REQUIRED
                            gthread-2.0  >= $GLIB_REQUIRED
-                           gmodule-2.0  >= $GLIB_REQUIRED
-                           dbus-1       >= $DBUS_REQUIRED
-                           dbus-glib-1  >= $DBUS_GLIB_REQUIRED"
+                           gmodule-2.0  >= $GLIB_REQUIRED"
 
 PKG_CHECK_MODULES(TRACKER_MINER_FS, [$TRACKER_MINER_FS_REQUIRED])
 
@@ -355,8 +346,6 @@ TRACKER_MINER_FS_LIBS="$TRACKER_MINER_FS_LIBS -lz -lm"
 evolution_plugin_name="evolution-plugin"
 
 TRACKER_MINER_EVOLUTION_REQUIRED="glib-2.0                  >= $GLIB_REQUIRED
-                                  dbus-1                    >= $DBUS_REQUIRED
-                                  dbus-glib-1               >= $DBUS_GLIB_REQUIRED
                                   evolution-plugin          >= $EVO_REQUIRED
                                   evolution-data-server-1.2 >= $EDS_REQUIRED"
 
@@ -368,8 +357,6 @@ if test "x$have_tracker_miner_evolution" != "xyes"; then
    evolution_plugin_name="evolution-plugin-3.0"
 
    TRACKER_MINER_EVOLUTION_REQUIRED="glib-2.0                  >= $GLIB_REQUIRED
-                                     dbus-1                    >= $DBUS_REQUIRED
-                                     dbus-glib-1               >= $DBUS_GLIB_REQUIRED
                                      evolution-plugin-3.0      >= $EVO_REQUIRED
                                      evolution-data-server-1.2 >= $EDS_REQUIRED"
 
@@ -390,8 +377,6 @@ PKG_CHECK_MODULES(TRACKER_MINER_RSS, [$TRACKER_MINER_RSS_REQUIRED],
 
 # Check requirements for tracker-miner-flickr
 TRACKER_MINER_FLICKR_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
-                               dbus-1       >= $DBUS_REQUIRED
-                               dbus-glib-1  >= $DBUS_GLIB_REQUIRED
                                rest-0.6     >= $REST_REQUIRED"
 
 PKG_CHECK_MODULES(TRACKER_MINER_FLICKR, [$TRACKER_MINER_FLICKR_REQUIRED],
@@ -403,9 +388,7 @@ TRACKER_MINER_FLICKR_LIBS="$TRACKER_MINER_FLICKR_LIBS -lz -lm"
 # Check requirements for tracker-utils
 TRACKER_UTILS_REQUIRED="glib-2.0     >= $GLIB_REQUIRED
                         gio-unix-2.0 >= $GLIB_REQUIRED
-                        gthread-2.0  >= $GLIB_REQUIRED
-                        dbus-1       >= $DBUS_REQUIRED
-                        dbus-glib-1  >= $DBUS_GLIB_REQUIRED"
+                        gthread-2.0  >= $GLIB_REQUIRED"
 
 PKG_CHECK_MODULES(TRACKER_UTILS, [$TRACKER_UTILS_REQUIRED])
 
@@ -427,9 +410,7 @@ TRACKER_PREFERENCES_REQUIRED="glib-2.0       >= $GLIB_REQUIRED
                               gio-unix-2.0   >= $GLIB_REQUIRED
                               gthread-2.0    >= $GLIB_REQUIRED
                               gmodule-2.0    >= $GLIB_REQUIRED
-                              gtk+-2.0       >= $GTK_REQUIRED
-                              dbus-1         >= $DBUS_REQUIRED
-                              dbus-glib-1    >= $DBUS_GLIB_REQUIRED"
+                              gtk+-2.0       >= $GTK_REQUIRED"
 
 PKG_CHECK_MODULES(TRACKER_PREFERENCES, [$TRACKER_PREFERENCES_REQUIRED],
                   [have_tracker_preferences=yes],
@@ -441,9 +422,7 @@ TRACKER_STATUS_ICON_REQUIRED="glib-2.0       >= $GLIB_REQUIRED
                               gthread-2.0    >= $GLIB_REQUIRED
                               gmodule-2.0    >= $GLIB_REQUIRED
                               gtk+-2.0       >= $GTK_REQUIRED
-                              pango          >= $PANGO_REQUIRED
-                              dbus-1         >= $DBUS_REQUIRED
-                              dbus-glib-1    >= $DBUS_GLIB_REQUIRED"
+                              pango          >= $PANGO_REQUIRED"
 
 PKG_CHECK_MODULES(TRACKER_STATUS_ICON, [$TRACKER_STATUS_ICON_REQUIRED],
                   [have_tracker_status_icon=yes],
@@ -459,8 +438,6 @@ TRACKER_SEARCH_BAR_REQUIRED="glib-2.0       >= $GLIB_REQUIRED
                              gtk+-2.0       >= $GTK_REQUIRED
                              gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED
                              pango          >= $PANGO_REQUIRED
-                             dbus-1         >= $DBUS_REQUIRED
-                             dbus-glib-1    >= $DBUS_GLIB_REQUIRED
 			     gee-1.0        >= $GEE_REQUIRED
                              libpanelapplet-2.0"
 
@@ -473,8 +450,6 @@ TRACKER_NAUTILUS_EXTENSION_REQUIRED="glib-2.0       >= $GLIB_REQUIRED
                                      gio-unix-2.0   >= $GLIB_REQUIRED
                                      gthread-2.0    >= $GLIB_REQUIRED
                                      gtk+-2.0       >= $GTK_REQUIRED
-                                     dbus-1         >= $DBUS_REQUIRED
-                                     dbus-glib-1    >= $DBUS_GLIB_REQUIRED
                                      libnautilus-extension"
 
 PKG_CHECK_MODULES(TRACKER_NAUTILUS_EXTENSION, [$TRACKER_NAUTILUS_EXTENSION_REQUIRED],
diff --git a/src/libtracker-client/tracker.c b/src/libtracker-client/tracker.c
index d0c6403..3ff2564 100644
--- a/src/libtracker-client/tracker.c
+++ b/src/libtracker-client/tracker.c
@@ -44,6 +44,13 @@
 #include "tracker-resources-glue.h"
 #include "tracker-statistics-glue.h"
 
+/* Size of buffers used when sending data over a pipe, using DBus FD passing */
+/* NOTE: This was copied here from libtracker-common/tracker-dbus.h
+ * because it is only needed in one place now, tracker-miner-fs and
+ * libtracker-client is going to be deprecated fairly soon, -mr.
+ */
+#define TRACKER_DBUS_PIPE_BUFFER_SIZE     65536
+
 /* Are defined in src/tracker-store/tracker-steroids.h */
 #define TRACKER_STEROIDS_BUFFER_SIZE      65536
 
diff --git a/src/libtracker-common/Makefile.am b/src/libtracker-common/Makefile.am
index b230a58..3e0167a 100644
--- a/src/libtracker-common/Makefile.am
+++ b/src/libtracker-common/Makefile.am
@@ -37,6 +37,7 @@ libtracker_common_la_SOURCES =                         \
 	tracker-config-file.c                          \
 	tracker-date-time.c                            \
 	tracker-dbus.c                                 \
+	tracker-dbus-glib.c                            \
 	tracker-file-utils.c                           \
 	tracker-ioprio.c                               \
 	tracker-keyfile-object.c                       \
@@ -49,6 +50,7 @@ libtracker_common_la_SOURCES =                         \
 noinst_HEADERS =                                       \
 	$(power_headers)                               \
 	tracker-dbus.h                                 \
+	tracker-dbus-glib.h                            \
 	tracker-ioprio.h                               \
 	tracker-log.h                                  \
 	tracker-os-dependant.h                         \
diff --git a/src/libtracker-common/tracker-dbus-glib.c b/src/libtracker-common/tracker-dbus-glib.c
new file mode 100644
index 0000000..951600f
--- /dev/null
+++ b/src/libtracker-common/tracker-dbus-glib.c
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2008, Nokia <ivan frade nokia com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA  02110-1301, USA.
+ */
+
+#include "config.h"
+
+#include <dbus/dbus-glib-bindings.h>
+
+#include "tracker-dbus-glib.h"
+
+TrackerDBusRequest *
+tracker_dbus_g_request_begin (DBusGMethodInvocation *context,
+                              const gchar           *format,
+                              ...)
+{
+	TrackerDBusRequest *request;
+	gchar *str, *sender;
+	va_list args;
+
+	va_start (args, format);
+	str = g_strdup_vprintf (format, args);
+	va_end (args);
+
+	sender = dbus_g_method_get_sender (context);
+
+	request = tracker_dbus_request_begin (sender, "%s", str);
+
+	g_free (sender);
+
+	g_free (str);
+
+	return request;
+}
diff --git a/src/libtracker-common/tracker-dbus-glib.h b/src/libtracker-common/tracker-dbus-glib.h
new file mode 100644
index 0000000..ec58441
--- /dev/null
+++ b/src/libtracker-common/tracker-dbus-glib.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2008, Nokia <ivan frade nokia com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA  02110-1301, USA.
+ */
+
+#ifndef __LIBTRACKER_COMMON_DBUS_GLIB_H__
+#define __LIBTRACKER_COMMON_DBUS_GLIB_H__
+
+#include <dbus/dbus.h>
+#include <dbus/dbus-glib-lowlevel.h>
+#include <dbus/dbus-glib.h>
+
+#include "tracker-dbus.h"
+
+G_BEGIN_DECLS
+
+#define tracker_dbus_async_return_if_fail(expr,context)	\
+	G_STMT_START { \
+		if G_LIKELY(expr) { } else { \
+			GError *assert_error = NULL; \
+	  \
+			g_set_error (&assert_error, \
+			             TRACKER_DBUS_ERROR, \
+			             TRACKER_DBUS_ERROR_ASSERTION_FAILED, \
+			             _("Assertion `%s' failed"), \
+			             #expr); \
+	  \
+			dbus_g_method_return_error (context, assert_error); \
+			g_clear_error (&assert_error); \
+	  \
+			return; \
+		}; \
+	} G_STMT_END
+
+#define tracker_dbus_return_val_if_fail(expr,val,error)	\
+	G_STMT_START { \
+		if G_LIKELY(expr) { } else { \
+			g_set_error (error, \
+			             TRACKER_DBUS_ERROR, \
+			             TRACKER_DBUS_ERROR_ASSERTION_FAILED, \
+			             _("Assertion `%s' failed"), \
+			             #expr); \
+	  \
+			return val; \
+		}; \
+	} G_STMT_END
+
+/* dbus-glib convenience API */
+TrackerDBusRequest *tracker_dbus_g_request_begin       (DBusGMethodInvocation      *context,
+                                                        const gchar                *format,
+                                                        ...);
+
+G_END_DECLS
+
+#endif /* __LIBTRACKER_COMMON_DBUS_GLIB_H__ */
diff --git a/src/libtracker-common/tracker-dbus.c b/src/libtracker-common/tracker-dbus.c
index 25f01ad..7ac6d77 100644
--- a/src/libtracker-common/tracker-dbus.c
+++ b/src/libtracker-common/tracker-dbus.c
@@ -429,27 +429,3 @@ tracker_g_dbus_request_begin (GDBusMethodInvocation *invocation,
 
 	return request;
 }
-
-TrackerDBusRequest *
-tracker_dbus_g_request_begin (DBusGMethodInvocation *context,
-                              const gchar           *format,
-                              ...)
-{
-	TrackerDBusRequest *request;
-	gchar *str, *sender;
-	va_list args;
-
-	va_start (args, format);
-	str = g_strdup_vprintf (format, args);
-	va_end (args);
-
-	sender = dbus_g_method_get_sender (context);
-
-	request = tracker_dbus_request_begin (sender, "%s", str);
-
-	g_free (sender);
-
-	g_free (str);
-
-	return request;
-}
diff --git a/src/libtracker-common/tracker-dbus.h b/src/libtracker-common/tracker-dbus.h
index 87fef09..be639e4 100644
--- a/src/libtracker-common/tracker-dbus.h
+++ b/src/libtracker-common/tracker-dbus.h
@@ -24,10 +24,6 @@
 
 #include <gio/gio.h>
 
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib.h>
-
 G_BEGIN_DECLS
 
 #if !defined (__LIBTRACKER_COMMON_INSIDE__) && !defined (TRACKER_COMPILATION)
@@ -60,25 +56,6 @@ G_BEGIN_DECLS
 #define TRACKER_TYPE_G_STRV_ARRAY	\
 	dbus_g_type_get_collection ("GPtrArray", G_TYPE_STRV)
 
-#define tracker_dbus_async_return_if_fail(expr,context)	\
-	G_STMT_START { \
-		if G_LIKELY(expr) { } else { \
-			GError *assert_error = NULL; \
-	  \
-			g_set_error (&assert_error, \
-			             TRACKER_DBUS_ERROR, \
-			             TRACKER_DBUS_ERROR_ASSERTION_FAILED, \
-			             _("Assertion `%s' failed"), \
-			             #expr); \
-	  \
-			dbus_g_method_return_error (context, assert_error); \
-			g_clear_error (&assert_error); \
-	  \
-			return; \
-		}; \
-	} G_STMT_END
-
-
 #define tracker_gdbus_async_return_if_fail(expr,invocation)	\
 	G_STMT_START { \
 		if G_LIKELY(expr) { } else { \
@@ -97,26 +74,6 @@ G_BEGIN_DECLS
 		}; \
 	} G_STMT_END
 
-#define tracker_dbus_return_val_if_fail(expr,val,error)	\
-	G_STMT_START { \
-		if G_LIKELY(expr) { } else { \
-			g_set_error (error, \
-			             TRACKER_DBUS_ERROR, \
-			             TRACKER_DBUS_ERROR_ASSERTION_FAILED, \
-			             _("Assertion `%s' failed"), \
-			             #expr); \
-	  \
-			return val; \
-		}; \
-	} G_STMT_END
-
-/* Size of buffers used when sending data over a pipe, using DBus FD passing */
-#define TRACKER_DBUS_PIPE_BUFFER_SIZE 65536
-
-#define TRACKER_DBUS_SERVICE_EXTRACT   "org.freedesktop.Tracker1.Extract"
-#define TRACKER_DBUS_PATH_EXTRACT      "/org/freedesktop/Tracker1/Extract"
-#define TRACKER_DBUS_INTERFACE_EXTRACT "org.freedesktop.Tracker1.Extract"
-
 typedef struct _TrackerDBusRequest TrackerDBusRequest;
 
 typedef enum {
@@ -159,11 +116,6 @@ TrackerDBusRequest *tracker_g_dbus_request_begin       (GDBusMethodInvocation
                                                         const gchar                *format,
                                                         ...);
 
-/* dbus-glib convenience API */
-TrackerDBusRequest *tracker_dbus_g_request_begin       (DBusGMethodInvocation      *context,
-                                                        const gchar                *format,
-                                                        ...);
-
 G_END_DECLS
 
 #endif /* __LIBTRACKER_COMMON_DBUS_H__ */
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index c92600c..f7d5645 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -30,8 +30,6 @@
 
 #include <glib/gstdio.h>
 
-#include <libtracker-common/tracker-common.h>
-
 #if HAVE_TRACKER_FTS
 #include <libtracker-fts/tracker-fts.h>
 #endif
diff --git a/src/libtracker-data/tracker-data-query.c b/src/libtracker-data/tracker-data-query.c
index d2161a9..47cf9c9 100644
--- a/src/libtracker-data/tracker-data-query.c
+++ b/src/libtracker-data/tracker-data-query.c
@@ -25,8 +25,6 @@
 #include <string.h>
 #include <stdlib.h>
 
-#include <libtracker-common/tracker-common.h>
-
 #include "tracker-class.h"
 #include "tracker-data-manager.h"
 #include "tracker-data-query.h"
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index 75c5990..4441f46 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -24,7 +24,6 @@
 #include <stdlib.h>
 #include <time.h>
 
-#include <libtracker-common/tracker-common.h>
 #include <libtracker-common/tracker-date-time.h>
 #include <libtracker-common/tracker-file-utils.h>
 #include <libtracker-common/tracker-ontologies.h>
diff --git a/src/libtracker-data/tracker-db-dbus.c b/src/libtracker-data/tracker-db-dbus.c
index b99c63c..8628010 100644
--- a/src/libtracker-data/tracker-db-dbus.c
+++ b/src/libtracker-data/tracker-db-dbus.c
@@ -20,8 +20,6 @@
 
 #include <string.h>
 
-#include <libtracker-common/tracker-dbus.h>
-
 #include "tracker-db-dbus.h"
 
 gchar **
diff --git a/src/libtracker-data/tracker-db-interface-sqlite.c b/src/libtracker-data/tracker-db-interface-sqlite.c
index c446cad..adb7de6 100644
--- a/src/libtracker-data/tracker-db-interface-sqlite.c
+++ b/src/libtracker-data/tracker-db-interface-sqlite.c
@@ -26,7 +26,7 @@
 #include <math.h>
 #include <errno.h>
 
-#include <libtracker-common/tracker-common.h>
+#include <libtracker-common/tracker-locale.h>
 
 #include <libtracker-sparql/tracker-sparql.h>
 
diff --git a/src/libtracker-extract/tracker-guarantee.c b/src/libtracker-extract/tracker-guarantee.c
index 053a9a2..e757395 100644
--- a/src/libtracker-extract/tracker-guarantee.c
+++ b/src/libtracker-extract/tracker-guarantee.c
@@ -23,7 +23,8 @@
 
 #include <glib.h>
 
-#include <libtracker-common/tracker-common.h>
+#include <libtracker-common/tracker-file-utils.h>
+#include <libtracker-common/tracker-date-time.h>
 
 #include "tracker-guarantee.h"
 
diff --git a/src/libtracker-fts/tracker-fts.c b/src/libtracker-fts/tracker-fts.c
index 4d1f62a..02ed3ec 100644
--- a/src/libtracker-fts/tracker-fts.c
+++ b/src/libtracker-fts/tracker-fts.c
@@ -279,7 +279,7 @@
 #include <ctype.h>
 #include <sqlite3.h>
 
-#include <libtracker-common/tracker-common.h>
+#include <libtracker-common/tracker-language.h>
 #include <libtracker-data/tracker-db-manager.h>
 
 #include "tracker-fts.h"
diff --git a/src/libtracker-fts/tracker-parser-utils.c b/src/libtracker-fts/tracker-parser-utils.c
index 76a8ecb..dec5977 100644
--- a/src/libtracker-fts/tracker-parser-utils.c
+++ b/src/libtracker-fts/tracker-parser-utils.c
@@ -21,7 +21,8 @@
 
 #include <string.h>
 
-#include <libtracker-common/tracker-common.h>
+#include <libtracker-common/tracker-utils.h>
+
 #include "tracker-parser-utils.h"
 
 /*
diff --git a/src/libtracker-miner/tracker-miner-dbus.h b/src/libtracker-miner/tracker-miner-dbus.h
index fd090b4..cddc9ae 100644
--- a/src/libtracker-miner/tracker-miner-dbus.h
+++ b/src/libtracker-miner/tracker-miner-dbus.h
@@ -25,7 +25,6 @@
 #endif
 
 #include <glib-object.h>
-#include <dbus/dbus-glib-bindings.h>
 
 #include "tracker-miner-object.h"
 
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index 63ac81d..6539bd7 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -34,11 +34,7 @@
 #include <gio/gunixfdlist.h>
 #include <gio/gunixinputstream.h>
 
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus.h>
-
 #include <libtracker-common/tracker-date-time.h>
-#include <libtracker-common/tracker-dbus.h>
 #include <libtracker-common/tracker-ontologies.h>
 #include <libtracker-common/tracker-power.h>
 #include <libtracker-common/tracker-type-utils.h>
@@ -51,6 +47,13 @@
 #include "tracker-config.h"
 #include "tracker-marshal.h"
 
+/* Size of buffers used when sending data over a pipe, using DBus FD passing */
+#define DBUS_PIPE_BUFFER_SIZE      65536
+
+#define DBUS_SERVICE_EXTRACT       "org.freedesktop.Tracker1.Extract"
+#define DBUS_PATH_EXTRACT          "/org/freedesktop/Tracker1/Extract"
+#define DBUS_INTERFACE_EXTRACT     "org.freedesktop.Tracker1.Extract"
+
 #define DISK_SPACE_CHECK_FREQUENCY 10
 #define SECONDS_PER_DAY 86400
 
@@ -2068,7 +2071,7 @@ dbus_send_and_splice_async (GDBusConnection                  *connection,
 
 	unix_input_stream = g_unix_input_stream_new (fd, TRUE);
 	buffered_input_stream = g_buffered_input_stream_new_sized (unix_input_stream,
-	                                                           TRACKER_DBUS_PIPE_BUFFER_SIZE);
+	                                                           DBUS_PIPE_BUFFER_SIZE);
 	output_stream = g_memory_output_stream_new (NULL, 0, g_realloc, NULL);
 
 	data = send_and_splice_data_new (unix_input_stream,
@@ -2174,9 +2177,9 @@ get_metadata_fast_async (GDBusConnection *connection,
 		return;
 	}
 
-	message = g_dbus_message_new_method_call (TRACKER_DBUS_SERVICE_EXTRACT,
-	                                          TRACKER_DBUS_PATH_EXTRACT,
-	                                          TRACKER_DBUS_INTERFACE_EXTRACT,
+	message = g_dbus_message_new_method_call (DBUS_SERVICE_EXTRACT,
+	                                          DBUS_PATH_EXTRACT,
+	                                          DBUS_INTERFACE_EXTRACT,
 	                                          "GetMetadataFast");
 
 	fd_list = g_unix_fd_list_new ();
diff --git a/src/miners/rss/tracker-miner-rss.c b/src/miners/rss/tracker-miner-rss.c
index 139bd19..cba200a 100644
--- a/src/miners/rss/tracker-miner-rss.c
+++ b/src/miners/rss/tracker-miner-rss.c
@@ -24,7 +24,7 @@
 
 #include <libgrss.h>
 
-#include <dbus/dbus-glib.h>
+#include <libtracker-common/tracker-dbus-glib.h>
 
 #include <glib/gi18n.h>
 
diff --git a/src/tracker-control/Makefile.am b/src/tracker-control/Makefile.am
index be65013..80d97d2 100644
--- a/src/tracker-control/Makefile.am
+++ b/src/tracker-control/Makefile.am
@@ -10,7 +10,6 @@ AM_CPPFLAGS =                                          \
 bin_PROGRAMS = tracker-control
 
 tracker_control_SOURCES =                              \
-	$(dbus_sources)                                \
 	tracker-control.c
 
 tracker_control_LDADD =                                \
@@ -20,14 +19,3 @@ tracker_control_LDADD =                                \
 	$(top_builddir)/src/libtracker-common/libtracker-common.la \
 	$(BUILD_LIBS)                                  \
 	$(TRACKER_CONTROL_LIBS)
-
-dbus_sources =                                         \
-	tracker-miner-files-index-client.h
-
-%-client.h: $(top_srcdir)/data/dbus/%.xml
-	$(AM_V_GEN)$(DBUSBINDINGTOOL) --mode=glib-client --output=$@ --prefix=$(subst -,_,$*) $^
-
-BUILT_SOURCES =                                        \
-	$(dbus_sources)
-
-CLEANFILES = $(BUILT_SOURCES)
diff --git a/src/tracker-control/tracker-control.c b/src/tracker-control/tracker-control.c
index 51027d3..c3714bc 100644
--- a/src/tracker-control/tracker-control.c
+++ b/src/tracker-control/tracker-control.c
@@ -33,12 +33,12 @@
 #include <glib/gstdio.h>
 
 #include <libtracker-common/tracker-common.h>
+
 #include <libtracker-data/tracker-db-config.h>
 #include <libtracker-data/tracker-db-journal.h>
 #include <libtracker-data/tracker-db-manager.h>
-#include <libtracker-miner/tracker-miner.h>
 
-#include "tracker-miner-files-index-client.h"
+#include <libtracker-miner/tracker-miner.h>
 
 #define ABOUT	  \
 	"Tracker " PACKAGE_VERSION "\n"
diff --git a/src/tracker-extract/tracker-extract.h b/src/tracker-extract/tracker-extract.h
index dbe7256..9cc0132 100644
--- a/src/tracker-extract/tracker-extract.h
+++ b/src/tracker-extract/tracker-extract.h
@@ -22,9 +22,6 @@
 
 #include <glib-object.h>
 
-#include <dbus/dbus-glib-bindings.h>
-#include <dbus/dbus.h>
-
 #define TRACKER_EXTRACT_SERVICE        "org.freedesktop.Tracker1.Extract"
 #define TRACKER_EXTRACT_PATH           "/org/freedesktop/Tracker1/Extract"
 #define TRACKER_EXTRACT_INTERFACE      "org.freedesktop.Tracker1.Extract"
diff --git a/src/tracker-store/tracker-backup.c b/src/tracker-store/tracker-backup.c
index d597c57..8a00299 100644
--- a/src/tracker-store/tracker-backup.c
+++ b/src/tracker-store/tracker-backup.c
@@ -22,7 +22,7 @@
 #include <glib-object.h>
 #include <glib/gstdio.h>
 
-#include <libtracker-common/tracker-dbus.h>
+#include <libtracker-common/tracker-dbus-glib.h>
 
 #include <libtracker-data/tracker-data-backup.h>
 #include <libtracker-data/tracker-data-update.h>
diff --git a/src/tracker-store/tracker-resources.c b/src/tracker-store/tracker-resources.c
index b81721f..b3697b4 100644
--- a/src/tracker-store/tracker-resources.c
+++ b/src/tracker-store/tracker-resources.c
@@ -23,7 +23,7 @@
 #include <string.h>
 #include <gio/gio.h>
 
-#include <libtracker-common/tracker-dbus.h>
+#include <libtracker-common/tracker-dbus-glib.h>
 #include <libtracker-common/tracker-log.h>
 #include <libtracker-common/tracker-utils.h>
 #include <libtracker-common/tracker-type-utils.h>
diff --git a/src/tracker-store/tracker-statistics.c b/src/tracker-store/tracker-statistics.c
index d44d57d..4329394 100644
--- a/src/tracker-store/tracker-statistics.c
+++ b/src/tracker-store/tracker-statistics.c
@@ -25,7 +25,7 @@
 #include <string.h>
 
 #include <libtracker-common/tracker-log.h>
-#include <libtracker-common/tracker-dbus.h>
+#include <libtracker-common/tracker-dbus-glib.h>
 
 #include <libtracker-data/tracker-data.h>
 #include <libtracker-data/tracker-db-dbus.h>
diff --git a/src/tracker-store/tracker-status.c b/src/tracker-store/tracker-status.c
index 5567644..f8dc13a 100644
--- a/src/tracker-store/tracker-status.c
+++ b/src/tracker-store/tracker-status.c
@@ -24,7 +24,7 @@
 
 #include <string.h>
 
-#include <libtracker-common/tracker-dbus.h>
+#include <libtracker-common/tracker-dbus-glib.h>
 
 #include "tracker-dbus.h"
 #include "tracker-status.h"
diff --git a/src/tracker-store/tracker-steroids.h b/src/tracker-store/tracker-steroids.h
index 4021e1d..1968a07 100644
--- a/src/tracker-store/tracker-steroids.h
+++ b/src/tracker-store/tracker-steroids.h
@@ -22,6 +22,8 @@
 
 #include <glib-object.h>
 
+#include <libtracker-common/tracker-dbus-glib.h>
+
 #define TRACKER_STEROIDS_SERVICE   "org.freedesktop.Tracker1"
 #define TRACKER_STEROIDS_PATH      "/org/freedesktop/Tracker1/Steroids"
 #define TRACKER_STEROIDS_INTERFACE "org.freedesktop.Tracker1.Steroids"
diff --git a/src/tracker-writeback/tracker-writeback-dispatcher.c b/src/tracker-writeback/tracker-writeback-dispatcher.c
index ac3d329..f8663b9 100644
--- a/src/tracker-writeback/tracker-writeback-dispatcher.c
+++ b/src/tracker-writeback/tracker-writeback-dispatcher.c
@@ -17,7 +17,9 @@
  * Boston, MA  02110-1301, USA.
  */
 
-#include <libtracker-common/tracker-dbus.h>
+#include "config.h"
+
+#include <libtracker-common/tracker-dbus-glib.h>
 
 #include "tracker-writeback-dispatcher.h"
 #include "tracker-writeback-dbus.h"
diff --git a/tests/libtracker-common/tracker-dbus-test.c b/tests/libtracker-common/tracker-dbus-test.c
index 730e464..bce3df8 100644
--- a/tests/libtracker-common/tracker-dbus-test.c
+++ b/tests/libtracker-common/tracker-dbus-test.c
@@ -16,10 +16,14 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA  02110-1301, USA.
  */
+
+#include <stdlib.h>
+
 #include <glib.h>
 #include <gio/gio.h>
-#include <libtracker-common/tracker-dbus.h>
-#include <stdlib.h>
+
+#include <libtracker-common/tracker-dbus-glib.h>
+
 #include <tracker-test-helpers.h>
 
 static void



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