[tracker-miners/wip/carlosg/tracker-3.0-api-breaks: 17/25] tracker: Make CLI subcommands talk to tracker-miner-fs endpoint



commit 511858c28ba5444a804d93e3d226ce1ef1db7d04
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Dec 31 01:59:06 2019 +0100

    tracker: Make CLI subcommands talk to tracker-miner-fs endpoint
    
    All subcommands are essentially/most useful with tracker-miner-fs
    data, have them talk with this endpoint.

 src/tracker/tracker-daemon.c | 3 ++-
 src/tracker/tracker-index.c  | 3 ++-
 src/tracker/tracker-reset.c  | 3 ++-
 src/tracker/tracker-search.c | 3 ++-
 src/tracker/tracker-status.c | 9 ++++++---
 src/tracker/tracker-tag.c    | 3 ++-
 6 files changed, 16 insertions(+), 8 deletions(-)
---
diff --git a/src/tracker/tracker-daemon.c b/src/tracker/tracker-daemon.c
index 1d5a67029..694aea243 100644
--- a/src/tracker/tracker-daemon.c
+++ b/src/tracker/tracker-daemon.c
@@ -970,7 +970,8 @@ daemon_run (void)
                TrackerNotifier *notifier;
                GError *error = NULL;
 
-               sparql_connection = tracker_sparql_connection_get (NULL, &error);
+               sparql_connection = tracker_sparql_connection_bus_new ("org.freedesktop.Tracker1.Miner.Files",
+                                                                      NULL, &error);
 
                if (!sparql_connection) {
                        g_critical ("%s, %s",
diff --git a/src/tracker/tracker-index.c b/src/tracker/tracker-index.c
index 253669e5c..8426ebfdc 100644
--- a/src/tracker/tracker-index.c
+++ b/src/tracker/tracker-index.c
@@ -188,7 +188,8 @@ import_turtle_files (void)
        GError *error = NULL;
        gchar **p;
 
-       connection = tracker_sparql_connection_get (NULL, &error);
+       connection = tracker_sparql_connection_bus_new ("org.freedesktop.Tracker1.Miner.Files",
+                                                       NULL, &error);
 
        if (!connection) {
                g_printerr ("%s: %s\n",
diff --git a/src/tracker/tracker-reset.c b/src/tracker/tracker-reset.c
index 027c5041a..5e803db2f 100644
--- a/src/tracker/tracker-reset.c
+++ b/src/tracker/tracker-reset.c
@@ -72,7 +72,8 @@ delete_info_recursively (GFile *file)
        gchar *query, *uri;
        GError *error = NULL;
 
-       connection = tracker_sparql_connection_get (NULL, &error);
+       connection = tracker_sparql_connection_bus_new ("org.freedesktop.Tracker1.Miner.Files",
+                                                       NULL, &error);
 
        if (error)
                goto error;
diff --git a/src/tracker/tracker-search.c b/src/tracker/tracker-search.c
index 85db31a0d..4f27efd78 100644
--- a/src/tracker/tracker-search.c
+++ b/src/tracker/tracker-search.c
@@ -1572,7 +1572,8 @@ search_run (void)
        disable_snippets = TRUE;
 #endif
 
-       connection = tracker_sparql_connection_get (NULL, &error);
+       connection = tracker_sparql_connection_bus_new ("org.freedesktop.Tracker1.Miner.Files",
+                                                       NULL, &error);
 
        if (!connection) {
                g_printerr ("%s: %s\n",
diff --git a/src/tracker/tracker-status.c b/src/tracker/tracker-status.c
index 73765b0fa..ed1dab4f1 100644
--- a/src/tracker/tracker-status.c
+++ b/src/tracker/tracker-status.c
@@ -79,7 +79,8 @@ status_stat (void)
        TrackerSparqlCursor *cursor;
        GError *error = NULL;
 
-       connection = tracker_sparql_connection_get (NULL, &error);
+       connection = tracker_sparql_connection_bus_new ("org.freedesktop.Tracker1.Miner.Files",
+                                                       NULL, &error);
 
        if (!connection) {
                g_printerr ("%s: %s\n",
@@ -308,7 +309,8 @@ collect_debug (void)
 
        g_print ("[%s]\n", _("Data Statistics"));
 
-       connection = tracker_sparql_connection_get (NULL, &error);
+       connection = tracker_sparql_connection_bus_new ("org.freedesktop.Tracker1.Miner.Files",
+                                                       NULL, &error);
 
        if (!connection) {
                g_print ("** %s, %s **\n",
@@ -384,7 +386,8 @@ get_file_and_folder_count (int *files,
        TrackerSparqlCursor *cursor;
        GError *error = NULL;
 
-       connection = tracker_sparql_connection_get (NULL, &error);
+       connection = tracker_sparql_connection_bus_new ("org.freedesktop.Tracker1.Miner.Files",
+                                                       NULL, &error);
 
        if (files) {
                *files = 0;
diff --git a/src/tracker/tracker-tag.c b/src/tracker/tracker-tag.c
index a9428961d..60a9f0c6b 100644
--- a/src/tracker/tracker-tag.c
+++ b/src/tracker/tracker-tag.c
@@ -967,7 +967,8 @@ tag_run (void)
        TrackerSparqlConnection *connection;
        GError *error = NULL;
 
-       connection = tracker_sparql_connection_get (NULL, &error);
+       connection = tracker_sparql_connection_bus_new ("org.freedesktop.Tracker1.Miner.Files",
+                                                       NULL, &error);
 
        if (!connection) {
                g_printerr ("%s: %s\n",


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