[tracker/rss-enclosures] class-signals: Fixed example CFLAGS/LIBS and removed unnecessary #defines in test
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/rss-enclosures] class-signals: Fixed example CFLAGS/LIBS and removed unnecessary #defines in test
- Date: Wed, 24 Nov 2010 02:17:29 +0000 (UTC)
commit 063537c0297b481138fad1cc5a0dd7214ed02cf8
Author: Martyn Russell <martyn lanedo com>
Date: Mon Oct 25 16:29:12 2010 +0100
class-signals: Fixed example CFLAGS/LIBS and removed unnecessary #defines in test
examples/class-signal/Makefile.am | 17 ++++++-----------
examples/class-signal/class-signal.c | 17 +++++++----------
2 files changed, 13 insertions(+), 21 deletions(-)
---
diff --git a/examples/class-signal/Makefile.am b/examples/class-signal/Makefile.am
index 6c96931..d7ef1a8 100644
--- a/examples/class-signal/Makefile.am
+++ b/examples/class-signal/Makefile.am
@@ -1,20 +1,15 @@
include $(top_srcdir)/Makefile.decl
INCLUDES = \
- $(BUILD_CFLAGS) \
- -I$(top_srcdir)/src \
- $(DBUS_CFLAGS) \
- $(GLIB2_CFLAGS) \
- $(GIO_CFLAGS) \
- $(GTHREAD_CFLAGS)
+ $(BUILD_CFLAGS) \
+ -I$(top_srcdir)/src \
+ $(LIBTRACKER_SPARQL_CFLAGS)
noinst_PROGRAMS = class-signal
class_signal_SOURCES = class-signal.c
-class_signal_LDADD = \
+class_signal_LDADD = \
$(top_builddir)/src/libtracker-sparql/libtracker-sparql-$(TRACKER_API_VERSION).la \
- $(BUILD_LIBS) \
- $(GIO_LIBS) \
- $(GLIB2_LIBS) \
- $(DBUS_LIBS)
+ $(BUILD_LIBS) \
+ $(LIBTRACKER_SPARQL_LIBS)
diff --git a/examples/class-signal/class-signal.c b/examples/class-signal/class-signal.c
index e2263a8..de36281 100644
--- a/examples/class-signal/class-signal.c
+++ b/examples/class-signal/class-signal.c
@@ -22,14 +22,11 @@
#include <libtracker-sparql/tracker-sparql.h>
-#define TRACKER_SERVICE "org.freedesktop.Tracker1"
-#define TRACKER_RESOURCES_OBJECT "/org/freedesktop/Tracker1/Resources"
-#define TRACKER_INTERFACE_RESOURCES "org.freedesktop.Tracker1.Resources"
-
-#define DBUS_MATCH_STR "type='signal', " \
- "sender='" TRACKER_SERVICE "', " \
- "path='" TRACKER_RESOURCES_OBJECT "', " \
- "interface='" TRACKER_INTERFACE_RESOURCES "'"
+#define DBUS_MATCH_STR \
+ "type='signal', " \
+ "sender='" TRACKER_DBUS_SERVICE "', " \
+ "path='" TRACKER_DBUS_OBJECT_RESOURCES "', " \
+ "interface='" TRACKER_DBUS_INTERFACE_RESOURCES "'"
static TrackerSparqlConnection *con;
@@ -94,7 +91,7 @@ class_signal_cb (DBusMessage *message)
static DBusHandlerResult
message_filter (DBusConnection *connection, DBusMessage *message, gpointer ud)
{
- if (dbus_message_is_signal (message, TRACKER_INTERFACE_RESOURCES, "GraphUpdated")) {
+ if (dbus_message_is_signal (message, TRACKER_DBUS_INTERFACE_RESOURCES, "GraphUpdated")) {
class_signal_cb (message);
return DBUS_HANDLER_RESULT_HANDLED;
}
@@ -113,7 +110,7 @@ main (gint argc, gchar *argv[])
loop = g_main_loop_new (NULL, FALSE);
con = tracker_sparql_connection_get (NULL, &error);
connection = dbus_bus_get_private (DBUS_BUS_SESSION, NULL);
- dbus_bus_request_name (connection, TRACKER_SERVICE, 0, NULL);
+ dbus_bus_request_name (connection, TRACKER_DBUS_SERVICE, 0, NULL);
dbus_connection_add_filter (connection, message_filter, NULL, NULL);
dbus_bus_add_match (connection, DBUS_MATCH_STR, NULL);
dbus_connection_setup_with_g_main (connection, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]