[tracker/wip/carlosg/tracker-3.0-api-breaks: 34/63] docs: Make libtracker-sparql examples use explicit bus connection



commit 3900107402acefa8fa808e1d7a7b884dea8df6a4
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Dec 23 02:19:20 2019 +0100

    docs: Make libtracker-sparql examples use explicit bus connection
    
    Works as about any other.

 docs/reference/libtracker-sparql/examples/readonly-example.c            | 2 +-
 docs/reference/libtracker-sparql/examples/writeonly-example.c           | 2 +-
 .../libtracker-sparql/examples/writeonly-with-blank-nodes-example.c     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/docs/reference/libtracker-sparql/examples/readonly-example.c 
b/docs/reference/libtracker-sparql/examples/readonly-example.c
index ac89cab26..024d0b4b2 100644
--- a/docs/reference/libtracker-sparql/examples/readonly-example.c
+++ b/docs/reference/libtracker-sparql/examples/readonly-example.c
@@ -7,7 +7,7 @@ int main (int argc, const char **argv)
   TrackerSparqlCursor *cursor;
   const gchar *query = "SELECT nie:url(?u) WHERE { ?u a nfo:FileDataObject }";
 
-  connection = tracker_sparql_connection_get (NULL, &error);
+  connection = tracker_sparql_connection_bus_new ("org.freedesktop.Tracker1", NULL, &error);
   if (!connection) {
     g_printerr ("Couldn't obtain a connection to the Tracker store: %s",
                 error ? error->message : "unknown error");
diff --git a/docs/reference/libtracker-sparql/examples/writeonly-example.c 
b/docs/reference/libtracker-sparql/examples/writeonly-example.c
index 854763099..06a7e9186 100644
--- a/docs/reference/libtracker-sparql/examples/writeonly-example.c
+++ b/docs/reference/libtracker-sparql/examples/writeonly-example.c
@@ -16,7 +16,7 @@ int main (int argc, const char **argv)
     "FILTER (!bound(?tag)) "
     "}";
 
-  connection = tracker_sparql_connection_get (NULL, &error);
+  connection = tracker_sparql_connection_bus_new ("org.freedesktop.Tracker1", NULL, &error);
   if (!connection) {
     g_printerr ("Couldn't obtain a connection to the Tracker store: %s",
                 error ? error->message : "unknown error");
diff --git a/docs/reference/libtracker-sparql/examples/writeonly-with-blank-nodes-example.c 
b/docs/reference/libtracker-sparql/examples/writeonly-with-blank-nodes-example.c
index 44114b556..b6091af52 100644
--- a/docs/reference/libtracker-sparql/examples/writeonly-with-blank-nodes-example.c
+++ b/docs/reference/libtracker-sparql/examples/writeonly-with-blank-nodes-example.c
@@ -8,7 +8,7 @@ int main (int argc, const char **argv)
   const gchar *query =
     "INSERT { _:foo a nie:InformationElement } WHERE { ?x a rdfs:Class }";
 
-  connection = tracker_sparql_connection_get (NULL, &error);
+  connection = tracker_sparql_connection_bus_new (NULL, &error);
   if (!connection) {
     g_printerr ("Couldn't obtain a connection to the Tracker store: %s",
                 error ? error->message : "unknown error");


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