[tracker/gdbus-porting] tracker-extract: GDBus porting
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/gdbus-porting] tracker-extract: GDBus porting
- Date: Fri, 31 Dec 2010 14:46:04 +0000 (UTC)
commit 8934282dedb64ee559aa2c1a51d1131e1c5e2238
Author: Philip Van Hoof <philip codeminded be>
Date: Fri Dec 31 15:45:18 2010 +0100
tracker-extract: GDBus porting
src/libtracker-common/tracker-dbus.c | 25 ++
src/libtracker-common/tracker-dbus.h | 5 +
src/tracker-extract/Makefile.am | 11 +-
src/tracker-extract/tracker-extract-gstreamer.c | 1 -
src/tracker-extract/tracker-extract-mp3.c | 1 -
src/tracker-extract/tracker-extract.c | 339 ++++++++++++++++-------
src/tracker-extract/tracker-extract.h | 14 +-
src/tracker-extract/tracker-main.c | 26 +--
8 files changed, 275 insertions(+), 147 deletions(-)
---
diff --git a/src/libtracker-common/tracker-dbus.c b/src/libtracker-common/tracker-dbus.c
index 34e02a1..4cbc543 100644
--- a/src/libtracker-common/tracker-dbus.c
+++ b/src/libtracker-common/tracker-dbus.c
@@ -589,6 +589,31 @@ tracker_dbus_request_debug (gint request_id,
}
void
+tracker_gdbus_request_debug (gint request_id,
+ GDBusMethodInvocation *invocation,
+ const gchar *format,
+ ...)
+{
+ ClientData *cd;
+ gchar *str;
+ va_list args;
+
+ va_start (args, format);
+ str = g_strdup_vprintf (format, args);
+ va_end (args);
+
+ cd = client_get_for_invocation (invocation);
+
+ g_debug ("---- [%d%s%s|%lu] %s",
+ request_id,
+ cd ? "|" : "",
+ cd ? cd->binary : "",
+ cd ? cd->pid : 0,
+ str);
+ g_free (str);
+}
+
+void
tracker_dbus_enable_client_lookup (gboolean enabled)
{
/* If this changed and we disabled everything, simply shut it
diff --git a/src/libtracker-common/tracker-dbus.h b/src/libtracker-common/tracker-dbus.h
index add3c6b..5bbe55d 100644
--- a/src/libtracker-common/tracker-dbus.h
+++ b/src/libtracker-common/tracker-dbus.h
@@ -183,10 +183,15 @@ void tracker_dbus_request_info (gint
DBusGMethodInvocation *context,
const gchar *format,
...);
+
void tracker_dbus_request_debug (gint request_id,
DBusGMethodInvocation *context,
const gchar *format,
...);
+void tracker_gdbus_request_debug (gint request_id,
+ GDBusMethodInvocation *invocation,
+ const gchar *format,
+ ...);
void tracker_dbus_enable_client_lookup (gboolean enable);
diff --git a/src/tracker-extract/Makefile.am b/src/tracker-extract/Makefile.am
index 37ed716..4c69748 100644
--- a/src/tracker-extract/Makefile.am
+++ b/src/tracker-extract/Makefile.am
@@ -335,13 +335,10 @@ libexec_PROGRAMS = tracker-extract
tracker_extract_SOURCES = \
$(marshal_sources) \
- $(dbus_sources) \
tracker-albumart.c \
tracker-albumart.h \
tracker-config.c \
tracker-config.h \
- tracker-dbus.c \
- tracker-dbus.h \
tracker-extract.c \
tracker-extract.h \
tracker-read.c \
@@ -384,8 +381,6 @@ marshal_sources = \
tracker-marshal.h \
tracker-marshal.c
-dbus_sources = tracker-extract-glue.h
-
tracker-marshal.h: tracker-marshal.list
$(AM_V_GEN)$(GLIB_GENMARSHAL) $< --prefix=tracker_marshal --header > $@
@@ -393,12 +388,8 @@ tracker-marshal.c: tracker-marshal.list
$(AM_V_GEN)echo "#include \"tracker-marshal.h\"" > $@ && \
$(GLIB_GENMARSHAL) $< --prefix=tracker_marshal --body >> $@
-%-glue.h: $(top_srcdir)/data/dbus/%.xml
- $(AM_V_GEN)$(DBUSBINDINGTOOL) --mode=glib-server --output=$@ --prefix=$(subst -,_,$*) $^
-
BUILT_SOURCES = \
- $(marshal_sources) \
- $(dbus_sources)
+ $(marshal_sources)
CLEANFILES = $(BUILT_SOURCES)
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index 29a0780..a7dd539 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -35,7 +35,6 @@
#include <libtracker-extract/tracker-extract.h>
#include "tracker-albumart.h"
-#include "tracker-dbus.h"
/* We wait this long (seconds) for NULL state before freeing */
#define TRACKER_EXTRACT_GUARD_TIMEOUT 3
diff --git a/src/tracker-extract/tracker-extract-mp3.c b/src/tracker-extract/tracker-extract-mp3.c
index d7dc2d7..14c3b6e 100644
--- a/src/tracker-extract/tracker-extract-mp3.c
+++ b/src/tracker-extract/tracker-extract-mp3.c
@@ -48,7 +48,6 @@
#include <libtracker-extract/tracker-extract.h>
#include "tracker-albumart.h"
-#include "tracker-dbus.h"
/* We mmap the beginning of the file and read separately the last 128
* bytes for id3v1 tags. While these are probably cornercases the
diff --git a/src/tracker-extract/tracker-extract.c b/src/tracker-extract/tracker-extract.c
index bc72b48..e96ef41 100644
--- a/src/tracker-extract/tracker-extract.c
+++ b/src/tracker-extract/tracker-extract.c
@@ -32,7 +32,6 @@
#include <libtracker-extract/tracker-extract.h>
-#include "tracker-dbus.h"
#include "tracker-extract.h"
#include "tracker-main.h"
#include "tracker-marshal.h"
@@ -48,6 +47,21 @@
#define UNKNOWN_METHOD_MESSAGE "Method \"%s\" with signature \"%s\" on " \
"interface \"%s\" doesn't exist, expected \"%s\""
+static const gchar introspection_xml[] =
+ "<node>"
+ " <interface name='org.freedesktop.Tracker1.Extract'>"
+ " <method name='GetPid'>"
+ " <arg type='i' name='value' direction='out' />"
+ " </method>"
+ " <method name='GetMetadata'>"
+ " <arg type='s' name='uri' direction='in' />"
+ " <arg type='s' name='mime' direction='in' />"
+ " <arg type='s' name='preupdate' direction='out' />"
+ " <arg type='s' name='embedded' direction='out' />"
+ " </method>"
+ " </interface>"
+ "</node>";
+
#define TRACKER_EXTRACT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_EXTRACT, TrackerExtractPrivate))
extern gboolean debug;
@@ -58,6 +72,10 @@ typedef struct {
gboolean disable_shutdown;
gboolean force_internal_extractors;
gboolean disable_summary_on_finalize;
+ GDBusConnection *d_connection;
+ GDBusNodeInfo *introspection_data;
+ guint registration_id;
+ guint own_id;
} TrackerExtractPrivate;
typedef struct {
@@ -369,11 +387,11 @@ tracker_extract_new (gboolean disable_shutdown,
static gboolean
get_file_metadata (TrackerExtract *extract,
guint request_id,
- DBusGMethodInvocation *context,
+ GDBusMethodInvocation *invocation,
const gchar *uri,
const gchar *mime,
- TrackerSparqlBuilder **preupdate_out,
- TrackerSparqlBuilder **statements_out)
+ TrackerSparqlBuilder **preupdate_out,
+ TrackerSparqlBuilder **statements_out)
{
TrackerExtractPrivate *priv;
TrackerSparqlBuilder *statements, *preupdate;
@@ -393,8 +411,8 @@ get_file_metadata (TrackerExtract *extract,
#ifdef HAVE_LIBSTREAMANALYZER
if (!priv->force_internal_extractors) {
- tracker_dbus_request_comment (request_id, context,
- " Extracting with libstreamanalyzer...");
+ tracker_gdbus_request_comment (request_id, invocation,
+ " Extracting with libstreamanalyzer...");
tracker_topanalyzer_extract (uri, statements, &content_type);
@@ -407,7 +425,7 @@ get_file_metadata (TrackerExtract *extract,
return TRUE;
}
} else {
- tracker_dbus_request_comment (request_id, context,
+ tracker_gdbus_request_comment (request_id, invocation,
" Extracting with internal extractors ONLY...");
}
#endif /* HAVE_LIBSTREAMANALYZER */
@@ -445,10 +463,10 @@ get_file_metadata (TrackerExtract *extract,
&error);
if (error || !info) {
- tracker_dbus_request_comment (request_id,
- context,
- " Could not create GFileInfo for file size check, %s",
- error ? error->message : "no error given");
+ tracker_gdbus_request_comment (request_id,
+ invocation,
+ " Could not create GFileInfo for file size check, %s",
+ error ? error->message : "no error given");
g_error_free (error);
if (info) {
@@ -464,11 +482,11 @@ get_file_metadata (TrackerExtract *extract,
mime_used = g_strdup (g_file_info_get_content_type (info));
- tracker_dbus_request_comment (request_id,
- context,
- " Guessing mime type as '%s' for uri:'%s'",
- mime_used,
- uri);
+ tracker_gdbus_request_comment (request_id,
+ invocation,
+ " Guessing mime type as '%s' for uri:'%s'",
+ mime_used,
+ uri);
g_object_unref (info);
g_object_unref (file);
@@ -500,19 +518,19 @@ get_file_metadata (TrackerExtract *extract,
if (g_pattern_match (mdata->pattern, length, mime_used, reversed)) {
gint items;
- tracker_dbus_request_comment (request_id,
- context,
- " Extracting with module:'%s'",
- g_module_name ((GModule*) mdata->module));
+ tracker_gdbus_request_comment (request_id,
+ invocation,
+ " Extracting with module:'%s'",
+ g_module_name ((GModule*) mdata->module));
(*edata->func) (uri, preupdate, statements);
items = tracker_sparql_builder_get_length (statements);
- tracker_dbus_request_comment (request_id,
- context,
- " Found %d metadata items",
- items);
+ tracker_gdbus_request_comment (request_id,
+ invocation,
+ " Found %d metadata items",
+ items);
mdata->extracted_count++;
@@ -542,19 +560,19 @@ get_file_metadata (TrackerExtract *extract,
if (g_pattern_match (mdata->pattern, length, mime_used, reversed)) {
gint items;
- tracker_dbus_request_comment (request_id,
- context,
- " Extracting with module:'%s'",
- g_module_name ((GModule*) mdata->module));
+ tracker_gdbus_request_comment (request_id,
+ invocation,
+ " Extracting with module:'%s'",
+ g_module_name ((GModule*) mdata->module));
(*edata->func) (uri, preupdate, statements);
items = tracker_sparql_builder_get_length (statements);
- tracker_dbus_request_comment (request_id,
- context,
- " Found %d metadata items",
- items);
+ tracker_gdbus_request_comment (request_id,
+ invocation,
+ " Found %d metadata items",
+ items);
mdata->extracted_count++;
@@ -575,18 +593,18 @@ get_file_metadata (TrackerExtract *extract,
}
}
- tracker_dbus_request_comment (request_id,
- context,
- " Could not find any extractors to handle metadata type "
- "(mime: %s)",
- mime_used);
+ tracker_gdbus_request_comment (request_id,
+ invocation,
+ " Could not find any extractors to handle metadata type "
+ "(mime: %s)",
+ mime_used);
g_free (mime_used);
g_free (reversed);
} else {
- tracker_dbus_request_comment (request_id,
- context,
- " No mime available, not extracting data");
+ tracker_gdbus_request_comment (request_id,
+ invocation,
+ " No mime available, not extracting data");
}
if (tracker_sparql_builder_get_length (statements) > 0) {
@@ -651,57 +669,60 @@ tracker_extract_get_metadata_by_cmdline (TrackerExtract *object,
tracker_dbus_request_success (request_id, NULL);
}
-void
-tracker_extract_get_pid (TrackerExtract *object,
- DBusGMethodInvocation *context,
- GError **error)
+static void
+handle_method_call_get_pid (TrackerExtract *object,
+ GDBusMethodInvocation *invocation,
+ GVariant *parameters)
{
guint request_id;
pid_t value;
request_id = tracker_dbus_get_next_request_id ();
- tracker_dbus_request_new (request_id,
- context,
- "%s()",
- __FUNCTION__);
+ tracker_gdbus_request_new (request_id,
+ invocation,
+ "%s()",
+ __FUNCTION__);
value = getpid ();
- tracker_dbus_request_debug (request_id,
- context,
- "PID is %d",
- value);
+ tracker_gdbus_request_debug (request_id,
+ invocation,
+ "PID is %d",
+ value);
+
+ tracker_gdbus_request_success (request_id, invocation);
- tracker_dbus_request_success (request_id, context);
- dbus_g_method_return (context, value);
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("(i)", (gint) value));
}
-void
-tracker_extract_get_metadata (TrackerExtract *object,
- const gchar *uri,
- const gchar *mime,
- DBusGMethodInvocation *context,
- GError **error)
+static void
+handle_method_call_get_metadata (TrackerExtract *object,
+ GDBusMethodInvocation *invocation,
+ GVariant *parameters)
{
guint request_id;
TrackerExtractPrivate *priv;
TrackerSparqlBuilder *sparql, *preupdate;
gboolean extracted = FALSE;
+ const gchar *uri = NULL, *mime = NULL;
- request_id = tracker_dbus_get_next_request_id ();
+ g_variant_get (parameters, "(&s&s)", &uri, &mime);
- tracker_dbus_async_return_if_fail (uri != NULL, context);
+ tracker_gdbus_async_return_if_fail (uri != NULL, invocation);
- tracker_dbus_request_new (request_id,
- context,
- "%s(uri:'%s', mime:%s)",
- __FUNCTION__,
- uri,
- mime);
+ request_id = tracker_dbus_get_next_request_id ();
- tracker_dbus_request_debug (request_id,
- context,
- " Resetting shutdown timeout");
+ tracker_gdbus_request_new (request_id,
+ invocation,
+ "%s(uri:'%s', mime:%s)",
+ __FUNCTION__,
+ uri,
+ mime);
+
+ tracker_gdbus_request_debug (request_id,
+ invocation,
+ " Resetting shutdown timeout");
priv = TRACKER_EXTRACT_GET_PRIVATE (object);
@@ -710,10 +731,16 @@ tracker_extract_get_metadata (TrackerExtract *object,
alarm (MAX_EXTRACT_TIME);
}
- extracted = get_file_metadata (object, request_id, context, uri, mime, &preupdate, &sparql);
+ extracted = get_file_metadata (object,
+ request_id,
+ invocation,
+ uri,
+ mime,
+ &preupdate,
+ &sparql);
if (extracted) {
- tracker_dbus_request_success (request_id, context);
+ tracker_gdbus_request_success (request_id, invocation);
if (tracker_sparql_builder_get_length (sparql) > 0) {
const gchar *preupdate_str = NULL;
@@ -722,11 +749,13 @@ tracker_extract_get_metadata (TrackerExtract *object,
preupdate_str = tracker_sparql_builder_get_result (preupdate);
}
- dbus_g_method_return (context,
- preupdate_str ? preupdate_str : "",
- tracker_sparql_builder_get_result (sparql));
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("(ss)",
+ preupdate_str ? preupdate_str : "",
+ tracker_sparql_builder_get_result (sparql)));
} else {
- dbus_g_method_return (context, "", "");
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("(ss)", "", ""));
}
g_object_unref (sparql);
@@ -734,13 +763,13 @@ tracker_extract_get_metadata (TrackerExtract *object,
} else {
GError *actual_error = NULL;
- tracker_dbus_request_failed (request_id,
- context,
- &actual_error,
- "Could not get any metadata for uri:'%s' and mime:'%s'",
- uri,
- mime);
- dbus_g_method_return_error (context, actual_error);
+ tracker_gdbus_request_failed (request_id,
+ invocation,
+ &actual_error,
+ "Could not get any metadata for uri:'%s' and mime:'%s'",
+ uri,
+ mime);
+ g_dbus_method_invocation_return_gerror (invocation, actual_error);
g_error_free (actual_error);
}
@@ -750,11 +779,14 @@ tracker_extract_get_metadata (TrackerExtract *object,
}
}
+#if 0
static void
get_metadata_fast (TrackerExtract *object,
DBusConnection *connection,
DBusMessage *message)
{
+ // todo: port to GDBus
+
guint request_id;
const gchar *expected_signature;
TrackerExtractPrivate *priv;
@@ -934,34 +966,135 @@ get_metadata_fast (TrackerExtract *object,
alarm (0);
}
}
+#endif
-DBusHandlerResult
-tracker_extract_connection_filter (DBusConnection *connection,
- DBusMessage *message,
- void *user_data)
+static void
+handle_method_call (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *method_name,
+ GVariant *parameters,
+ GDBusMethodInvocation *invocation,
+ gpointer user_data)
{
- TrackerExtract *extract;
+ TrackerExtract *extract = user_data;
+
+ if (g_strcmp0 (method_name, "GetPid") == 0) {
+ handle_method_call_get_pid (extract, invocation, parameters);
+ } else
+ if (g_strcmp0 (method_name, "GetMetadataFast") == 0) {
+#if 0
+ // todo
+ get_metadata_fast (extract, connection, message);
+#endif
+ } else
+ if (g_strcmp0 (method_name, "GetMetadata") == 0) {
+ handle_method_call_get_metadata (extract, invocation, parameters);
+ } else {
+ g_assert_not_reached ();
+ }
+}
- g_return_val_if_fail (connection != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
- g_return_val_if_fail (message != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
+static GVariant *
+handle_get_property (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *property_name,
+ GError **error,
+ gpointer user_data)
+{
+ g_assert_not_reached ();
+ return NULL;
+}
- if (g_strcmp0 (TRACKER_EXTRACT_PATH, dbus_message_get_path (message))) {
- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+static gboolean
+handle_set_property (GDBusConnection *connection,
+ const gchar *sender,
+ const gchar *object_path,
+ const gchar *interface_name,
+ const gchar *property_name,
+ GVariant *value,
+ GError **error,
+ gpointer user_data)
+{
+ g_assert_not_reached ();
+ return TRUE;
+}
+
+static const GDBusInterfaceVTable interface_vtable = {
+ handle_method_call,
+ handle_get_property,
+ handle_set_property
+};
+
+void
+tracker_extract_dbus_start (TrackerExtract *extract)
+{
+ TrackerExtractPrivate *priv;
+ GError *error = NULL;
+
+ priv = TRACKER_EXTRACT_GET_PRIVATE (extract);
+
+ priv->d_connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error);
+
+ if (!priv->d_connection) {
+ g_critical ("Could not connect to the D-Bus session bus, %s",
+ error ? error->message : "no error given.");
+ g_clear_error (&error);
+ return;
}
- if (g_strcmp0 (TRACKER_EXTRACT_INTERFACE, dbus_message_get_interface (message))) {
- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+ priv->introspection_data = g_dbus_node_info_new_for_xml (introspection_xml, NULL);
+
+ priv->own_id = g_bus_own_name_on_connection (priv->d_connection,
+ TRACKER_EXTRACT_SERVICE,
+ G_BUS_NAME_OWNER_FLAGS_NONE,
+ NULL, NULL, NULL, NULL);
+
+ g_message ("Registering D-Bus object...");
+ g_message (" Path:'" TRACKER_EXTRACT_PATH "'");
+ g_message (" Object Type:'%s'", G_OBJECT_TYPE_NAME (extract));
+
+ priv->registration_id =
+ g_dbus_connection_register_object (priv->d_connection,
+ TRACKER_EXTRACT_PATH,
+ priv->introspection_data->interfaces[0],
+ &interface_vtable,
+ extract,
+ NULL,
+ &error);
+
+ if (error) {
+ g_critical ("Could not register the D-Bus object "TRACKER_EXTRACT_PATH", %s",
+ error ? error->message : "no error given.");
+ g_clear_error (&error);
+ return;
}
+}
- /* Only check if the user_data is our TrackerExtract AFTER having checked that
- * the message matches expected path and interface. */
- extract = user_data;
- g_return_val_if_fail (TRACKER_IS_EXTRACT (extract), DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
+void
+tracker_extract_dbus_stop (TrackerExtract *extract)
+{
+ TrackerExtractPrivate *priv;
- if (!g_strcmp0 ("GetMetadataFast", dbus_message_get_member (message))) {
- get_metadata_fast (extract, connection, message);
- return DBUS_HANDLER_RESULT_HANDLED;
+ priv = TRACKER_EXTRACT_GET_PRIVATE (extract);
+
+ if (priv->own_id != 0) {
+ g_bus_unown_name (priv->own_id);
+ }
+
+ if (priv->registration_id != 0) {
+ g_dbus_connection_unregister_object (priv->d_connection,
+ priv->registration_id);
}
- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+ if (priv->introspection_data) {
+ g_dbus_node_info_unref (priv->introspection_data);
+ }
+
+ if (priv->d_connection) {
+ g_object_unref (priv->d_connection);
+ }
}
diff --git a/src/tracker-extract/tracker-extract.h b/src/tracker-extract/tracker-extract.h
index 3d185df..dbe7256 100644
--- a/src/tracker-extract/tracker-extract.h
+++ b/src/tracker-extract/tracker-extract.h
@@ -53,17 +53,9 @@ GType tracker_extract_get_type (void);
TrackerExtract *tracker_extract_new (gboolean disable_shutdown,
gboolean force_internal_extractors,
const gchar *force_module);
-void tracker_extract_get_pid (TrackerExtract *object,
- DBusGMethodInvocation *context,
- GError **error);
-void tracker_extract_get_metadata (TrackerExtract *object,
- const gchar *uri,
- const gchar *mime,
- DBusGMethodInvocation *context,
- GError **error);
-DBusHandlerResult tracker_extract_connection_filter (DBusConnection *connection,
- DBusMessage *message,
- void *user_data);
+
+void tracker_extract_dbus_start (TrackerExtract *extract);
+void tracker_extract_dbus_stop (TrackerExtract *extract);
/* Not DBus API */
void tracker_extract_get_metadata_by_cmdline (TrackerExtract *object,
diff --git a/src/tracker-extract/tracker-main.c b/src/tracker-extract/tracker-main.c
index c29981b..0f9bcaa 100644
--- a/src/tracker-extract/tracker-main.c
+++ b/src/tracker-extract/tracker-main.c
@@ -50,7 +50,6 @@
#include "tracker-albumart.h"
#include "tracker-config.h"
#include "tracker-main.h"
-#include "tracker-dbus.h"
#include "tracker-extract.h"
#define ABOUT \
@@ -411,13 +410,6 @@ main (int argc, char *argv[])
/* This makes sure we don't steal all the system's resources */
initialize_priority ();
- if (!tracker_dbus_init ()) {
- g_object_unref (config);
- tracker_log_shutdown ();
-
- return EXIT_FAILURE;
- }
-
object = tracker_extract_new (disable_shutdown,
force_internal_extractors,
force_module);
@@ -425,23 +417,12 @@ main (int argc, char *argv[])
if (!object) {
g_object_unref (config);
tracker_log_shutdown ();
-
return EXIT_FAILURE;
}
tracker_memory_setrlimits ();
- /* Make Tracker available for introspection */
- if (!tracker_dbus_register_objects (object)) {
- g_object_unref (object);
- g_object_unref (config);
- tracker_log_shutdown ();
-
- return EXIT_FAILURE;
- }
-
- tracker_dbus_connection_add_filter (tracker_extract_connection_filter,
- object);
+ tracker_extract_dbus_start (object);
g_message ("Waiting for D-Bus requests...");
@@ -460,7 +441,10 @@ main (int argc, char *argv[])
/* Shutdown subsystems */
tracker_albumart_shutdown ();
- tracker_dbus_shutdown ();
+
+ tracker_extract_dbus_stop (object);
+ g_object_unref (object);
+
tracker_log_shutdown ();
g_object_unref (config);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]