[tracker/libtracker-bus: 15/51] libtracker-bus: Implement import{_async}()



commit 8e18e607e777ec0d8a35c998134f249a338ccafa
Author: Martyn Russell <martyn lanedo com>
Date:   Tue Jul 20 17:26:53 2010 +0100

    libtracker-bus: Implement import{_async}()
    
    tracker-import: Use new libtracker-sparql API

 src/libtracker-bus/tracker-bus.vala |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-bus/tracker-bus.vala b/src/libtracker-bus/tracker-bus.vala
index c6fbde3..350fb2b 100644
--- a/src/libtracker-bus/tracker-bus.vala
+++ b/src/libtracker-bus/tracker-bus.vala
@@ -25,6 +25,11 @@ private interface Tracker.Bus.Resources : GLib.Object {
 	public abstract void sparql_update (string query) throws DBus.Error;
 	[DBus (name = "SparqlUpdate")]
 	public abstract async void sparql_update_async (string query) throws DBus.Error;
+
+	[DBus (name = "Load")]
+	public abstract void import (string uri) throws DBus.Error;
+	[DBus (name = "Load")]
+	public abstract async void import_async (string uri) throws DBus.Error;
 }
 
 [DBus (name = "org.freedesktop.Tracker1.Statistics")]
@@ -103,6 +108,13 @@ public class Tracker.Bus.Connection : Tracker.Sparql.Connection {
 		yield resources_object.sparql_update_async (sparql);
 	}
 
+	public override void import (File file, Cancellable? cancellable = null) throws GLib.Error {
+		resources_object.import (file.get_uri ());
+	}
+	public async override void import_async (File file, Cancellable? cancellable = null) throws GLib.Error {
+		yield resources_object.import_async (file.get_uri ());
+	}
+
 	public override Sparql.Cursor? statistics (Cancellable? cancellable = null) throws GLib.Error {
 		string[,] results = statistics_object.Get ();
 		return new Tracker.Bus.ArrayCursor ((owned) results, results.length[0], results.length[1]);



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