tracker r1804 - in branches/indexer-split: . data/dbus src/tracker-indexer src/trackerd
- From: carlosg svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1804 - in branches/indexer-split: . data/dbus src/tracker-indexer src/trackerd
- Date: Mon, 30 Jun 2008 12:13:11 +0000 (UTC)
Author: carlosg
Date: Mon Jun 30 12:13:11 2008
New Revision: 1804
URL: http://svn.gnome.org/viewvc/tracker?rev=1804&view=rev
Log:
2008-06-30 Carlos Garnacho <carlos imendio com>
Change tracker-indexer DBus methods, now they also take a string for
the module name to use when indexing a path.
* data/dbus/tracker-indexer.xml: Add new argument to functions.
* src/tracker-indexer/tracker-indexer.[ch]
(tracker_indexer_files_check) (tracker_indexer_files_update)
(tracker_indexer_files_delete): Lookup the passed module name instead
of just assuming the "files" module.
* /src/trackerd/tracker-crawler.c (indexer_get_running_cb):
* /src/trackerd/tracker-monitor.c (indexer_get_running_cb): Update
callers, at the moment it just assumes the "files" module.
Modified:
branches/indexer-split/ChangeLog
branches/indexer-split/data/dbus/tracker-indexer.xml
branches/indexer-split/src/tracker-indexer/tracker-indexer.c
branches/indexer-split/src/tracker-indexer/tracker-indexer.h
branches/indexer-split/src/trackerd/tracker-crawler.c
branches/indexer-split/src/trackerd/tracker-monitor.c
Modified: branches/indexer-split/data/dbus/tracker-indexer.xml
==============================================================================
--- branches/indexer-split/data/dbus/tracker-indexer.xml (original)
+++ branches/indexer-split/data/dbus/tracker-indexer.xml Mon Jun 30 12:13:11 2008
@@ -18,12 +18,15 @@
</method>
<method name="FilesCheck">
+ <arg type="s" name="module" direction="in" />
<arg type="as" name="files" direction="in" />
</method>
<method name="FilesUpdate">
+ <arg type="s" name="module" direction="in" />
<arg type="as" name="files" direction="in" />
</method>
<method name="FilesDelete">
+ <arg type="s" name="module" direction="in" />
<arg type="as" name="files" direction="in" />
</method>
Modified: branches/indexer-split/src/tracker-indexer/tracker-indexer.c
==============================================================================
--- branches/indexer-split/src/tracker-indexer/tracker-indexer.c (original)
+++ branches/indexer-split/src/tracker-indexer/tracker-indexer.c Mon Jun 30 12:13:11 2008
@@ -738,6 +738,7 @@
gboolean
tracker_indexer_files_check (TrackerIndexer *indexer,
+ const gchar *module_name,
GStrv files,
GError **error)
{
@@ -756,13 +757,12 @@
"DBus request to check %d files",
g_strv_length (files));
- /* Assume we're using always the files module, bail out if it's not available */
- module = g_hash_table_lookup (priv->indexer_modules, "files");
+ module = g_hash_table_lookup (priv->indexer_modules, module_name);
if (!module) {
tracker_dbus_request_failed (request_id,
error,
- "The files module is not loaded");
+ "The module is not loaded");
return FALSE;
}
@@ -781,6 +781,7 @@
gboolean
tracker_indexer_files_update (TrackerIndexer *indexer,
+ const gchar *module_name,
GStrv files,
GError **error)
{
@@ -799,13 +800,12 @@
"DBus request to update %d files",
g_strv_length (files));
- /* Assume we're using always the files module, bail out if it's not available */
- module = g_hash_table_lookup (priv->indexer_modules, "files");
+ module = g_hash_table_lookup (priv->indexer_modules, module_name);
if (!module) {
tracker_dbus_request_failed (request_id,
error,
- "The files module is not loaded");
+ "The module is not loaded");
return FALSE;
}
@@ -824,6 +824,7 @@
gboolean
tracker_indexer_files_delete (TrackerIndexer *indexer,
+ const gchar *module_name,
GStrv files,
GError **error)
{
@@ -842,13 +843,12 @@
"DBus request to delete %d files",
g_strv_length (files));
- /* Assume we're using always the files module, bail out if it's not available */
- module = g_hash_table_lookup (priv->indexer_modules, "files");
+ module = g_hash_table_lookup (priv->indexer_modules, module_name);
if (!module) {
tracker_dbus_request_failed (request_id,
error,
- "The files module is not loaded");
+ "The module is not loaded");
return FALSE;
}
Modified: branches/indexer-split/src/tracker-indexer/tracker-indexer.h
==============================================================================
--- branches/indexer-split/src/tracker-indexer/tracker-indexer.h (original)
+++ branches/indexer-split/src/tracker-indexer/tracker-indexer.h Mon Jun 30 12:13:11 2008
@@ -60,12 +60,15 @@
gboolean *is_running,
GError **error);
gboolean tracker_indexer_files_check (TrackerIndexer *indexer,
+ const gchar *module,
GStrv files,
GError **error);
gboolean tracker_indexer_files_update (TrackerIndexer *indexer,
+ const gchar *module,
GStrv files,
GError **error);
gboolean tracker_indexer_files_delete (TrackerIndexer *indexer,
+ const gchar *module,
GStrv files,
GError **error);
Modified: branches/indexer-split/src/trackerd/tracker-crawler.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-crawler.c (original)
+++ branches/indexer-split/src/trackerd/tracker-crawler.c Mon Jun 30 12:13:11 2008
@@ -889,7 +889,8 @@
g_debug ("File check queue processed, sending first %d to the indexer",
g_strv_length (files));
- org_freedesktop_Tracker_Indexer_files_check_async (proxy,
+ org_freedesktop_Tracker_Indexer_files_check_async (proxy,
+ "files",
(const gchar **) files,
indexer_check_files_cb,
files);
Modified: branches/indexer-split/src/trackerd/tracker-monitor.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-monitor.c (original)
+++ branches/indexer-split/src/trackerd/tracker-monitor.c Mon Jun 30 12:13:11 2008
@@ -283,7 +283,8 @@
if (g_strv_length (files) > 0) {
g_debug ("Files deleted queue processed, sending first %d to the indexer",
g_strv_length (files));
- org_freedesktop_Tracker_Indexer_files_delete_async (proxy,
+ org_freedesktop_Tracker_Indexer_files_delete_async (proxy,
+ "files",
(const gchar **) files,
indexer_files_processed_cb,
files);
@@ -296,7 +297,8 @@
if (g_strv_length (files) > 0) {
g_debug ("Files created queue processed, sending first %d to the indexer",
g_strv_length (files));
- org_freedesktop_Tracker_Indexer_files_check_async (proxy,
+ org_freedesktop_Tracker_Indexer_files_check_async (proxy,
+ "files",
(const gchar **) files,
indexer_files_processed_cb,
files);
@@ -310,7 +312,8 @@
if (g_strv_length (files) > 0) {
g_debug ("Files updated queue processed, sending first %d to the indexer",
g_strv_length (files));
- org_freedesktop_Tracker_Indexer_files_update_async (proxy,
+ org_freedesktop_Tracker_Indexer_files_update_async (proxy,
+ "files",
(const gchar **) files,
indexer_files_processed_cb,
files);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]