Commit eca20b67 authored by Carlos Garnacho's avatar Carlos Garnacho

libtracker-miner: Drop filter_event vfunc

This went unused with the removal of writeback miner hooks.
parent 42b506b5
......@@ -2083,20 +2083,6 @@ miner_fs_queue_event (TrackerMinerFS *fs,
}
}
static gboolean
filter_event (TrackerMinerFS *fs,
TrackerMinerFSEventType type,
GFile *file,
GFile *source_file)
{
TrackerMinerFSClass *klass = TRACKER_MINER_FS_GET_CLASS (fs);
if (!klass->filter_event)
return FALSE;
return klass->filter_event (fs, type, file, source_file);
}
static void
file_notifier_file_created (TrackerFileNotifier *notifier,
GFile *file,
......@@ -2105,9 +2091,6 @@ file_notifier_file_created (TrackerFileNotifier *notifier,
TrackerMinerFS *fs = user_data;
QueueEvent *event;
if (filter_event (fs, TRACKER_MINER_FS_EVENT_CREATED, file, NULL))
return;
event = queue_event_new (TRACKER_MINER_FS_EVENT_CREATED, file);
miner_fs_queue_event (fs, event, miner_fs_get_queue_priority (fs, file));
}
......@@ -2120,9 +2103,6 @@ file_notifier_file_deleted (TrackerFileNotifier *notifier,
TrackerMinerFS *fs = user_data;
QueueEvent *event;
if (filter_event (fs, TRACKER_MINER_FS_EVENT_DELETED, file, NULL))
return;
if (tracker_file_notifier_get_file_type (notifier, file) == G_FILE_TYPE_DIRECTORY) {
/* Cancel all pending tasks on files inside the path given by file */
tracker_task_pool_foreach (fs->priv->task_pool,
......@@ -2143,10 +2123,6 @@ file_notifier_file_updated (TrackerFileNotifier *notifier,
TrackerMinerFS *fs = user_data;
QueueEvent *event;
if (!attributes_only &&
filter_event (fs, TRACKER_MINER_FS_EVENT_UPDATED, file, NULL))
return;
event = queue_event_new (TRACKER_MINER_FS_EVENT_UPDATED, file);
event->attributes_update = attributes_only;
miner_fs_queue_event (fs, event, miner_fs_get_queue_priority (fs, file));
......@@ -2161,9 +2137,6 @@ file_notifier_file_moved (TrackerFileNotifier *notifier,
TrackerMinerFS *fs = user_data;
QueueEvent *event;
if (filter_event (fs, TRACKER_MINER_FS_EVENT_MOVED, dest, source))
return;
event = queue_event_moved_new (source, dest);
miner_fs_queue_event (fs, event, miner_fs_get_queue_priority (fs, source));
}
......
......@@ -83,7 +83,6 @@ struct _TrackerMinerFS {
* @remove_file: Called when a file is removed.
* @remove_children: Called when children have been removed.
* @move_file: Called when a file has moved.
* @filter_event: Called to filter the event happening to a file.
* @padding: Reserved for future API improvements.
*
* Prototype for the abstract class, @process_file must be implemented
......@@ -118,12 +117,6 @@ typedef struct {
GFile *dest,
GFile *source,
gboolean recursive);
gboolean (* filter_event) (TrackerMinerFS *fs,
TrackerMinerFSEventType type,
GFile *file,
GFile *source_file);
/* <Private> */
gpointer padding[20];
} TrackerMinerFSClass;
......
......@@ -154,18 +154,6 @@ test_miner_move_file (TrackerMinerFS *miner,
return sparql;
}
static gboolean
test_miner_filter_event (TrackerMinerFS *miner,
TrackerMinerFSEventType type,
GFile *file,
GFile *source_file)
{
TestMiner *m = (TestMiner *) miner;
m->n_events++;
return FALSE;
}
static void
test_miner_finished (TrackerMinerFS *miner,
gdouble elapsed,
......@@ -187,7 +175,6 @@ test_miner_class_init (TestMinerClass *klass)
fs_class->remove_file = test_miner_remove_file;
fs_class->remove_children = test_miner_remove_children;
fs_class->move_file = test_miner_move_file;
fs_class->filter_event = test_miner_filter_event;
fs_class->finished = test_miner_finished;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment