[tracker/wip/carlosg/domain-ontologies: 17/20] tracker-miner-fs: Drop standalone DBus name for Files.Index
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/domain-ontologies: 17/20] tracker-miner-fs: Drop standalone DBus name for Files.Index
- Date: Tue, 20 Jun 2017 18:39:24 +0000 (UTC)
commit 29f85ae9ae3c8dc8beb8faf3201c282f747fae1b
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Jun 20 14:40:06 2017 +0200
tracker-miner-fs: Drop standalone DBus name for Files.Index
Because we're registering 2 interfaces and 2 dbus names, both
expose the same 2 interfaces and are introspectable the same way.
This makes no sense, just use the org.freedesktop.Tracker1.Miner.Files
name for both interfaces.
src/libtracker-control/tracker-miner-manager.c | 11 +-------
src/miners/fs/tracker-miner-files-index.c | 29 ------------------------
2 files changed, 2 insertions(+), 38 deletions(-)
---
diff --git a/src/libtracker-control/tracker-miner-manager.c b/src/libtracker-control/tracker-miner-manager.c
index d6f1dc1..fa4bc0e 100644
--- a/src/libtracker-control/tracker-miner-manager.c
+++ b/src/libtracker-control/tracker-miner-manager.c
@@ -670,13 +670,6 @@ tracker_miner_manager_get_running (TrackerMinerManager *manager)
continue;
}
- /* Special case miner-fs which has
- * additional D-Bus interface.
- */
- if (strcmp (str, "org.freedesktop.Tracker1.Miner.Files.Index") == 0) {
- continue;
- }
-
list = g_slist_prepend (list, g_strdup (str));
}
@@ -1451,7 +1444,7 @@ tracker_miner_manager_reindex_by_mimetype (TrackerMinerManager *manager,
priv = TRACKER_MINER_MANAGER_GET_PRIVATE (manager);
v = g_dbus_connection_call_sync (priv->connection,
- "org.freedesktop.Tracker1.Miner.Files.Index",
+ "org.freedesktop.Tracker1.Miner.Files",
"/org/freedesktop/Tracker1/Miner/Files/Index",
"org.freedesktop.Tracker1.Miner.Files.Index",
"ReindexMimeTypes",
@@ -1506,7 +1499,7 @@ miner_manager_index_file_sync (TrackerMinerManager *manager,
uri = g_file_get_uri (file);
v = g_dbus_connection_call_sync (priv->connection,
- "org.freedesktop.Tracker1.Miner.Files.Index",
+ "org.freedesktop.Tracker1.Miner.Files",
"/org/freedesktop/Tracker1/Miner/Files/Index",
"org.freedesktop.Tracker1.Miner.Files.Index",
method_name,
diff --git a/src/miners/fs/tracker-miner-files-index.c b/src/miners/fs/tracker-miner-files-index.c
index 481bbcd..f1fd2e9 100644
--- a/src/miners/fs/tracker-miner-files-index.c
+++ b/src/miners/fs/tracker-miner-files-index.c
@@ -572,35 +572,6 @@ tracker_miner_files_index_new (TrackerMinerFiles *miner_files)
return NULL;
}
- reply = g_dbus_connection_call_sync (priv->d_connection,
- "org.freedesktop.DBus",
- "/org/freedesktop/DBus",
- "org.freedesktop.DBus",
- "RequestName",
- g_variant_new ("(su)", full_name, 0x4 /*
DBUS_NAME_FLAG_DO_NOT_QUEUE */),
- G_VARIANT_TYPE ("(u)"),
- 0, -1, NULL, &error);
-
- if (error) {
- g_critical ("Could not acquire name:'%s', %s",
- full_name,
- error->message);
- g_clear_error (&error);
- g_object_unref (miner);
- return NULL;
- }
-
- g_variant_get (reply, "(u)", &rval);
- g_variant_unref (reply);
-
- if (rval != 1 /* DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER */) {
- g_critical ("D-Bus service name:'%s' is already taken, "
- "perhaps the daemon is already running?",
- full_name);
- g_object_unref (miner);
- return NULL;
- }
-
priv->full_path = full_path;
priv->peer_listener = tracker_miner_files_peer_listener_new (priv->d_connection);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]