tracker r2392 - in trunk: . src/tracker-indexer
- From: carlosg svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2392 - in trunk: . src/tracker-indexer
- Date: Mon, 20 Oct 2008 10:19:42 +0000 (UTC)
Author: carlosg
Date: Mon Oct 20 10:19:41 2008
New Revision: 2392
URL: http://svn.gnome.org/viewvc/tracker?rev=2392&view=rev
Log:
2008-10-20 Carlos Garnacho <carlos imendio com>
* src/tracker-indexer/tracker-indexer.[ch]
(tracker_indexer_process_modules): New public function to specify
which modules should the indexer actually use.
* src/tracker-indexer/tracker-main.c: Add --modules parameter to
specify a closed list of modules, as opposed to --process-all.
Modified:
trunk/ChangeLog
trunk/src/tracker-indexer/tracker-indexer.c
trunk/src/tracker-indexer/tracker-indexer.h
trunk/src/tracker-indexer/tracker-main.c
Modified: trunk/src/tracker-indexer/tracker-indexer.c
==============================================================================
--- trunk/src/tracker-indexer/tracker-indexer.c (original)
+++ trunk/src/tracker-indexer/tracker-indexer.c Mon Oct 20 10:19:41 2008
@@ -2384,6 +2384,22 @@
}
void
+tracker_indexer_process_modules (TrackerIndexer *indexer,
+ gchar **modules)
+{
+ GList *l;
+ gint i;
+
+ for (l = indexer->private->module_names; l; l = l->next) {
+ for (i = 0; modules[i]; i++) {
+ if (strcmp (l->data, modules[i]) == 0) {
+ g_queue_push_tail (indexer->private->modules_queue, g_strdup (l->data));
+ }
+ }
+ }
+}
+
+void
tracker_indexer_files_check (TrackerIndexer *indexer,
const gchar *module_name,
GStrv files,
Modified: trunk/src/tracker-indexer/tracker-indexer.h
==============================================================================
--- trunk/src/tracker-indexer/tracker-indexer.h (original)
+++ trunk/src/tracker-indexer/tracker-indexer.h Mon Oct 20 10:19:41 2008
@@ -78,6 +78,8 @@
gboolean running);
void tracker_indexer_stop (TrackerIndexer *indexer);
void tracker_indexer_process_all (TrackerIndexer *indexer);
+void tracker_indexer_process_modules (TrackerIndexer *indexer,
+ gchar **modules);
/* DBus methods */
void tracker_indexer_pause (TrackerIndexer *indexer,
Modified: trunk/src/tracker-indexer/tracker-main.c
==============================================================================
--- trunk/src/tracker-indexer/tracker-main.c (original)
+++ trunk/src/tracker-indexer/tracker-main.c Mon Oct 20 10:19:41 2008
@@ -64,6 +64,7 @@
static gint verbosity = -1;
static gboolean process_all = FALSE;
static gboolean run_forever = FALSE;
+static gchar **modules = NULL;
static GOptionEntry entries[] = {
{ "verbosity", 'v', 0,
@@ -79,6 +80,10 @@
G_OPTION_ARG_NONE, &run_forever,
N_("Run forever, only interesting for debugging purposes"),
NULL },
+ { "modules", 'm', 0,
+ G_OPTION_ARG_STRING_ARRAY, &modules,
+ N_("Modules to be used when processing data"),
+ NULL },
{ NULL }
};
@@ -356,7 +361,9 @@
if (process_all) {
/* Tell the indexer to process all configured modules */
tracker_indexer_process_all (indexer);
- }
+ } else if (modules) {
+ tracker_indexer_process_modules (indexer, modules);
+ }
g_message ("Starting...");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]