[tracker/tracker-0.10-nb276745: 2/8] tracker-extract: Add convenience function
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.10-nb276745: 2/8] tracker-extract: Add convenience function
- Date: Tue, 18 Oct 2011 10:28:19 +0000 (UTC)
commit ad6b736d8ccbb98b0516a63dca2a5e8217d5c891
Author: Philip Van Hoof <philip codeminded be>
Date: Tue Oct 18 12:21:22 2011 +0200
tracker-extract: Add convenience function
src/tracker-extract/tracker-main.c | 22 ++++++++++++++++++++++
src/tracker-extract/tracker-main.h | 3 +++
2 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-extract/tracker-main.c b/src/tracker-extract/tracker-main.c
index e115975..b9063fc 100644
--- a/src/tracker-extract/tracker-main.c
+++ b/src/tracker-extract/tracker-main.c
@@ -254,6 +254,28 @@ tracker_main_get_config (void)
return config;
}
+
+gboolean
+tracker_main_is_file_ignored_in_image_directories (const gchar *filename)
+{
+ GSList *l;
+ GSList *ignored_content;
+
+ ignored_content = tracker_config_get_ignore_images_directories (config);
+
+ if (!ignored_content) {
+ return FALSE;
+ }
+
+ for (l = ignored_content; l; l = l->next) {
+ if (strstr (filename, l->data) != 0) {
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
static int
run_standalone (void)
{
diff --git a/src/tracker-extract/tracker-main.h b/src/tracker-extract/tracker-main.h
index 77d798e..a87b046 100644
--- a/src/tracker-extract/tracker-main.h
+++ b/src/tracker-extract/tracker-main.h
@@ -33,6 +33,9 @@ void tracker_main_quit_timeout_reset (void);
/* Enables getting the config object from extractors */
TrackerConfig *tracker_main_get_config (void);
+gboolean tracker_main_is_file_ignored_in_image_directories
+ (const gchar *filename);
+
G_END_DECLS
#endif /* __TRACKER_MAIN_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]