[tracker/follow-symlinks: 1/7] libtracker-miner: Removed TrackerCrawlFlags and use TrackerDirectoryFlags
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/follow-symlinks: 1/7] libtracker-miner: Removed TrackerCrawlFlags and use TrackerDirectoryFlags
- Date: Thu, 4 Sep 2014 16:31:25 +0000 (UTC)
commit 9d8977c1635f60d8b4749f45dbf446798f29891d
Author: Martyn Russell <martyn lanedo com>
Date: Thu Sep 4 14:08:51 2014 +0100
libtracker-miner: Removed TrackerCrawlFlags and use TrackerDirectoryFlags
The _NO_STAT and _FOLLOW_SYMLINKS flags have been added.
src/libtracker-miner/tracker-crawler.c | 32 +++--
src/libtracker-miner/tracker-data-provider.c | 62 +++++-----
src/libtracker-miner/tracker-data-provider.h | 134 ++++++++++----------
src/libtracker-miner/tracker-file-data-provider.c | 66 ++++++-----
src/libtracker-miner/tracker-file-enumerator.c | 2 -
src/libtracker-miner/tracker-indexing-tree.c | 27 +++--
src/libtracker-miner/tracker-miner-enums.h | 67 +++++------
7 files changed, 203 insertions(+), 187 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-crawler.c b/src/libtracker-miner/tracker-crawler.c
index 9fd7d09..1d84aca 100644
--- a/src/libtracker-miner/tracker-crawler.c
+++ b/src/libtracker-miner/tracker-crawler.c
@@ -72,6 +72,8 @@ struct DirectoryRootInfo {
GQueue *directory_processing_queue;
+ TrackerDirectoryFlags flags;
+
DataProviderData *dpd;
/* Directory stats */
@@ -464,14 +466,13 @@ directory_processing_data_add_child (DirectoryProcessingData *data,
}
static DirectoryRootInfo *
-directory_root_info_new (GFile *file,
- gint max_depth,
- gchar *file_attributes,
- TrackerCrawlFlags flags)
+directory_root_info_new (GFile *file,
+ gint max_depth,
+ gchar *file_attributes,
+ TrackerDirectoryFlags flags)
{
DirectoryRootInfo *info;
DirectoryProcessingData *dir_info;
- gboolean enable_stat;
info = g_slice_new0 (DirectoryRootInfo);
@@ -481,14 +482,21 @@ directory_root_info_new (GFile *file,
info->tree = g_node_new (g_object_ref (file));
- enable_stat = (flags & TRACKER_CRAWL_FLAG_NO_STAT) == 0;
+ info->flags = flags;
- if (enable_stat && file_attributes) {
+ if (file_attributes) {
GFileInfo *file_info;
+ GFileQueryInfoFlags file_flags;
+
+ file_flags = G_FILE_QUERY_INFO_NONE;
+
+ if ((info->flags & TRACKER_DIRECTORY_FLAG_NO_STAT) != 0) {
+ file_flags |= G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS;
+ }
file_info = g_file_query_info (file,
file_attributes,
- G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
+ file_flags,
NULL,
NULL);
g_object_set_qdata_full (G_OBJECT (file),
@@ -1012,7 +1020,7 @@ data_provider_begin (TrackerCrawler *crawler,
tracker_data_provider_begin_async (crawler->priv->data_provider,
dpd->dir_file,
attrs,
- G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
+ info->flags,
G_PRIORITY_LOW,
dpd->cancellable,
data_provider_begin_cb,
@@ -1026,7 +1034,7 @@ tracker_crawler_start (TrackerCrawler *crawler,
gint max_depth)
{
TrackerCrawlerPrivate *priv;
- TrackerCrawlFlags flags;
+ TrackerDirectoryFlags flags;
DirectoryRootInfo *info;
gboolean enable_stat;
@@ -1035,8 +1043,8 @@ tracker_crawler_start (TrackerCrawler *crawler,
priv = crawler->priv;
- flags = tracker_data_provider_get_crawl_flags (priv->data_provider);
- enable_stat = (flags & TRACKER_CRAWL_FLAG_NO_STAT) == 0;
+ flags = tracker_data_provider_get_dir_flags (priv->data_provider);
+ enable_stat = (flags & TRACKER_DIRECTORY_FLAG_NO_STAT) == 0;
if (enable_stat && !g_file_query_exists (file, NULL)) {
/* This shouldn't happen, unless the removal/unmount notification
diff --git a/src/libtracker-miner/tracker-data-provider.c b/src/libtracker-miner/tracker-data-provider.c
index f0c83d9..5045548 100644
--- a/src/libtracker-miner/tracker-data-provider.c
+++ b/src/libtracker-miner/tracker-data-provider.c
@@ -58,42 +58,42 @@ tracker_data_provider_default_init (TrackerDataProviderInterface *iface)
}
/**
- * tracker_data_provider_get_crawl_flags:
+ * tracker_data_provider_get_dir_flags:
* @data_provider: a #TrackerDataProvider
*
* Get the conditions used to provide data, for example, following symlinks.
*
- * Returns: the #TrackerCrawlFlags used with this @data_provider.
+ * Returns: the #TrackerDirectoryFlags used with this @data_provider.
*
* Since: 1.2
**/
-TrackerCrawlFlags
-tracker_data_provider_get_crawl_flags (TrackerDataProvider *data_provider)
+TrackerDirectoryFlags
+tracker_data_provider_get_dir_flags (TrackerDataProvider *data_provider)
{
TrackerDataProviderIface *iface;
- g_return_val_if_fail (TRACKER_IS_DATA_PROVIDER (data_provider), TRACKER_CRAWL_FLAG_NONE);
+ g_return_val_if_fail (TRACKER_IS_DATA_PROVIDER (data_provider), TRACKER_DIRECTORY_FLAG_NONE);
iface = TRACKER_DATA_PROVIDER_GET_IFACE (data_provider);
- g_return_val_if_fail (iface->get_crawl_flags != NULL, TRACKER_CRAWL_FLAG_NONE);
+ g_return_val_if_fail (iface->get_dir_flags != NULL, TRACKER_DIRECTORY_FLAG_NONE);
- return (* iface->get_crawl_flags) (data_provider);
+ return (* iface->get_dir_flags) (data_provider);
}
/**
- * tracker_data_provider_set_crawl_flags:
+ * tracker_data_provider_set_dir_flags:
* @data_provider: a #TrackerDataProvider
- * @flags: the #TrackerCrawlFlags to use
+ * @flags: the #TrackerDirectoryFlags to use
*
- * Sets the #TrackerCrawlFlags used with this @data_provider. Each time
- * tracker_data_provider_begin() is called, these flags are used.
+ * Sets the #TrackerDirectoryFlags used with this @data_provider. Each
+ * time tracker_data_provider_begin() is called, these flags are used.
*
* Since: 1.2
**/
void
-tracker_data_provider_set_crawl_flags (TrackerDataProvider *data_provider,
- TrackerCrawlFlags flags)
+tracker_data_provider_set_dir_flags (TrackerDataProvider *data_provider,
+ TrackerDirectoryFlags flags)
{
TrackerDataProviderIface *iface;
@@ -101,9 +101,9 @@ tracker_data_provider_set_crawl_flags (TrackerDataProvider *data_provider,
iface = TRACKER_DATA_PROVIDER_GET_IFACE (data_provider);
- g_return_if_fail (iface->set_crawl_flags != NULL);
+ g_return_if_fail (iface->set_dir_flags != NULL);
- (* iface->set_crawl_flags) (data_provider, flags);
+ (* iface->set_dir_flags) (data_provider, flags);
}
/**
@@ -111,7 +111,7 @@ tracker_data_provider_set_crawl_flags (TrackerDataProvider *data_provider,
* @data_provider: a #TrackerDataProvider
* @url: a #GFile to enumerate
* @attributes: an attribute query string
- * @flags: a set of GFileQueryInfoFlags
+ * @flags: a set of #TrackerDirectoryFlags
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
* @error: location to store the error occurring, or %NULL to ignore
*
@@ -135,12 +135,12 @@ tracker_data_provider_set_crawl_flags (TrackerDataProvider *data_provider,
* Since: 1.2
**/
TrackerEnumerator *
-tracker_data_provider_begin (TrackerDataProvider *data_provider,
- GFile *url,
- const gchar *attributes,
- GFileQueryInfoFlags flags,
- GCancellable *cancellable,
- GError **error)
+tracker_data_provider_begin (TrackerDataProvider *data_provider,
+ GFile *url,
+ const gchar *attributes,
+ TrackerDirectoryFlags flags,
+ GCancellable *cancellable,
+ GError **error)
{
TrackerDataProviderIface *iface;
@@ -168,7 +168,7 @@ tracker_data_provider_begin (TrackerDataProvider *data_provider,
* @data_provider: a #TrackerDataProvider.
* @url: a #GFile to enumerate
* @attributes: an attribute query string
- * @flags: a set of GFileQueryInfoFlags
+ * @flags: a set of #TrackerDirectoryFlags
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (allow-none): optional #GCancellable object, %NULL to
* ignore
@@ -200,14 +200,14 @@ tracker_data_provider_begin (TrackerDataProvider *data_provider,
* Since: 1.2
**/
void
-tracker_data_provider_begin_async (TrackerDataProvider *data_provider,
- GFile *url,
- const gchar *attributes,
- GFileQueryInfoFlags flags,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
+tracker_data_provider_begin_async (TrackerDataProvider *data_provider,
+ GFile *url,
+ const gchar *attributes,
+ TrackerDirectoryFlags flags,
+ int io_priority,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
TrackerDataProviderIface *iface;
diff --git a/src/libtracker-miner/tracker-data-provider.h b/src/libtracker-miner/tracker-data-provider.h
index b9da4dc..18b9905 100644
--- a/src/libtracker-miner/tracker-data-provider.h
+++ b/src/libtracker-miner/tracker-data-provider.h
@@ -74,43 +74,43 @@ struct _TrackerDataProviderIface {
GTypeInterface g_iface;
/* Virtual Table */
- TrackerCrawlFlags (* get_crawl_flags) (TrackerDataProvider *data_provider);
- void (* set_crawl_flags) (TrackerDataProvider *data_provider,
- TrackerCrawlFlags flags);
+ TrackerDirectoryFlags (* get_dir_flags) (TrackerDataProvider *data_provider);
+ void (* set_dir_flags) (TrackerDataProvider *data_provider,
+ TrackerDirectoryFlags flags);
/* Start the data_provider for a given location, attributes and flags */
- TrackerEnumerator * (* begin) (TrackerDataProvider *data_provider,
- GFile *url,
- const gchar *attributes,
- GFileQueryInfoFlags flags,
- GCancellable *cancellable,
- GError **error);
- void (* begin_async) (TrackerDataProvider *data_provider,
- GFile *url,
- const gchar *attributes,
- GFileQueryInfoFlags flags,
- gint io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
- TrackerEnumerator * (* begin_finish) (TrackerDataProvider *data_provider,
- GAsyncResult *result,
- GError **error);
+ TrackerEnumerator * (* begin) (TrackerDataProvider *data_provider,
+ GFile *url,
+ const gchar *attributes,
+ TrackerDirectoryFlags flags,
+ GCancellable *cancellable,
+ GError **error);
+ void (* begin_async) (TrackerDataProvider *data_provider,
+ GFile *url,
+ const gchar *attributes,
+ TrackerDirectoryFlags flags,
+ gint io_priority,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ TrackerEnumerator * (* begin_finish) (TrackerDataProvider *data_provider,
+ GAsyncResult *result,
+ GError **error);
/* Close the given location */
- gboolean (* end) (TrackerDataProvider *data_provider,
- TrackerEnumerator *enumerator,
- GCancellable *cancellable,
- GError **error);
- void (* end_async) (TrackerDataProvider *data_provider,
- TrackerEnumerator *enumerator,
- gint io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
- gboolean (* end_finish) (TrackerDataProvider *data_provider,
- GAsyncResult *result,
- GError **error);
+ gboolean (* end) (TrackerDataProvider *data_provider,
+ TrackerEnumerator *enumerator,
+ GCancellable *cancellable,
+ GError **error);
+ void (* end_async) (TrackerDataProvider *data_provider,
+ TrackerEnumerator *enumerator,
+ gint io_priority,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ gboolean (* end_finish) (TrackerDataProvider *data_provider,
+ GAsyncResult *result,
+ GError **error);
/*< private >*/
/* Padding for future expansion */
@@ -125,40 +125,40 @@ struct _TrackerDataProviderIface {
};
GType tracker_data_provider_get_type (void) G_GNUC_CONST;
-
-TrackerCrawlFlags tracker_data_provider_get_crawl_flags (TrackerDataProvider *data_provider);
-void tracker_data_provider_set_crawl_flags (TrackerDataProvider *data_provider,
- TrackerCrawlFlags flags);
-TrackerEnumerator *tracker_data_provider_begin (TrackerDataProvider *data_provider,
- GFile *url,
- const gchar *attributes,
- GFileQueryInfoFlags flags,
- GCancellable *cancellable,
- GError **error);
-void tracker_data_provider_begin_async (TrackerDataProvider *data_provider,
- GFile *url,
- const gchar *attributes,
- GFileQueryInfoFlags flags,
- gint io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
-TrackerEnumerator *tracker_data_provider_begin_finish (TrackerDataProvider *data_provider,
- GAsyncResult *result,
- GError **error);
-gboolean tracker_data_provider_end (TrackerDataProvider *data_provider,
- TrackerEnumerator *enumerator,
- GCancellable *cancellable,
- GError **error);
-void tracker_data_provider_end_async (TrackerDataProvider *data_provider,
- TrackerEnumerator *enumerator,
- gint io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
-gboolean tracker_data_provider_end_finish (TrackerDataProvider *data_provider,
- GAsyncResult *result,
- GError **error);
+TrackerDirectoryFlags
+ tracker_data_provider_get_dir_flags (TrackerDataProvider *data_provider);
+void tracker_data_provider_set_dir_flags (TrackerDataProvider *data_provider,
+ TrackerDirectoryFlags flags);
+TrackerEnumerator *tracker_data_provider_begin (TrackerDataProvider *data_provider,
+ GFile *url,
+ const gchar *attributes,
+ TrackerDirectoryFlags flags,
+ GCancellable *cancellable,
+ GError **error);
+void tracker_data_provider_begin_async (TrackerDataProvider *data_provider,
+ GFile *url,
+ const gchar *attributes,
+ TrackerDirectoryFlags flags,
+ gint io_priority,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+TrackerEnumerator *tracker_data_provider_begin_finish (TrackerDataProvider *data_provider,
+ GAsyncResult *result,
+ GError **error);
+gboolean tracker_data_provider_end (TrackerDataProvider *data_provider,
+ TrackerEnumerator *enumerator,
+ GCancellable *cancellable,
+ GError **error);
+void tracker_data_provider_end_async (TrackerDataProvider *data_provider,
+ TrackerEnumerator *enumerator,
+ gint io_priority,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+gboolean tracker_data_provider_end_finish (TrackerDataProvider *data_provider,
+ GAsyncResult *result,
+ GError **error);
G_END_DECLS
diff --git a/src/libtracker-miner/tracker-file-data-provider.c
b/src/libtracker-miner/tracker-file-data-provider.c
index 8e72fbd..0cebc0a 100644
--- a/src/libtracker-miner/tracker-file-data-provider.c
+++ b/src/libtracker-miner/tracker-file-data-provider.c
@@ -28,13 +28,13 @@ static void tracker_file_data_provider_file_iface_init (TrackerDataProviderIface
struct _TrackerFileDataProvider {
GObject parent_instance;
- TrackerCrawlFlags crawl_flags;
+ TrackerDirectoryFlags dir_flags;
};
typedef struct {
GFile *url;
gchar *attributes;
- GFileQueryInfoFlags flags;
+ TrackerDirectoryFlags flags;
} BeginData;
/**
@@ -72,34 +72,34 @@ tracker_file_data_provider_class_init (TrackerFileDataProviderClass *klass)
static void
tracker_file_data_provider_init (TrackerFileDataProvider *fe)
{
- fe->crawl_flags = TRACKER_CRAWL_FLAG_NONE;
+ fe->dir_flags = TRACKER_DIRECTORY_FLAG_NONE;
}
-static TrackerCrawlFlags
-file_data_provider_get_crawl_flags (TrackerDataProvider *data_provider)
+static TrackerDirectoryFlags
+file_data_provider_get_dir_flags (TrackerDataProvider *data_provider)
{
TrackerFileDataProvider *fe;
fe = TRACKER_FILE_DATA_PROVIDER (data_provider);
- return fe->crawl_flags;
+ return fe->dir_flags;
}
static void
-file_data_provider_set_crawl_flags (TrackerDataProvider *data_provider,
- TrackerCrawlFlags flags)
+file_data_provider_set_dir_flags (TrackerDataProvider *data_provider,
+ TrackerDirectoryFlags flags)
{
TrackerFileDataProvider *fe;
fe = TRACKER_FILE_DATA_PROVIDER (data_provider);
- fe->crawl_flags = flags;
+ fe->dir_flags = flags;
}
static BeginData *
-begin_data_new (GFile *url,
- const gchar *attributes,
- GFileQueryInfoFlags flags)
+begin_data_new (GFile *url,
+ const gchar *attributes,
+ TrackerDirectoryFlags flags)
{
BeginData *data;
@@ -125,14 +125,15 @@ begin_data_free (BeginData *data)
}
static TrackerEnumerator *
-file_data_provider_begin (TrackerDataProvider *data_provider,
- GFile *url,
- const gchar *attributes,
- GFileQueryInfoFlags flags,
- GCancellable *cancellable,
- GError **error)
+file_data_provider_begin (TrackerDataProvider *data_provider,
+ GFile *url,
+ const gchar *attributes,
+ TrackerDirectoryFlags flags,
+ GCancellable *cancellable,
+ GError **error)
{
TrackerEnumerator *enumerator;
+ GFileQueryInfoFlags file_flags;
GFileEnumerator *fe;
GError *local_error = NULL;
@@ -140,13 +141,18 @@ file_data_provider_begin (TrackerDataProvider *data_provider,
return NULL;
}
+ file_flags = G_FILE_QUERY_INFO_NONE;
+
+ if ((flags & TRACKER_DIRECTORY_FLAG_NO_STAT) != 0) {
+ file_flags |= G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS;
+ }
+
fe = g_file_enumerate_children (url,
attributes,
- flags,
+ file_flags,
cancellable,
&local_error);
-
if (local_error) {
gchar *uri;
@@ -197,14 +203,14 @@ file_data_provider_begin_thread (GTask *task,
}
static void
-file_data_provider_begin_async (TrackerDataProvider *data_provider,
- GFile *dir,
- const gchar *attributes,
- GFileQueryInfoFlags flags,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
+file_data_provider_begin_async (TrackerDataProvider *data_provider,
+ GFile *dir,
+ const gchar *attributes,
+ TrackerDirectoryFlags flags,
+ int io_priority,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
GTask *task;
@@ -293,8 +299,8 @@ file_data_provider_end_finish (TrackerDataProvider *data_provider,
static void
tracker_file_data_provider_file_iface_init (TrackerDataProviderIface *iface)
{
- iface->get_crawl_flags = file_data_provider_get_crawl_flags;
- iface->set_crawl_flags = file_data_provider_set_crawl_flags;
+ iface->get_dir_flags = file_data_provider_get_dir_flags;
+ iface->set_dir_flags = file_data_provider_set_dir_flags;
iface->begin = file_data_provider_begin;
iface->begin_async = file_data_provider_begin_async;
iface->begin_finish = file_data_provider_begin_finish;
diff --git a/src/libtracker-miner/tracker-file-enumerator.c b/src/libtracker-miner/tracker-file-enumerator.c
index 31a5c66..c08d4ff 100644
--- a/src/libtracker-miner/tracker-file-enumerator.c
+++ b/src/libtracker-miner/tracker-file-enumerator.c
@@ -27,7 +27,6 @@ static void tracker_file_enumerator_file_iface_init (TrackerEnumeratorIface *ifa
struct _TrackerFileEnumerator {
GObject parent_instance;
- TrackerCrawlFlags crawl_flags;
GFileEnumerator *file_enumerator;
};
@@ -72,7 +71,6 @@ tracker_file_enumerator_class_init (TrackerFileEnumeratorClass *klass)
static void
tracker_file_enumerator_init (TrackerFileEnumerator *fe)
{
- fe->crawl_flags = TRACKER_CRAWL_FLAG_NONE;
}
static gpointer
diff --git a/src/libtracker-miner/tracker-indexing-tree.c b/src/libtracker-miner/tracker-indexing-tree.c
index 7a3adae..76591bf 100644
--- a/src/libtracker-miner/tracker-indexing-tree.c
+++ b/src/libtracker-miner/tracker-indexing-tree.c
@@ -698,10 +698,23 @@ tracker_indexing_tree_file_is_indexable (TrackerIndexingTree *tree,
g_return_val_if_fail (TRACKER_IS_INDEXING_TREE (tree), FALSE);
g_return_val_if_fail (G_IS_FILE (file), FALSE);
- if (file_type == G_FILE_TYPE_UNKNOWN)
- file_type = g_file_query_file_type (file,
- G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
- NULL);
+ config_file = tracker_indexing_tree_get_root (tree, file, &config_flags);
+ if (!config_file) {
+ /* Not under an added dir */
+ return FALSE;
+ }
+
+ if (file_type == G_FILE_TYPE_UNKNOWN) {
+ GFileQueryInfoFlags file_flags;
+
+ file_flags = G_FILE_QUERY_INFO_NONE;
+
+ if ((config_flags & TRACKER_DIRECTORY_FLAG_NO_STAT) != 0) {
+ file_flags |= G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS;
+ }
+
+ file_type = g_file_query_file_type (file, file_flags, NULL);
+ }
filter = (file_type == G_FILE_TYPE_DIRECTORY) ?
TRACKER_FILTER_DIRECTORY : TRACKER_FILTER_FILE;
@@ -710,12 +723,6 @@ tracker_indexing_tree_file_is_indexable (TrackerIndexingTree *tree,
return FALSE;
}
- config_file = tracker_indexing_tree_get_root (tree,file, &config_flags);
- if (!config_file) {
- /* Not under an added dir */
- return FALSE;
- }
-
if (config_flags & TRACKER_DIRECTORY_FLAG_IGNORE) {
return FALSE;
}
diff --git a/src/libtracker-miner/tracker-miner-enums.h b/src/libtracker-miner/tracker-miner-enums.h
index 8bd9c55..267135b 100644
--- a/src/libtracker-miner/tracker-miner-enums.h
+++ b/src/libtracker-miner/tracker-miner-enums.h
@@ -37,22 +37,41 @@ G_BEGIN_DECLS
* TrackerDirectoryFlags:
* @TRACKER_DIRECTORY_FLAG_NONE: No flags.
* @TRACKER_DIRECTORY_FLAG_RECURSE: Should recurse in the directory.
- * @TRACKER_DIRECTORY_FLAG_CHECK_MTIME: Should check mtimes of items in the directory.
- * @TRACKER_DIRECTORY_FLAG_MONITOR: Should setup monitors in the items found in the directory.
- * @TRACKER_DIRECTORY_FLAG_IGNORE: Should ignore the directory contents.
- * @TRACKER_DIRECTORY_FLAG_PRESERVE: Should preserve items in the directory even if the directory gets
removed.
- * @TRACKER_DIRECTORY_FLAG_PRIORITY: Internally a priority queue is used and this flag makes sure the
directory is given a priority over other directories queued.
+ * @TRACKER_DIRECTORY_FLAG_CHECK_MTIME: Should check mtimes of items
+ * in the directory.
+ * @TRACKER_DIRECTORY_FLAG_MONITOR: Should setup monitors in the items
+ * found in the directory.
+ * @TRACKER_DIRECTORY_FLAG_IGNORE: Should ignore the directory
+ * contents.
+ * @TRACKER_DIRECTORY_FLAG_PRESERVE: Should preserve items in the
+ * directory even if the directory gets removed.
+ * @TRACKER_DIRECTORY_FLAG_PRIORITY: Internally a priority queue is
+ * used and this flag makes sure the directory is given a priority
+ * over other directories queued.
+ * @TRACKER_DIRECTORY_FLAG_NO_STAT: For cases where the content being
+ * crawled by the #TrackerEnumerator is not local (e.g. it's on a
+ * server somewhere), use the #TRACKER_DIRECTORY_FLAG_NO_STAT flag.
+ * The default is to use stat() and assume we're mining a local or
+ * mounted file system.
+ * @TRACKER_DIRECTORY_FLAG_FOLLOW_SYMLINKS: The #TrackerEnumerator
+ * should follow symlinks. This is disabled by default because it is
+ * easy for Tracker to get into recursive loop situations with
+ * symlinks. For those using interesting scenarios like git-annex or
+ * software heavily using symlinks (and properly) this is for you.
*
- * Flags used when adding a new directory to be indexed in the #TrackerIndexingTree.
+ * Flags used when adding a new directory to be indexed in the
+ * #TrackerIndexingTree, #TrackerDataProvider and #TrackerEnumerator.
*/
typedef enum {
- TRACKER_DIRECTORY_FLAG_NONE = 0,
- TRACKER_DIRECTORY_FLAG_RECURSE = 1 << 1,
- TRACKER_DIRECTORY_FLAG_CHECK_MTIME = 1 << 2,
- TRACKER_DIRECTORY_FLAG_MONITOR = 1 << 3,
- TRACKER_DIRECTORY_FLAG_IGNORE = 1 << 4,
- TRACKER_DIRECTORY_FLAG_PRESERVE = 1 << 5,
- TRACKER_DIRECTORY_FLAG_PRIORITY = 1 << 6
+ TRACKER_DIRECTORY_FLAG_NONE = 0,
+ TRACKER_DIRECTORY_FLAG_RECURSE = 1 << 1,
+ TRACKER_DIRECTORY_FLAG_CHECK_MTIME = 1 << 2,
+ TRACKER_DIRECTORY_FLAG_MONITOR = 1 << 3,
+ TRACKER_DIRECTORY_FLAG_IGNORE = 1 << 4,
+ TRACKER_DIRECTORY_FLAG_PRESERVE = 1 << 5,
+ TRACKER_DIRECTORY_FLAG_PRIORITY = 1 << 6,
+ TRACKER_DIRECTORY_FLAG_NO_STAT = 1 << 7,
+ TRACKER_DIRECTORY_FLAG_FOLLOW_SYMLINKS = 1 << 8,
} TrackerDirectoryFlags;
/**
@@ -109,28 +128,6 @@ typedef enum {
TRACKER_NETWORK_TYPE_LAN
} TrackerNetworkType;
-/**
- * TrackerCrawlFlags:
- * @TRACKER_CRAWL_FLAG_NONE: No flags.
- * @TRACKER_CRAWL_FLAG_NO_STAT: For cases where the content being crawled by the
- * #TrackerEnumerator is not local (e.g. it's on a server somewhere),
- * use the #TRACKER_CRAWL_FLAG_NO_STAT flag. The default is to use
- * stat() and assume we're mining a local or mounted file system.
- * @TRACKER_CRAWL_FLAG_FOLLOW_SYMLINKS: The enumerator should follow
- * symlinks. This is disabled by default because it's easy for Tracker
- * to get into recursive loop situations with symlinks. For those
- * using interesting scenarios like git-annex or software heavily
- * using symlinks (and properly) this is for you.
- *
- * Flags used when crawling directory structures. This can be
- * dependent on the #TrackerEnumerator employed at the time of course.
- */
-typedef enum {
- TRACKER_CRAWL_FLAG_NONE = 0,
- TRACKER_CRAWL_FLAG_NO_STAT = 1 << 1,
- TRACKER_CRAWL_FLAG_FOLLOW_SYMLINKS = 1 << 2,
-} TrackerCrawlFlags;
-
G_END_DECLS
#endif /* __TRACKER_MINER_ENUMS_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]