[tracker/libtracker-bus: 21/52] libtracker-bus: Fixed compilation without FD PASSING enabled
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/libtracker-bus: 21/52] libtracker-bus: Fixed compilation without FD PASSING enabled
- Date: Fri, 13 Aug 2010 08:24:01 +0000 (UTC)
commit b9244e73844a92ef1f419005c77e027babd53e9e
Author: Martyn Russell <martyn lanedo com>
Date: Thu Jul 22 10:28:33 2010 +0100
libtracker-bus: Fixed compilation without FD PASSING enabled
src/libtracker-bus/Makefile.am | 6 ++++++
src/libtracker-bus/config.vapi | 2 +-
src/libtracker-bus/tracker-bus-fd-cursor.c | 19 ++-----------------
src/libtracker-bus/tracker-bus.vala | 7 ++++++-
4 files changed, 15 insertions(+), 19 deletions(-)
---
diff --git a/src/libtracker-bus/Makefile.am b/src/libtracker-bus/Makefile.am
index d8bf09b..49c9986 100644
--- a/src/libtracker-bus/Makefile.am
+++ b/src/libtracker-bus/Makefile.am
@@ -13,6 +13,12 @@ INCLUDES = \
$(GLIB2_CFLAGS) \
$(GCOV_CFLAGS)
+if HAVE_DBUS_FD_PASSING
+INCLUDES += -DHAVE_DBUS_FD_PASSING_IN_VALA=\"1\"
+else
+INCLUDES += -DHAVE_DBUS_FD_PASSING_IN_VALA=\"0\"
+endif
+
modules_LTLIBRARIES = libtracker-bus.la
libtracker_bus_la_VALASOURCES = \
diff --git a/src/libtracker-bus/config.vapi b/src/libtracker-bus/config.vapi
index 992951e..3c95394 100644
--- a/src/libtracker-bus/config.vapi
+++ b/src/libtracker-bus/config.vapi
@@ -19,5 +19,5 @@
[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")]
namespace Config {
- public const bool HAVE_DBUS_FD_PASSING;
+ public const bool HAVE_DBUS_FD_PASSING_IN_VALA;
}
diff --git a/src/libtracker-bus/tracker-bus-fd-cursor.c b/src/libtracker-bus/tracker-bus-fd-cursor.c
index de3784f..5c7721b 100644
--- a/src/libtracker-bus/tracker-bus-fd-cursor.c
+++ b/src/libtracker-bus/tracker-bus-fd-cursor.c
@@ -1,5 +1,4 @@
/*
- * Copyright (C) 2006, Jamie McCracken <jamiemcc gnome org>
* Copyright (C) 2008-2010, Nokia <ivan frade nokia com>
* Copyright (C) 2010, Codeminded BVBA <abustany gnome org>
*
@@ -220,8 +219,6 @@ tracker_bus_fd_cursor_finalize (GObject *object)
G_OBJECT_CLASS (tracker_bus_fd_cursor_parent_class)->finalize (object);
}
-#endif /* HAVE_DBUS_FD_PASSING */
-
/* Public API */
TrackerSparqlCursor *
@@ -229,7 +226,6 @@ tracker_bus_fd_query (DBusGConnection *gconnection,
const gchar *query,
GError **error)
{
-#ifdef HAVE_DBUS_FD_PASSING
DBusConnection *connection;
DBusMessage *message;
DBusMessageIter iter;
@@ -275,10 +271,6 @@ tracker_bus_fd_query (DBusGConnection *gconnection,
cursor = NULL;
}
return TRACKER_SPARQL_CURSOR (cursor);
-#else /* HAVE_DBUS_FD_PASSING */
- g_assert_not_reached ();
- return NULL;
-#endif /* HAVE_DBUS_FD_PASSING */
}
static void
@@ -314,7 +306,6 @@ tracker_bus_fd_query_async (DBusGConnection *gconnection,
GAsyncReadyCallback callback,
gpointer user_data)
{
-#ifdef HAVE_DBUS_FD_PASSING
GSimpleAsyncResult *res;
DBusConnection *connection;
DBusMessage *message;
@@ -357,16 +348,12 @@ tracker_bus_fd_query_async (DBusGConnection *gconnection,
NULL,
query_async_cb, res);
/* message is destroyed by tracker_dbus_send_and_splice_async */
-#else /* HAVE_DBUS_FD_PASSING */
- g_assert_not_reached ();
-#endif /* HAVE_DBUS_FD_PASSING */
}
TrackerSparqlCursor *
tracker_bus_fd_query_finish (GAsyncResult *res,
GError **error)
{
-#ifdef HAVE_DBUS_FD_PASSING
g_return_val_if_fail (res != NULL, NULL);
if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (res), error)) {
@@ -374,8 +361,6 @@ tracker_bus_fd_query_finish (GAsyncResult *res,
}
return g_object_ref (g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (res)));
-#else /* HAVE_DBUS_FD_PASSING */
- g_assert_not_reached ();
- return NULL;
-#endif /* HAVE_DBUS_FD_PASSING */
}
+
+#endif /* HAVE_DBUS_FD_PASSING */
diff --git a/src/libtracker-bus/tracker-bus.vala b/src/libtracker-bus/tracker-bus.vala
index 4847e28..ff3e0bf 100644
--- a/src/libtracker-bus/tracker-bus.vala
+++ b/src/libtracker-bus/tracker-bus.vala
@@ -57,7 +57,12 @@ public class Tracker.Bus.Connection : Tracker.Sparql.Connection {
initialized = true;
try {
- use_steroids = Config.HAVE_DBUS_FD_PASSING;
+ if (Config.HAVE_DBUS_FD_PASSING_IN_VALA) {
+ use_steroids = true;
+ } else {
+ use_steroids = false;
+ }
+ critical ("use steroids = %s", use_steroids ? "yes" : "no");
connection = DBus.Bus.get (DBus.BusType.SESSION);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]