[tracker/data-provider-monitor-interface] libtracker-miner: Removed unused APIs from tracker-monitor
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/data-provider-monitor-interface] libtracker-miner: Removed unused APIs from tracker-monitor
- Date: Tue, 23 Dec 2014 11:00:40 +0000 (UTC)
commit c1f266111d052ca242c161914513caa8f1b073e2
Author: Martyn Russell <martyn lanedo com>
Date: Tue Dec 23 09:54:44 2014 +0000
libtracker-miner: Removed unused APIs from tracker-monitor
src/libtracker-miner/tracker-miner-fs.c | 4 -
src/libtracker-miner/tracker-monitor.c | 153 -------------------------------
src/libtracker-miner/tracker-monitor.h | 9 --
3 files changed, 0 insertions(+), 166 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 6154550..98824e0 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -1179,10 +1179,6 @@ process_print_stats (TrackerMinerFS *fs)
g_info ("Total files : %d (%d ignored)",
fs->priv->total_files_found,
fs->priv->total_files_ignored);
-#if 0
- g_info ("Total monitors : %d",
- tracker_monitor_get_count (fs->priv->monitor));
-#endif
g_info ("Total processed : %d (%d notified, %d with error)",
fs->priv->total_files_processed,
fs->priv->total_files_notified,
diff --git a/src/libtracker-miner/tracker-monitor.c b/src/libtracker-miner/tracker-monitor.c
index 327882f..8d23772 100644
--- a/src/libtracker-miner/tracker-monitor.c
+++ b/src/libtracker-miner/tracker-monitor.c
@@ -111,20 +111,7 @@ enum {
LAST_SIGNAL
};
-enum {
- PROP_0,
- PROP_ENABLED
-};
-
static void tracker_monitor_finalize (GObject *object);
-static void tracker_monitor_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void tracker_monitor_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
static guint get_kqueue_limit (void);
static guint get_inotify_limit (void);
static GFileMonitor * directory_monitor_new (TrackerMonitor *monitor,
@@ -150,8 +137,6 @@ tracker_monitor_class_init (TrackerMonitorClass *klass)
object_class = G_OBJECT_CLASS (klass);
object_class->finalize = tracker_monitor_finalize;
- object_class->set_property = tracker_monitor_set_property;
- object_class->get_property = tracker_monitor_get_property;
signals[ITEM_CREATED] =
g_signal_new ("item-created",
@@ -211,14 +196,6 @@ tracker_monitor_class_init (TrackerMonitorClass *klass)
G_TYPE_BOOLEAN,
G_TYPE_BOOLEAN);
- g_object_class_install_property (object_class,
- PROP_ENABLED,
- g_param_spec_boolean ("enabled",
- "Enabled",
- "Enabled",
- TRUE,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
-
g_type_class_add_private (object_class, sizeof (TrackerMonitorPrivate));
}
@@ -375,43 +352,6 @@ tracker_monitor_finalize (GObject *object)
G_OBJECT_CLASS (tracker_monitor_parent_class)->finalize (object);
}
-static void
-tracker_monitor_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- switch (prop_id) {
- case PROP_ENABLED:
- tracker_monitor_set_enabled (TRACKER_MONITOR (object),
- g_value_get_boolean (value));
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- }
-}
-
-static void
-tracker_monitor_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- TrackerMonitorPrivate *priv;
-
- priv = TRACKER_MONITOR_GET_PRIVATE (object);
-
- switch (prop_id) {
- case PROP_ENABLED:
- g_value_set_boolean (value, priv->enabled);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- }
-}
-
static guint
get_kqueue_limit (void)
{
@@ -1430,14 +1370,6 @@ tracker_monitor_new (void)
return g_object_new (TRACKER_TYPE_MONITOR, NULL);
}
-gboolean
-tracker_monitor_get_enabled (TrackerMonitor *monitor)
-{
- g_return_val_if_fail (TRACKER_IS_MONITOR (monitor), FALSE);
-
- return monitor->priv->enabled;
-}
-
TrackerIndexingTree *
tracker_monitor_get_indexing_tree (TrackerMonitor *monitor)
{
@@ -1463,48 +1395,6 @@ tracker_monitor_set_indexing_tree (TrackerMonitor *monitor,
}
}
-void
-tracker_monitor_set_enabled (TrackerMonitor *monitor,
- gboolean enabled)
-{
- GList *keys, *k;
-
- g_return_if_fail (TRACKER_IS_MONITOR (monitor));
-
- /* Don't replace all monitors if we are already
- * enabled/disabled.
- */
- if (monitor->priv->enabled == enabled) {
- return;
- }
-
- monitor->priv->enabled = enabled;
- g_object_notify (G_OBJECT (monitor), "enabled");
-
- keys = g_hash_table_get_keys (monitor->priv->monitors);
-
- /* Update state on all monitored dirs */
- for (k = keys; k != NULL; k = k->next) {
- GFile *file;
-
- file = k->data;
-
- if (enabled) {
- GFileMonitor *dir_monitor;
-
- dir_monitor = directory_monitor_new (monitor, file);
- g_hash_table_replace (monitor->priv->monitors,
- g_object_ref (file), dir_monitor);
- } else {
- /* Remove monitor */
- g_hash_table_replace (monitor->priv->monitors,
- g_object_ref (file), NULL);
- }
- }
-
- g_list_free (keys);
-}
-
gboolean
tracker_monitor_add (TrackerMonitor *monitor,
GFile *file)
@@ -1657,46 +1547,3 @@ monitor_cancel_recursively (TrackerMonitor *monitor,
return items_cancelled > 0;
}
-
-gboolean
-tracker_monitor_is_watched (TrackerMonitor *monitor,
- GFile *file)
-{
- g_return_val_if_fail (TRACKER_IS_MONITOR (monitor), FALSE);
- g_return_val_if_fail (G_IS_FILE (file), FALSE);
-
- return g_hash_table_lookup (monitor->priv->monitors, file) != NULL;
-}
-
-gboolean
-tracker_monitor_is_watched_by_string (TrackerMonitor *monitor,
- const gchar *path)
-{
- GFile *file;
- gboolean watched;
-
- g_return_val_if_fail (TRACKER_IS_MONITOR (monitor), FALSE);
- g_return_val_if_fail (path != NULL, FALSE);
-
- file = g_file_new_for_path (path);
- watched = g_hash_table_lookup (monitor->priv->monitors, file) != NULL;
- g_object_unref (file);
-
- return watched;
-}
-
-guint
-tracker_monitor_get_count (TrackerMonitor *monitor)
-{
- g_return_val_if_fail (TRACKER_IS_MONITOR (monitor), 0);
-
- return g_hash_table_size (monitor->priv->monitors);
-}
-
-guint
-tracker_monitor_get_ignored (TrackerMonitor *monitor)
-{
- g_return_val_if_fail (TRACKER_IS_MONITOR (monitor), 0);
-
- return monitor->priv->monitors_ignored;
-}
diff --git a/src/libtracker-miner/tracker-monitor.h b/src/libtracker-miner/tracker-monitor.h
index 132a530..9fed653 100644
--- a/src/libtracker-miner/tracker-monitor.h
+++ b/src/libtracker-miner/tracker-monitor.h
@@ -57,9 +57,6 @@ TrackerIndexingTree * tracker_monitor_get_indexing_tree (TrackerMonitor *monitor
void tracker_monitor_set_indexing_tree (TrackerMonitor *monitor,
TrackerIndexingTree *tree);
-gboolean tracker_monitor_get_enabled (TrackerMonitor *monitor);
-void tracker_monitor_set_enabled (TrackerMonitor *monitor,
- gboolean enabled);
gboolean tracker_monitor_add (TrackerMonitor *monitor,
GFile *file);
gboolean tracker_monitor_remove (TrackerMonitor *monitor,
@@ -69,12 +66,6 @@ gboolean tracker_monitor_remove_recursively (TrackerMonitor *monitor,
gboolean tracker_monitor_move (TrackerMonitor *monitor,
GFile *old_file,
GFile *new_file);
-gboolean tracker_monitor_is_watched (TrackerMonitor *monitor,
- GFile *file);
-gboolean tracker_monitor_is_watched_by_string (TrackerMonitor *monitor,
- const gchar *path);
-guint tracker_monitor_get_count (TrackerMonitor *monitor);
-guint tracker_monitor_get_ignored (TrackerMonitor *monitor);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]