[tracker/external-crawler: 7/31] libtracker-miner: Added MinerFSError quark for GErrors returned
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/external-crawler: 7/31] libtracker-miner: Added MinerFSError quark for GErrors returned
- Date: Thu, 19 Jun 2014 14:34:49 +0000 (UTC)
commit 45b58a8f42f076ce3d1d139417872234df95e8d7
Author: Martyn Russell <martyn lanedo com>
Date: Wed May 7 11:37:14 2014 +0100
libtracker-miner: Added MinerFSError quark for GErrors returned
.../libtracker-miner/libtracker-miner-sections.txt | 2 ++
src/libtracker-miner/tracker-miner-fs.c | 17 ++++++++++++++---
src/libtracker-miner/tracker-miner-fs.h | 18 ++++++++++++++++++
3 files changed, 34 insertions(+), 3 deletions(-)
---
diff --git a/docs/reference/libtracker-miner/libtracker-miner-sections.txt
b/docs/reference/libtracker-miner/libtracker-miner-sections.txt
index ff72bbe..cd3dd11 100644
--- a/docs/reference/libtracker-miner/libtracker-miner-sections.txt
+++ b/docs/reference/libtracker-miner/libtracker-miner-sections.txt
@@ -61,6 +61,7 @@ TrackerFilterType
<TITLE>TrackerMinerFS</TITLE>
TrackerMinerFS
TrackerMinerFSClass
+TrackerMinerFSError
tracker_miner_fs_add_directory_without_parent
tracker_miner_fs_check_directory
tracker_miner_fs_check_directory_with_priority
@@ -94,6 +95,7 @@ TRACKER_MINER_FS_GET_CLASS
TRACKER_TYPE_MINER_FS
TrackerMinerFSPrivate
tracker_miner_fs_get_type
+tracker_miner_fs_error_quark
</SECTION>
<SECTION>
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index e7f7042..40bb2bf 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -324,6 +324,8 @@ static GQuark quark_file_iri = 0;
static GInitableIface* miner_fs_initable_parent_iface;
static guint signals[LAST_SIGNAL] = { 0, };
+G_DEFINE_QUARK (TrackerMinerFSError, tracker_miner_fs_error)
+
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (TrackerMinerFS, tracker_miner_fs, TRACKER_TYPE_MINER,
G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE,
miner_fs_initable_iface_init));
@@ -632,7 +634,10 @@ miner_fs_initable_init (GInitable *initable,
limit);
if (!priv->sparql_buffer) {
- /* FIXME: error up here ... */
+ g_set_error (error,
+ tracker_miner_fs_error_quark (),
+ TRACKER_MINER_FS_ERROR_INIT,
+ "Could not create TrackerSparqlBuffer needed to process resources");
return FALSE;
}
@@ -649,7 +654,10 @@ miner_fs_initable_init (GInitable *initable,
/* Create indexing tree */
priv->indexing_tree = tracker_indexing_tree_new (priv->root);
if (!priv->indexing_tree) {
- /* FIXME: error up here ... */
+ g_set_error (error,
+ tracker_miner_fs_error_quark (),
+ TRACKER_MINER_FS_ERROR_INIT,
+ "Could not create TrackerIndexingTree needed to manage content indexed");
return FALSE;
}
@@ -662,7 +670,10 @@ miner_fs_initable_init (GInitable *initable,
priv->external_crawler);
if (!priv->file_notifier) {
- /* FIXME: error up here ... */
+ g_set_error (error,
+ tracker_miner_fs_error_quark (),
+ TRACKER_MINER_FS_ERROR_INIT,
+ "Could not create TrackerFileNotifier needed to signal new resources to be
indexed");
return FALSE;
}
diff --git a/src/libtracker-miner/tracker-miner-fs.h b/src/libtracker-miner/tracker-miner-fs.h
index e311976..e907553 100644
--- a/src/libtracker-miner/tracker-miner-fs.h
+++ b/src/libtracker-miner/tracker-miner-fs.h
@@ -97,7 +97,25 @@ typedef struct {
gpointer padding[10];
} TrackerMinerFSClass;
+/**
+ * TrackerMinerFSError:
+ * @TRACKER_MINER_FS_ERROR_INIT: There was an error during
+ * initialization of the object. The specific details are in the
+ * message.
+ *
+ * Possible errors returned when calling creating new objects based on
+ * the #TrackerMinerFS type and other APIs available with this class.
+ *
+ * Since: 1.2.
+ **/
+typedef enum {
+ TRACKER_MINER_FS_ERROR_INIT
+} TrackerMinerFSError;
+
+
GType tracker_miner_fs_get_type (void) G_GNUC_CONST;
+GQuark tracker_miner_fs_error_quark (void);
+
void tracker_miner_fs_directory_add (TrackerMinerFS *fs,
GFile *file,
gboolean recurse);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]