[tracker/libtracker-miner] Rename config _enable_watches() to _enable_monitors()
- From: Martyn James Russell <mr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/libtracker-miner] Rename config _enable_watches() to _enable_monitors()
- Date: Mon, 17 Aug 2009 11:27:49 +0000 (UTC)
commit f2f3f432823317bc1d5e1af800df880c51ff636e
Author: Martyn Russell <martyn imendio com>
Date: Mon Aug 17 10:14:01 2009 +0100
Rename config _enable_watches() to _enable_monitors()
Also remove functions in header which no longer exist
src/tracker-miner-fs/tracker-config.c | 97 +++++++++++++++++++-------------
src/tracker-miner-fs/tracker-config.h | 23 +-------
src/tracker-miner-fs/tracker-monitor.c | 2 +-
3 files changed, 61 insertions(+), 61 deletions(-)
---
diff --git a/src/tracker-miner-fs/tracker-config.c b/src/tracker-miner-fs/tracker-config.c
index deb731f..4523be3 100644
--- a/src/tracker-miner-fs/tracker-config.c
+++ b/src/tracker-miner-fs/tracker-config.c
@@ -42,7 +42,7 @@
/* Default values */
#define DEFAULT_VERBOSITY 0
#define DEFAULT_INITIAL_SLEEP 15 /* 0->1000 */
-#define DEFAULT_ENABLE_WATCHES TRUE
+#define DEFAULT_ENABLE_MONITORS TRUE
#define DEFAULT_THROTTLE 0 /* 0->20 */
#define DEFAULT_ENABLE_THUMBNAILS TRUE
#define DEFAULT_DISABLE_INDEXING_ON_BATTERY TRUE
@@ -56,11 +56,21 @@ typedef struct {
gint verbosity;
gint initial_sleep;
- /* Watches */
- GSList *watch_directory_roots;
- GSList *crawl_directory_roots;
+ /* Monitors */
+ gboolean enable_monitors;
+
+ /* To be removed */
+ GSList *watch_directory_roots;
GSList *no_watch_directory_roots;
- gboolean enable_watches;
+ GSList *crawl_directory_roots;
+ /* To be removed */
+
+ GSList *monitor_directories;
+ GSList *monitor_directories_ignored;
+ GSList *monitor_recurse_directories;
+
+ guint scan_timeout;
+ guint cache_timeout;
/* Indexing */
gint throttle;
@@ -70,7 +80,16 @@ typedef struct {
gboolean disable_indexing_on_battery_init;
gint low_disk_space_limit;
gboolean index_mounted_directories;
- gboolean index_removable_devices;
+ gboolean index_removable_devices;
+
+ GSList *directory_roots;
+
+ GSList *ignored_directories;
+ GSList *ignored_directories_with_content;
+ GSList *ignored_files;
+
+ GSList *ignored_directory_patterns;
+ GSList *ignored_file_patterns;
} TrackerConfigPrivate;
typedef struct {
@@ -103,8 +122,8 @@ enum {
PROP_VERBOSITY,
PROP_INITIAL_SLEEP,
- /* Watches */
- PROP_ENABLE_WATCHES,
+ /* Monitors */
+ PROP_ENABLE_MONITORS,
PROP_WATCH_DIRECTORY_ROOTS,
PROP_CRAWL_DIRECTORY_ROOTS,
PROP_NO_WATCH_DIRECTORY_ROOTS,
@@ -123,7 +142,7 @@ enum {
static ObjectToKeyFile conversions[] = {
{ G_TYPE_INT, "verbosity", GROUP_GENERAL, "Verbosity" },
{ G_TYPE_INT, "initial-sleep", GROUP_GENERAL, "InitialSleep" },
- { G_TYPE_BOOLEAN, "enable-watches", GROUP_MONITORS, "EnableWatches" },
+ { G_TYPE_BOOLEAN, "enable-monitors", GROUP_MONITORS, "EnableMonitors" },
{ G_TYPE_POINTER, "watch-directory-roots", GROUP_MONITORS, "WatchDirectoryRoots" },
{ G_TYPE_POINTER, "crawl-directory-roots", GROUP_MONITORS, "CrawlDirectoryRoots" },
{ G_TYPE_POINTER, "no-watch-directory-roots", GROUP_MONITORS, "NoWatchDirectory" },
@@ -170,11 +189,11 @@ tracker_config_class_init (TrackerConfigClass *klass)
/* Monitors */
g_object_class_install_property (object_class,
- PROP_ENABLE_WATCHES,
- g_param_spec_boolean ("enable-watches",
- "Enable watches",
- " Set to false to completely disable any watching",
- DEFAULT_ENABLE_WATCHES,
+ PROP_ENABLE_MONITORS,
+ g_param_spec_boolean ("enable-monitors",
+ "Enable monitors",
+ " Set to false to completely disable any monitoring",
+ DEFAULT_ENABLE_MONITORS,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class,
PROP_WATCH_DIRECTORY_ROOTS,
@@ -278,7 +297,11 @@ config_set_property (GObject *object,
g_value_get_int (value));
break;
- /* Watches */
+ /* Monitors */
+ case PROP_ENABLE_MONITORS:
+ tracker_config_set_enable_monitors (TRACKER_CONFIG (object),
+ g_value_get_boolean (value));
+ break;
case PROP_WATCH_DIRECTORY_ROOTS:
tracker_config_set_watch_directory_roots (TRACKER_CONFIG (object),
g_value_get_pointer (value));
@@ -292,10 +315,6 @@ config_set_property (GObject *object,
tracker_config_set_no_watch_directory_roots (TRACKER_CONFIG (object),
g_value_get_pointer (value));
break;
- case PROP_ENABLE_WATCHES:
- tracker_config_set_enable_watches (TRACKER_CONFIG (object),
- g_value_get_boolean (value));
- break;
/* Indexing */
case PROP_THROTTLE:
@@ -352,7 +371,10 @@ config_get_property (GObject *object,
g_value_set_int (value, priv->initial_sleep);
break;
- /* Watches */
+ /* Montors */
+ case PROP_ENABLE_MONITORS:
+ g_value_set_boolean (value, priv->enable_monitors);
+ break;
case PROP_WATCH_DIRECTORY_ROOTS:
g_value_set_pointer (value, priv->watch_directory_roots);
break;
@@ -362,9 +384,6 @@ config_get_property (GObject *object,
case PROP_NO_WATCH_DIRECTORY_ROOTS:
g_value_set_pointer (value, priv->no_watch_directory_roots);
break;
- case PROP_ENABLE_WATCHES:
- g_value_set_boolean (value, priv->enable_watches);
- break;
/* Indexing */
case PROP_THROTTLE:
@@ -638,20 +657,20 @@ tracker_config_get_initial_sleep (TrackerConfig *config)
return priv->initial_sleep;
}
-GSList *
-tracker_config_get_watch_directory_roots (TrackerConfig *config)
+gboolean
+tracker_config_get_enable_monitors (TrackerConfig *config)
{
TrackerConfigPrivate *priv;
- g_return_val_if_fail (TRACKER_IS_CONFIG (config), NULL);
+ g_return_val_if_fail (TRACKER_IS_CONFIG (config), DEFAULT_ENABLE_MONITORS);
priv = TRACKER_CONFIG_GET_PRIVATE (config);
- return priv->watch_directory_roots;
+ return priv->enable_monitors;
}
GSList *
-tracker_config_get_crawl_directory_roots (TrackerConfig *config)
+tracker_config_get_watch_directory_roots (TrackerConfig *config)
{
TrackerConfigPrivate *priv;
@@ -659,11 +678,11 @@ tracker_config_get_crawl_directory_roots (TrackerConfig *config)
priv = TRACKER_CONFIG_GET_PRIVATE (config);
- return priv->crawl_directory_roots;
+ return priv->watch_directory_roots;
}
GSList *
-tracker_config_get_no_watch_directory_roots (TrackerConfig *config)
+tracker_config_get_crawl_directory_roots (TrackerConfig *config)
{
TrackerConfigPrivate *priv;
@@ -671,19 +690,19 @@ tracker_config_get_no_watch_directory_roots (TrackerConfig *config)
priv = TRACKER_CONFIG_GET_PRIVATE (config);
- return priv->no_watch_directory_roots;
+ return priv->crawl_directory_roots;
}
-gboolean
-tracker_config_get_enable_watches (TrackerConfig *config)
+GSList *
+tracker_config_get_no_watch_directory_roots (TrackerConfig *config)
{
TrackerConfigPrivate *priv;
- g_return_val_if_fail (TRACKER_IS_CONFIG (config), DEFAULT_ENABLE_WATCHES);
+ g_return_val_if_fail (TRACKER_IS_CONFIG (config), NULL);
priv = TRACKER_CONFIG_GET_PRIVATE (config);
- return priv->enable_watches;
+ return priv->no_watch_directory_roots;
}
gint
@@ -807,8 +826,8 @@ tracker_config_set_initial_sleep (TrackerConfig *config,
}
void
-tracker_config_set_enable_watches (TrackerConfig *config,
- gboolean value)
+tracker_config_set_enable_monitors (TrackerConfig *config,
+ gboolean value)
{
TrackerConfigPrivate *priv;
@@ -816,8 +835,8 @@ tracker_config_set_enable_watches (TrackerConfig *config,
priv = TRACKER_CONFIG_GET_PRIVATE (config);
- priv->enable_watches = value;
- g_object_notify (G_OBJECT (config), "enable-watches");
+ priv->enable_monitors = value;
+ g_object_notify (G_OBJECT (config), "enable-monitors");
}
void
diff --git a/src/tracker-miner-fs/tracker-config.h b/src/tracker-miner-fs/tracker-config.h
index 446e2b0..b575d85 100644
--- a/src/tracker-miner-fs/tracker-config.h
+++ b/src/tracker-miner-fs/tracker-config.h
@@ -55,7 +55,7 @@ gint tracker_config_get_initial_sleep (TrackerConfig *config);
GSList * tracker_config_get_watch_directory_roots (TrackerConfig *config);
GSList * tracker_config_get_crawl_directory_roots (TrackerConfig *config);
GSList * tracker_config_get_no_watch_directory_roots (TrackerConfig *config);
-gboolean tracker_config_get_enable_watches (TrackerConfig *config);
+gboolean tracker_config_get_enable_monitors (TrackerConfig *config);
gint tracker_config_get_throttle (TrackerConfig *config);
gboolean tracker_config_get_enable_thumbnails (TrackerConfig *config);
GSList * tracker_config_get_disabled_modules (TrackerConfig *config);
@@ -69,7 +69,7 @@ void tracker_config_set_verbosity (TrackerConfig *config,
gint value);
void tracker_config_set_initial_sleep (TrackerConfig *config,
gint value);
-void tracker_config_set_enable_watches (TrackerConfig *config,
+void tracker_config_set_enable_monitors (TrackerConfig *config,
gboolean value);
void tracker_config_set_throttle (TrackerConfig *config,
gint value);
@@ -85,25 +85,6 @@ void tracker_config_set_index_removable_devices (TrackerConfig *config
gboolean value);
void tracker_config_set_index_mounted_directories (TrackerConfig *config,
gboolean value);
-
-/* List APIs*/
-void tracker_config_add_watch_directory_roots (TrackerConfig *config,
- gchar * const *roots);
-void tracker_config_add_crawl_directory_roots (TrackerConfig *config,
- gchar * const *roots);
-void tracker_config_add_no_watch_directory_roots (TrackerConfig *config,
- gchar * const *roots);
-void tracker_config_add_disabled_modules (TrackerConfig *config,
- const gchar * const *modules);
-void tracker_config_remove_watch_directory_roots (TrackerConfig *config,
- const gchar *root);
-void tracker_config_remove_crawl_directory_roots (TrackerConfig *config,
- const gchar *root);
-void tracker_config_remove_no_watch_directory_roots (TrackerConfig *config,
- const gchar *root);
-void tracker_config_remove_disabled_modules (TrackerConfig *config,
- const gchar *module);
-
void tracker_config_set_watch_directory_roots (TrackerConfig *config,
GSList *roots);
void tracker_config_set_crawl_directory_roots (TrackerConfig *config,
diff --git a/src/tracker-miner-fs/tracker-monitor.c b/src/tracker-miner-fs/tracker-monitor.c
index c56dd64..d97745f 100644
--- a/src/tracker-miner-fs/tracker-monitor.c
+++ b/src/tracker-miner-fs/tracker-monitor.c
@@ -1388,7 +1388,7 @@ tracker_monitor_add (TrackerMonitor *monitor,
g_return_val_if_fail (module_name != NULL, FALSE);
g_return_val_if_fail (G_IS_FILE (file), FALSE);
- if (!tracker_config_get_enable_watches (monitor->private->config)) {
+ if (!tracker_config_get_enable_monitors (monitor->private->config)) {
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]