[tracker/wip/carlosg/tracker-3.0-api-breaks: 17/100] libtracker-sparql: Drop "local" from tracker_sparql_connection_local_new
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/tracker-3.0-api-breaks: 17/100] libtracker-sparql: Drop "local" from tracker_sparql_connection_local_new
- Date: Mon, 17 Feb 2020 18:10:13 +0000 (UTC)
commit b6a975eac91d1152677d06e36555054d320672eb
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Dec 15 18:16:08 2019 +0100
libtracker-sparql: Drop "local" from tracker_sparql_connection_local_new
And make it simply "tracker_sparql_connection_new()". We are moving away
from a singleton connection, and this local connection is the de-facto
triple store implementation.
The bus/remote constructors will remain to ease access to remote
endpoints, but they're nothing that SERVICE{} can't do on the other.
.../libtracker-sparql-sections.txt | 7 ++++---
src/libtracker-sparql-backend/tracker-backend.vala | 4 ++--
src/libtracker-sparql/tracker-connection.vala | 22 +++++++++++-----------
tests/libtracker-fts/tracker-fts-test.c | 6 +++---
4 files changed, 20 insertions(+), 19 deletions(-)
---
diff --git a/docs/reference/libtracker-sparql/libtracker-sparql-sections.txt
b/docs/reference/libtracker-sparql/libtracker-sparql-sections.txt
index 08bddd7c0..341ba2b83 100644
--- a/docs/reference/libtracker-sparql/libtracker-sparql-sections.txt
+++ b/docs/reference/libtracker-sparql/libtracker-sparql-sections.txt
@@ -106,10 +106,11 @@ TrackerSparqlConnectionFlags
tracker_sparql_connection_get
tracker_sparql_connection_get_async
tracker_sparql_connection_get_finish
-tracker_sparql_connection_local_new
-tracker_sparql_connection_local_new_async
-tracker_sparql_connection_local_new_finish
+tracker_sparql_connection_new
+tracker_sparql_connection_new_async
+tracker_sparql_connection_new_finish
tracker_sparql_connection_remote_new
+tracker_sparql_connection_bus_new
tracker_sparql_connection_query
tracker_sparql_connection_query_async
tracker_sparql_connection_query_finish
diff --git a/src/libtracker-sparql-backend/tracker-backend.vala
b/src/libtracker-sparql-backend/tracker-backend.vala
index f98dc677e..195847812 100644
--- a/src/libtracker-sparql-backend/tracker-backend.vala
+++ b/src/libtracker-sparql-backend/tracker-backend.vala
@@ -327,13 +327,13 @@ public static Tracker.Sparql.Connection tracker_sparql_connection_bus_new (strin
return new Tracker.Bus.Connection (service, conn, true);
}
-public static Tracker.Sparql.Connection tracker_sparql_connection_local_new (Tracker.Sparql.ConnectionFlags
flags, File store, File? ontology, Cancellable? cancellable = null) throws GLib.Error, Tracker.Sparql.Error,
IOError {
+public static Tracker.Sparql.Connection tracker_sparql_connection_new (Tracker.Sparql.ConnectionFlags flags,
File store, File? ontology, Cancellable? cancellable = null) throws GLib.Error, Tracker.Sparql.Error, IOError
{
var conn = new Tracker.Direct.Connection (flags, store, ontology);
conn.init (cancellable);
return conn;
}
-public static async Tracker.Sparql.Connection tracker_sparql_connection_local_new_async
(Tracker.Sparql.ConnectionFlags flags, File store, File? ontology, Cancellable? cancellable = null) throws
GLib.Error, Tracker.Sparql.Error, IOError {
+public static async Tracker.Sparql.Connection tracker_sparql_connection_new_async
(Tracker.Sparql.ConnectionFlags flags, File store, File? ontology, Cancellable? cancellable = null) throws
GLib.Error, Tracker.Sparql.Error, IOError {
var conn = new Tracker.Direct.Connection (flags, store, ontology);
conn.init_async.begin (Priority.DEFAULT, cancellable);
yield;
diff --git a/src/libtracker-sparql/tracker-connection.vala b/src/libtracker-sparql/tracker-connection.vala
index b94517468..712bc3d08 100644
--- a/src/libtracker-sparql/tracker-connection.vala
+++ b/src/libtracker-sparql/tracker-connection.vala
@@ -168,14 +168,14 @@ public abstract class Tracker.Sparql.Connection : Object {
public extern static new Connection remote_new (string uri_base);
/**
- * tracker_sparql_connection_local_new:
+ * tracker_sparql_connection_new:
* @flags: Flags to define connection behavior
* @store: Location for the database
* @ontology: Location of the ontology used for this connection, or %NULL
* @cancellable: A #GCancellable
* @error: The error which occurred or %NULL
*
- * Returns: a new local #TrackerSparqlConnection using the specified
+ * Returns: a new #TrackerSparqlConnection using the specified
* @cache location, and the ontology specified in the @ontology
* directory. Call g_object_unref() on the object when no longer used.
*
@@ -194,12 +194,12 @@ public abstract class Tracker.Sparql.Connection : Object {
* The @store argument expects a directory, and it is
* assumed to be entirely private to Tracker.
*
- * Since: 2.0
+ * Since: 3.0
*/
- public extern static new Connection local_new (Tracker.Sparql.ConnectionFlags flags, File store,
File? ontology, Cancellable? cancellable = null) throws Sparql.Error, IOError;
+ public extern static new Connection new (Tracker.Sparql.ConnectionFlags flags, File store, File?
ontology, Cancellable? cancellable = null) throws Sparql.Error, IOError;
/**
- * tracker_sparql_connection_local_new_async:
+ * tracker_sparql_connection_new_async:
* @flags: Flags to define connection behavior
* @store: Location for the database
* @ontology: Location of the ontology used for this connection, or %NULL
@@ -208,17 +208,17 @@ public abstract class Tracker.Sparql.Connection : Object {
* asynchronous operation is finished.
* @_user_data_: user-defined data to be passed to @_callback_
*
- * Returns: a new local #TrackerSparqlConnection using the specified
+ * Returns: a new #TrackerSparqlConnection using the specified
* @cache location, and the ontology specified in the @ontology
* directory. Call g_object_unref() on the object when no longer used.
*
- * See tracker_sparql_connection_local_new() for more details.
+ * See tracker_sparql_connection_new() for more details.
*
- * Since: 2.0
+ * Since: 3.0
*/
/**
- * tracker_sparql_connection_local_new_finish:
+ * tracker_sparql_connection_new_finish:
* @_res_: a #GAsyncResult with the result of the operation
* @error: #GError for error reporting.
*
@@ -228,9 +228,9 @@ public abstract class Tracker.Sparql.Connection : Object {
* On error, #NULL is returned and the @error is set accordingly.
* Call g_object_unref() on the returned connection when no longer needed.
*
- * Since: 2.0
+ * Since: 3.0
*/
- public extern async static new Connection local_new_async (Tracker.Sparql.ConnectionFlags flags, File
store, File? ontology, Cancellable? cancellable = null) throws Sparql.Error, IOError;
+ public extern async static new Connection new_async (Tracker.Sparql.ConnectionFlags flags, File
store, File? ontology, Cancellable? cancellable = null) throws Sparql.Error, IOError;
public extern static new Connection bus_new (string service_name, DBusConnection? dbus_connection =
null) throws Sparql.Error, IOError, DBusError, GLib.Error;
diff --git a/tests/libtracker-fts/tracker-fts-test.c b/tests/libtracker-fts/tracker-fts-test.c
index 6f5ca8a1b..0cf090422 100644
--- a/tests/libtracker-fts/tracker-fts-test.c
+++ b/tests/libtracker-fts/tracker-fts-test.c
@@ -74,9 +74,9 @@ test_sparql_query (gconstpointer test_data)
data_location = g_file_new_for_path (datadir);
- conn = tracker_sparql_connection_local_new (TRACKER_SPARQL_CONNECTION_FLAGS_NONE,
- data_location, ontology,
- NULL, &error);
+ conn = tracker_sparql_connection_new (TRACKER_SPARQL_CONNECTION_FLAGS_NONE,
+ data_location, ontology,
+ NULL, &error);
g_assert_no_error (error);
g_object_unref (ontology);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]