diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2017-06-03 00:37:13 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2017-06-29 19:51:47 +0200 |
commit | 09735a4a078bd531f061807f9eb7ec2e8e4f043d (patch) | |
tree | 5fed0da5706619a41a18ae85194efd011ea587f7 /src/libtracker-sparql | |
parent | 85b8ff8859d7e7815a72568e86ed78376db2847e (diff) | |
download | tracker-09735a4a078bd531f061807f9eb7ec2e8e4f043d.tar.gz |
libtracker-sparql: Add tracker_sparql_connection_local_new(_async) methods
These calls make private sparql databases available to applications.
Diffstat (limited to 'src/libtracker-sparql')
-rw-r--r-- | src/libtracker-sparql/tracker-connection.vala | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/libtracker-sparql/tracker-connection.vala b/src/libtracker-sparql/tracker-connection.vala index b6e7fe934..d3565fd10 100644 --- a/src/libtracker-sparql/tracker-connection.vala +++ b/src/libtracker-sparql/tracker-connection.vala @@ -74,6 +74,11 @@ public errordomain Tracker.Sparql.Error { UNSUPPORTED } +public enum Tracker.Sparql.ConnectionFlags { + NONE = 0, + READONLY = 1 << 0, +} + /** * TrackerSparqlConnection: * @@ -221,6 +226,28 @@ public abstract class Tracker.Sparql.Connection : Object { public extern static new Connection remote_new (string uri_base); /** + * tracker_sparql_connection_local_new: + * + * Returns: a new local #TrackerSparqlConnection using the specified + * @cache/@journal locations, and the ontology specified in the @ontology + * directory. Call g_object_unref() on the object when no longer used. + * + * Since: 1.12 + */ + public extern static new Connection local_new (Tracker.Sparql.ConnectionFlags flags, File store, File? journal, File? ontology, Cancellable? cancellable = null) throws Sparql.Error, IOError; + + /** + * tracker_sparql_connection_local_new_async: + * + * Returns: a new local #TrackerSparqlConnection using the specified + * @cache/@journal locations, and the ontology specified in the @ontology + * directory. Call g_object_unref() on the object when no longer used. + * + * Since: 1.12 + */ + public extern async static new Connection local_new_async (Tracker.Sparql.ConnectionFlags flags, File store, File? journal, File? ontology, Cancellable? cancellable = null) throws Sparql.Error, IOError; + + /** * tracker_sparql_connection_query: * @self: a #TrackerSparqlConnection * @sparql: string containing the SPARQL query |