[tracker/wip/carlosg/tracker-3.0-api-breaks: 32/79] utils: Update utilities to use explicit bus connection



commit 65a1efb031a1015b4796bacf163cc826784292ea
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Dec 23 02:00:11 2019 +0100

    utils: Update utilities to use explicit bus connection
    
    Those will want to connect to the tracker-miner-fs endpoint.

 utils/data-generators/create-tree-from-real-data | 2 +-
 utils/mtp/mtp-dummy.c                            | 3 ++-
 utils/tracker-resdump/tracker-resdump.vala       | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/utils/data-generators/create-tree-from-real-data 
b/utils/data-generators/create-tree-from-real-data
index f9d8c534c..feb9d3cbb 100755
--- a/utils/data-generators/create-tree-from-real-data
+++ b/utils/data-generators/create-tree-from-real-data
@@ -128,7 +128,7 @@ def main():
 
     rule_map = read_tracker_extract_rules(args.rules_dir)
 
-    db = Tracker.SparqlConnection.get()
+    db = Tracker.SparqlConnection.bus_new("org.freedesktop.Tracker1")
 
     show_only = (args.output_dir == None)
 
diff --git a/utils/mtp/mtp-dummy.c b/utils/mtp/mtp-dummy.c
index 8aaa457d2..5d99ef406 100644
--- a/utils/mtp/mtp-dummy.c
+++ b/utils/mtp/mtp-dummy.c
@@ -286,7 +286,8 @@ context_init (gint    argc,
        }
 
        /* Get connection */
-       connection = tracker_sparql_connection_get (NULL, &error);
+       connection = tracker_sparql_connection_bus_new ("org.freedesktop.Tracker1",
+                                                       NULL, &error);
        if (!connection) {
                /* Some error happened performing the query, not good */
                g_error ("Couldn't get sparql connection: %s",
diff --git a/utils/tracker-resdump/tracker-resdump.vala b/utils/tracker-resdump/tracker-resdump.vala
index 601d46bd7..2a6ea6c36 100644
--- a/utils/tracker-resdump/tracker-resdump.vala
+++ b/utils/tracker-resdump/tracker-resdump.vala
@@ -103,7 +103,7 @@ static int main(string[] args)
        }
 
        try {
-               conn = Connection.get();
+               conn = Connection.bus_new("org.freedesktop.Tracker1");
        } catch (GLib.Error e) {
                critical("Couldn't connect to Tracker: %s", e.message);
                return 1;


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