[tracker/cursor: 9/15] tracker-store: Use Cursor instead of ResultSet in tracker-main
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/cursor: 9/15] tracker-store: Use Cursor instead of ResultSet in tracker-main
- Date: Wed, 19 Jan 2011 10:20:45 +0000 (UTC)
commit 06030989560114d41460e070d272610d6401d3cc
Author: Jürg Billeter <j bitron ch>
Date: Tue Jan 18 16:23:11 2011 +0100
tracker-store: Use Cursor instead of ResultSet in tracker-main
src/tracker-store/tracker-main.vala | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/tracker-store/tracker-main.vala b/src/tracker-store/tracker-main.vala
index a7d4594..7c01ce5 100644
--- a/src/tracker-store/tracker-main.vala
+++ b/src/tracker-store/tracker-main.vala
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2006, Jamie McCracken <jamiemcc gnome org>
- * Copyright (C) 2008, Nokia <ivan frade nokia com>
+ * Copyright (C) 2008-2011, Nokia <ivan frade nokia com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -131,10 +131,10 @@ License which can be viewed at:
string[] classes_to_signal = null;
try {
- var result_set = Tracker.Data.query_sparql ("SELECT ?class WHERE { ?class tracker:notify true }");
+ var cursor = Tracker.Data.query_sparql_cursor ("SELECT ?class WHERE { ?class tracker:notify true }");
- if (result_set != null) {
- classes_to_signal = Tracker.dbus_query_result_to_strv (result_set, 0);
+ while (cursor.next ()) {
+ classes_to_signal += cursor.get_string (0);
}
} catch (Error e) {
critical ("Unable to retrieve tracker:notify classes: %s", e.message);
@@ -148,10 +148,10 @@ License which can be viewed at:
string[] predicates_to_signal = null;
try {
- var result_set = Tracker.Data.query_sparql ("SELECT ?predicate WHERE { ?predicate tracker:writeback true }");
+ var cursor = Tracker.Data.query_sparql_cursor ("SELECT ?predicate WHERE { ?predicate tracker:writeback true }");
- if (result_set != null) {
- predicates_to_signal = Tracker.dbus_query_result_to_strv (result_set, 0);
+ while (cursor.next ()) {
+ predicates_to_signal += cursor.get_string (0);
}
} catch (Error e) {
critical ("Unable to retrieve tracker:writeback properties: %s", e.message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]