[tracker/libtracker-bus: 13/44] libtracker-bus: Implement import{_async}()
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/libtracker-bus: 13/44] libtracker-bus: Implement import{_async}()
- Date: Fri, 13 Aug 2010 14:05:43 +0000 (UTC)
commit 8a4def6356f117f9a2714ac1ce1328ad57126424
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 709e3dd..21aef76 100644
--- a/src/libtracker-bus/tracker-bus.vala
+++ b/src/libtracker-bus/tracker-bus.vala
@@ -23,6 +23,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")]
@@ -101,6 +106,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]