[tracker/dbus-fd-experiment] Steroids example: Port to new API



commit db137b0eb04109d3b222c6ab426a4e6a7e71e42d
Author: Adrien Bustany <abustany gnome org>
Date:   Mon May 24 10:09:23 2010 -0400

    Steroids example: Port to new API

 examples/steroids/steroids-sparql.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/examples/steroids/steroids-sparql.c b/examples/steroids/steroids-sparql.c
index 278e033..43bf703 100644
--- a/examples/steroids/steroids-sparql.c
+++ b/examples/steroids/steroids-sparql.c
@@ -22,16 +22,15 @@ main (int argc, char **argv) {
 	iterator = tracker_resources_sparql_query_steroids (client, query, &error);
 
 	if (!iterator) {
-		fprintf (stderr, "Query failed, but errors are not supported yet :-/\n");
+		fprintf (stderr, "Query preparation failed, %s\n", error->message);
+		g_error_free (error);
 		exit (1);
 	}
 
 	while (tracker_result_iterator_has_next (iterator)) {
 		int i;
 
-		tracker_result_iterator_next (iterator, &error);
-
-		// TODO: Check for error here
+		tracker_result_iterator_next (iterator);
 
 		for (i = 0; i < tracker_result_iterator_n_columns (iterator); i++) {
 			printf ("%s", tracker_result_iterator_value (iterator, i));



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