tracker r1755 - in branches/indexer-split: . src/tracker-indexer/modules
- From: carlosg svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1755 - in branches/indexer-split: . src/tracker-indexer/modules
- Date: Tue, 24 Jun 2008 15:36:48 +0000 (UTC)
Author: carlosg
Date: Tue Jun 24 15:36:48 2008
New Revision: 1755
URL: http://svn.gnome.org/viewvc/tracker?rev=1755&view=rev
Log:
2008-06-24 Carlos Garnacho <carlos imendio com>
* src/tracker-indexer/modules/dummy.c: Update API, also add more
thorough comments about what should be going on in each method.
Modified:
branches/indexer-split/ChangeLog
branches/indexer-split/src/tracker-indexer/modules/dummy.c
Modified: branches/indexer-split/src/tracker-indexer/modules/dummy.c
==============================================================================
--- branches/indexer-split/src/tracker-indexer/modules/dummy.c (original)
+++ branches/indexer-split/src/tracker-indexer/modules/dummy.c Tue Jun 24 15:36:48 2008
@@ -29,13 +29,68 @@
gchar **
tracker_module_get_directories (void)
{
- /* Return directories/files to scan */
+ /* Return directories/files (a NULL-ended array of gchar*) to scan */
return NULL;
}
+gpointer
+tracker_module_file_get_data (const gchar *path)
+{
+ /* Implementing this function is optional.
+ *
+ * Return here private, module specific data for path.
+ * Given this data is attached to the file until it isn't
+ * needed anymore. This is usually used for files that
+ * contain sets of data that should be considered as separate
+ * entities (for example, mboxes), so the module can internally
+ * keep the state. Also see tracker_module_file_iter_contents().
+ */
+ return NULL;
+}
+
+void
+tracker_module_file_free_data (gpointer file_data)
+{
+ /* Implementing this function is optional
+ *
+ * Free the data created previously
+ * through tracker_module_file_get_data()
+ */
+}
+
GHashTable *
-tracker_module_get_file_metadata (const gchar *file)
+tracker_module_file_get_metadata (TrackerFile *file)
{
- /* Return a hashtable filled with metadata for the file */
+ /* Return a hashtable filled with metadata for file, given the
+ * current state. Also see tracker_module_file_iter_contents()
+ */
return NULL;
}
+
+gchar *
+tracker_module_file_get_text (TrackerFile *file)
+{
+ /* Implementing this function is optional
+ *
+ * Return here full text for file, given the current state,
+ * also see tracker_module_file_iter_contents()
+ */
+ return NULL;
+}
+
+gboolean
+tracker_module_file_iter_contents (TrackerFile *file)
+{
+ /* Implementing this function is optional
+ *
+ * This function is meant to iterate the internal state,
+ * so it points to the next entity inside the file.
+ * In case there is such next entity, this function must
+ * return TRUE, else, returning FALSE will make the indexer
+ * think it is done with this file and move on to the next one.
+ *
+ * What an "entity" is considered is left to the module
+ * implementation.
+ */
+ return FALSE;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]