[tracker/wip/carlosg/domain-ontologies] libtracker-sparql: Add tracker_sparql_connection_get_domain()



commit 8a61acbfa8986534b1cf97b045ba0a23ad55a1a9
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Jun 21 17:51:59 2017 +0200

    libtracker-sparql: Add tracker_sparql_connection_get_domain()
    
    In order to being able to fetch the global domain from various places.

 src/libtracker-sparql-backend/tracker-backend.vala |    4 ++++
 src/libtracker-sparql/tracker-connection.vala      |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-sparql-backend/tracker-backend.vala 
b/src/libtracker-sparql-backend/tracker-backend.vala
index 219c60f..a792776 100644
--- a/src/libtracker-sparql-backend/tracker-backend.vala
+++ b/src/libtracker-sparql-backend/tracker-backend.vala
@@ -354,3 +354,7 @@ public static async Tracker.Sparql.Connection tracker_sparql_connection_local_ne
 public static void tracker_sparql_connection_set_domain (string? domain) {
        domain_name = domain;
 }
+
+public static string? tracker_sparql_connection_get_domain () {
+       return domain_name;
+}
diff --git a/src/libtracker-sparql/tracker-connection.vala b/src/libtracker-sparql/tracker-connection.vala
index c8517b3..bb87add 100644
--- a/src/libtracker-sparql/tracker-connection.vala
+++ b/src/libtracker-sparql/tracker-connection.vala
@@ -571,5 +571,6 @@ public abstract class Tracker.Sparql.Connection : Object {
        }
 
        public extern static void set_domain (string? domain);
+       public extern static string? get_domain ();
 }
 


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