tracker r1349 - branches/indexer-split/src/trackerd
- From: pvanhoof svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1349 - branches/indexer-split/src/trackerd
- Date: Mon, 5 May 2008 17:34:52 +0100 (BST)
Author: pvanhoof
Date: Mon May 5 16:34:52 2008
New Revision: 1349
URL: http://svn.gnome.org/viewvc/tracker?rev=1349&view=rev
Log:
Some more preparations
Modified:
branches/indexer-split/src/trackerd/tracker-xesam-live-search.c
Modified: branches/indexer-split/src/trackerd/tracker-xesam-live-search.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-xesam-live-search.c (original)
+++ branches/indexer-split/src/trackerd/tracker-xesam-live-search.c Mon May 5 16:34:52 2008
@@ -376,10 +376,7 @@
}
-static void
-get_hit_data (TrackerXesamLiveSearch *self,
- GPtrArray **hit_data)
-{
+
/**
* Retrieving Hits
* The return value of GetHits and GetHitData is a sorted array of hits. A hit
@@ -402,6 +399,33 @@
* It's a root GPtrArray with 'GPtrArray' typed elements. Those child GPtrArray
* elements contain GValue instances.
**/
+static void
+get_hit_data (TrackerXesamLiveSearch *self,
+ TrackerDBResultSet *result_set,
+ GPtrArray **hit_data)
+{
+ gboolean valid = TRUE;
+ gint hitfields_columns = 0, column;
+ GType hitfields_columns_types[100];
+ GPtrArray *result = g_ptr_array_new ();
+
+ while (valid) {
+ GPtrArray *row = g_ptr_array_new ();
+
+ for (column = 0; column < hitfields_columns; column++) {
+ GValue *value = g_value_init (value, hitfields_columns_types[column]);
+
+ _tracker_db_result_set_get_value (result_set, column, value);
+
+ g_ptr_array_add (row, value);
+ }
+
+ g_ptr_array_add (result, row);
+
+ valid = tracker_db_result_set_iter_next (result_set);
+ }
+
+ *hit_data = result;
}
/**
@@ -431,7 +455,7 @@
TRACKER_XESAM_ERROR_SEARCH_NOT_ACTIVE,
"Search is not active");
else {
- get_hit_data (self, hits);
+ get_hit_data (self, NULL, hits);
}
}
@@ -476,7 +500,7 @@
TRACKER_XESAM_ERROR_SEARCH_NOT_ACTIVE,
"Search is not active yet");
else {
- get_hit_data (self, hit_data);
+ get_hit_data (self, NULL, hit_data);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]