[grilo] core: rename the GRL_ERROR quark to GRL_CORE_ERROR
- From: Víctor Manuel Jáquez Leal <vjaquez igalia com>
- To: grilo-list gnome org
- Subject: [grilo] core: rename the GRL_ERROR quark to GRL_CORE_ERROR
- Date: Wed, 1 Sep 2010 12:07:13 +0200
In other to avoid name-space collisions with the next logging subsystem,
we are renaming grilo's error domain.
This change also will allows us to have different kinds of error domains.
Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez igalia com>
---
bindings/vala/grilo-0.1.metadata | 2 +-
src/grl-error.h | 22 +++++++++++-----------
src/grl-media-source.c | 12 ++++++------
src/grl-metadata-source.c | 8 ++++----
src/grl-multiple.c | 2 +-
5 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/bindings/vala/grilo-0.1.metadata b/bindings/vala/grilo-0.1.metadata
index 1b26661..8db1d04 100644
--- a/bindings/vala/grilo-0.1.metadata
+++ b/bindings/vala/grilo-0.1.metadata
@@ -1,6 +1,6 @@
Grl cprefix="Grl" lower_case_cprefix="grl_" cheader_filename="grilo.h"
grl_plugin_registry_get_sources is_array="1" no_array_length="1"
-GrlError errordomain="1"
+GrlCoreError errordomain="1"
GrlMediaSourceMetadataCb hidden="1"
GrlMediaSourceRemoveCb hidden="1"
GrlMediaSourceResultCb hidden="1"
diff --git a/src/grl-error.h b/src/grl-error.h
index 398ee3b..1a7c1d5 100644
--- a/src/grl-error.h
+++ b/src/grl-error.h
@@ -27,18 +27,18 @@
#ifndef _GRL_ERROR_H_
#define _GRL_ERROR_H_
-#define GRL_ERROR g_quark_from_static_string("grilo.error.general")
+#define GRL_CORE_ERROR g_quark_from_static_string("grilo.error.general")
typedef enum {
- GRL_ERROR_BROWSE_FAILED = 1,
- GRL_ERROR_SEARCH_FAILED,
- GRL_ERROR_QUERY_FAILED,
- GRL_ERROR_METADATA_FAILED,
- GRL_ERROR_RESOLVE_FAILED,
- GRL_ERROR_MEDIA_NOT_FOUND,
- GRL_ERROR_STORE_FAILED,
- GRL_ERROR_REMOVE_FAILED,
- GRL_ERROR_SET_METADATA_FAILED,
-} GrlError;
+ GRL_CORE_ERROR_BROWSE_FAILED = 1,
+ GRL_CORE_ERROR_SEARCH_FAILED,
+ GRL_CORE_ERROR_QUERY_FAILED,
+ GRL_CORE_ERROR_METADATA_FAILED,
+ GRL_CORE_ERROR_RESOLVE_FAILED,
+ GRL_CORE_ERROR_MEDIA_NOT_FOUND,
+ GRL_CORE_ERROR_STORE_FAILED,
+ GRL_CORE_ERROR_REMOVE_FAILED,
+ GRL_CORE_ERROR_SET_METADATA_FAILED,
+} GrlCoreError;
#endif /* _GRL_ERROR_H_ */
diff --git a/src/grl-media-source.c b/src/grl-media-source.c
index 81b1b3e..d75d7ee 100644
--- a/src/grl-media-source.c
+++ b/src/grl-media-source.c
@@ -2076,12 +2076,12 @@ grl_media_source_store (GrlMediaSource *source,
url = grl_media_get_url (media);
if (!title) {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_STORE_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_STORE_FAILED,
"Media has no title, cannot store");
} else if (!url && !GRL_IS_MEDIA_BOX (media)) {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_STORE_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_STORE_FAILED,
"Media has no URL, cannot store");
}
@@ -2175,8 +2175,8 @@ grl_media_source_remove (GrlMediaSource *source,
/* First, check that we have the minimum information we need */
id = grl_media_get_id (media);
if (!id) {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_REMOVE_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_REMOVE_FAILED,
"Media has no id, cannot remove");
}
diff --git a/src/grl-metadata-source.c b/src/grl-metadata-source.c
index 8a50b45..63557e5 100644
--- a/src/grl-metadata-source.c
+++ b/src/grl-metadata-source.c
@@ -317,8 +317,8 @@ set_metadata_ctl_cb (GrlMetadataSource *source,
/* We ignore the plugin errors, instead we create an own error
if some keys were not written */
if (smctlcb->failed_keys) {
- own_error = g_error_new (GRL_ERROR,
- GRL_ERROR_SET_METADATA_FAILED,
+ own_error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_SET_METADATA_FAILED,
"Some keys could not be written");
}
smctlcb->user_callback (smctlcb->source,
@@ -1123,8 +1123,8 @@ grl_metadata_source_set_metadata (GrlMetadataSource *source,
keymaps = analyze_keys_to_write (source, keys, flags, &failed_keys);
if (!keymaps) {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_SET_METADATA_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_SET_METADATA_FAILED,
"None of the specified keys is writable");
callback (source, media, failed_keys, user_data, error);
g_error_free (error);
diff --git a/src/grl-multiple.c b/src/grl-multiple.c
index 1834495..375e131 100644
--- a/src/grl-multiple.c
+++ b/src/grl-multiple.c
@@ -99,7 +99,7 @@ handle_no_searchable_sources_idle (gpointer user_data)
GError *error;
struct CallbackData *callback_data = (struct CallbackData *) user_data;
- error = g_error_new (GRL_ERROR, GRL_ERROR_SEARCH_FAILED,
+ error = g_error_new (GRL_CORE_ERROR, GRL_CORE_ERROR_SEARCH_FAILED,
"No searchable sources available");
callback_data->user_callback (NULL, 0, NULL, 0, callback_data->user_data, error);
--
1.7.1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]