tracker r1310 - branches/xesam-support/src/trackerd



Author: pvanhoof
Date: Fri Apr 25 09:28:05 2008
New Revision: 1310
URL: http://svn.gnome.org/viewvc/tracker?rev=1310&view=rev

Log:
Added some documentation

Modified:
   branches/xesam-support/src/trackerd/tracker-xesam-live-search.c

Modified: branches/xesam-support/src/trackerd/tracker-xesam-live-search.c
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-xesam-live-search.c	(original)
+++ branches/xesam-support/src/trackerd/tracker-xesam-live-search.c	Fri Apr 25 09:28:05 2008
@@ -186,6 +186,35 @@
 	*count = 0;
 }
 
+
+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 
+ * consists of an array of fields as requested through the session property 
+ * hit.fields, or as method parameter in the case of GetHitData. All available 
+ * fields can be found in the Xesam Ontology. Since the signature of the return 
+ * value is aav a single hit is on the form av. This allows hit properties to be 
+ * integers, strings or arrays of any type. An array of strings is fx. needed 
+ * for email CC fields and keywords/tags for example.
+ *
+ * The returned fields are ordered according to hit.fields. Fx. 
+ * if hit.fields = ["xesam:title", "xesam:userKeywords", "xesam:size"], a 
+ * return value would look like:
+ *
+ * [
+ *  ["Desktop Search Survey", ["xesam", "search", "hot stuff"], 54367]
+ *  ["Gnome Tips and Tricks", ["gnome", "hacking"], 437294]
+ * ]
+ *
+ * It's a root GPtrArray with 'GPtrArray' typed elements. Those child GPtrArray
+ * elements contain GValue instances.
+ **/
+}
+
 /**
  * tracker_xesam_live_search_get_hits:
  * @self: a #TrackerXesamLiveSearch
@@ -207,6 +236,8 @@
 
 	// todo
 
+	get_hit_data (self, hits);
+
 	if (!priv->active)
 		g_set_error (error, TRACKER_XESAM_ERROR, 
 				TRACKER_XESAM_ERROR_SEARCH_NOT_ACTIVE,
@@ -249,6 +280,8 @@
 
 	// todo
 
+	get_hit_data (self, hit_data);
+
 	if (!priv->active)
 		g_set_error (error, TRACKER_XESAM_ERROR, 
 				TRACKER_XESAM_ERROR_SEARCH_NOT_ACTIVE,



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