[tracker/direct-access: 32/122] libtracker-sparql: Add async API
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/direct-access: 32/122] libtracker-sparql: Add async API
- Date: Fri, 6 Aug 2010 10:16:46 +0000 (UTC)
commit 2aba4e60adfc82a0517c38bfbebc6215ec9e048b
Author: Jürg Billeter <j bitron ch>
Date: Tue Jul 13 14:42:27 2010 +0200
libtracker-sparql: Add async API
src/libtracker-direct/tracker-connection.vala | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-direct/tracker-connection.vala b/src/libtracker-direct/tracker-connection.vala
index f3bbbb9..9c9bf90 100644
--- a/src/libtracker-direct/tracker-connection.vala
+++ b/src/libtracker-direct/tracker-connection.vala
@@ -33,12 +33,17 @@ public class Tracker.Direct.Connection : Tracker.Sparql.Connection {
initialized = false;
}
- public override Sparql.Cursor query (string sparql) throws GLib.Error {
+ public override Sparql.Cursor query (string sparql, Cancellable? cancellable) throws GLib.Error {
var query_object = new Sparql.Query (sparql);
var cursor = query_object.execute_cursor ();
cursor.connection = this;
return cursor;
}
+
+ public async override Sparql.Cursor query_async (string sparql, Cancellable? cancellable = null) throws GLib.Error {
+ // just creating the cursor won't block
+ return query (sparql, cancellable);
+ }
}
public Tracker.Sparql.Connection module_init (Tracker.Sparql.PluginLoader loader) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]