[plugins 1/3] all: rename GRL_ERROR quark into GRL_CORE_ERROR
- From: Víctor Manuel Jáquez Leal <vjaquez igalia com>
- To: grilo-list gnome org
- Subject: [plugins 1/3] all: rename GRL_ERROR quark into GRL_CORE_ERROR
- Date: Thu, 2 Sep 2010 17:47:45 +0200
As in grilo-core the GRL_ERROR quark had been renamed, all the plugins
must reflect this change.
Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez igalia com>
https://bugzilla.gnome.org/show_bug.cgi?id=628506
---
src/apple-trailers/grl-apple-trailers.c | 12 ++--
src/bookmarks/grl-bookmarks.c | 46 +++++++++---------
src/filesystem/grl-filesystem.c | 4 +-
src/jamendo/grl-jamendo.c | 54 ++++++++++----------
src/lastfm-albumart/grl-lastfm-albumart.c | 4 +-
src/metadata-store/grl-metadata-store.c | 24 +++++-----
src/podcasts/grl-podcasts.c | 78 ++++++++++++++--------------
src/shoutcast/grl-shoutcast.c | 20 ++++----
src/upnp/grl-upnp.c | 12 ++--
src/youtube/grl-youtube.c | 24 +++++-----
10 files changed, 139 insertions(+), 139 deletions(-)
diff --git a/src/apple-trailers/grl-apple-trailers.c b/src/apple-trailers/grl-apple-trailers.c
index e0b79f2..a6dd86c 100644
--- a/src/apple-trailers/grl-apple-trailers.c
+++ b/src/apple-trailers/grl-apple-trailers.c
@@ -330,16 +330,16 @@ xml_parse_result (const gchar *str, OperationData *op_data)
op_data->xml_doc = xmlReadMemory (str, xmlStrlen ((xmlChar*) str), NULL, NULL,
XML_PARSE_RECOVER | XML_PARSE_NOBLANKS);
if (!op_data->xml_doc) {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_BROWSE_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_BROWSE_FAILED,
"Failed to parse response");
goto finalize;
}
node = xmlDocGetRootElement (op_data->xml_doc);
if (!node || !node->xmlChildrenNode) {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_BROWSE_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_BROWSE_FAILED,
"Empty response from Apple Trailers");
goto finalize;
}
@@ -396,8 +396,8 @@ read_done_cb (GObject *source_object,
NULL,
NULL,
&vfs_error)) {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_BROWSE_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_BROWSE_FAILED,
"Failed to connect Apple Trailers: '%s'",
vfs_error->message);
op_data->bs->callback (op_data->bs->source,
diff --git a/src/bookmarks/grl-bookmarks.c b/src/bookmarks/grl-bookmarks.c
index a2a6bbf..e382c74 100644
--- a/src/bookmarks/grl-bookmarks.c
+++ b/src/bookmarks/grl-bookmarks.c
@@ -393,8 +393,8 @@ bookmark_metadata (GrlMediaSourceMetadataSpec *ms)
if (r != SQLITE_OK) {
g_warning ("Failed to get bookmark: %s", sqlite3_errmsg (db));
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_METADATA_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_METADATA_FAILED,
"Failed to get bookmark metadata");
ms->callback (ms->source, ms->media, ms->user_data, error);
g_error_free (error);
@@ -408,8 +408,8 @@ bookmark_metadata (GrlMediaSourceMetadataSpec *ms)
ms->callback (ms->source, ms->media, ms->user_data, NULL);
} else {
g_warning ("Failed to get bookmark: %s", sqlite3_errmsg (db));
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_METADATA_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_METADATA_FAILED,
"Failed to get bookmark metadata");
ms->callback (ms->source, ms->media, ms->user_data, error);
g_error_free (error);
@@ -438,7 +438,7 @@ produce_bookmarks_from_sql (OperationSpec *os, const gchar *sql)
if (r != SQLITE_OK) {
g_warning ("Failed to retrieve bookmarks: %s", sqlite3_errmsg (db));
- error = g_error_new (GRL_ERROR,
+ error = g_error_new (GRL_CORE_ERROR,
os->error_code,
"Failed to retrieve bookmarks list");
os->callback (os->source, os->operation_id, NULL, 0, os->user_data, error);
@@ -457,7 +457,7 @@ produce_bookmarks_from_sql (OperationSpec *os, const gchar *sql)
if (r != SQLITE_DONE) {
g_warning ("Failed to retrieve bookmarks: %s", sqlite3_errmsg (db));
- error = g_error_new (GRL_ERROR,
+ error = g_error_new (GRL_CORE_ERROR,
os->error_code,
"Failed to retrieve bookmarks list");
os->callback (os->source, os->operation_id, NULL, 0, os->user_data, error);
@@ -537,8 +537,8 @@ remove_bookmark (sqlite3 *db, const gchar *bookmark_id, GError **error)
if (r != SQLITE_OK) {
g_warning ("Failed to remove bookmark '%s': %s", bookmark_id, sql_error);
- *error = g_error_new (GRL_ERROR,
- GRL_ERROR_REMOVE_FAILED,
+ *error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_REMOVE_FAILED,
"Failed to remove bookmark");
sqlite3_free (sql_error);
}
@@ -591,8 +591,8 @@ store_bookmark (sqlite3 *db,
&sql_stmt, NULL);
if (r != SQLITE_OK) {
g_warning ("Failed to store bookmark '%s': %s", title, sqlite3_errmsg (db));
- *error = g_error_new (GRL_ERROR,
- GRL_ERROR_STORE_FAILED,
+ *error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_STORE_FAILED,
"Failed to store bookmark '%s'", title);
return;
}
@@ -633,8 +633,8 @@ store_bookmark (sqlite3 *db,
if (r != SQLITE_DONE) {
g_warning ("Failed to store bookmark '%s': %s", title, sqlite3_errmsg (db));
- *error = g_error_new (GRL_ERROR,
- GRL_ERROR_STORE_FAILED,
+ *error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_STORE_FAILED,
"Failed to store bookmark '%s'", title);
sqlite3_finalize (sql_stmt);
return;
@@ -678,8 +678,8 @@ grl_bookmarks_source_browse (GrlMediaSource *source,
bookmarks_source = GRL_BOOKMARKS_SOURCE (source);
if (!bookmarks_source->priv->db) {
g_warning ("Can't execute operation: no database connection.");
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_BROWSE_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_BROWSE_FAILED,
"No database connection");
bs->callback (bs->source, bs->browse_id, NULL, 0, bs->user_data, error);
g_error_free (error);
@@ -694,7 +694,7 @@ grl_bookmarks_source_browse (GrlMediaSource *source,
os->skip = bs->skip;
os->callback = bs->callback;
os->user_data = bs->user_data;
- os->error_code = GRL_ERROR_BROWSE_FAILED;
+ os->error_code = GRL_CORE_ERROR_BROWSE_FAILED;
produce_bookmarks_from_category (os, os->media_id ? os->media_id : "0");
g_slice_free (OperationSpec, os);
@@ -713,8 +713,8 @@ grl_bookmarks_source_search (GrlMediaSource *source,
bookmarks_source = GRL_BOOKMARKS_SOURCE (source);
if (!bookmarks_source->priv->db) {
g_warning ("Can't execute operation: no database connection.");
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_QUERY_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_QUERY_FAILED,
"No database connection");
ss->callback (ss->source, ss->search_id, NULL, 0, ss->user_data, error);
g_error_free (error);
@@ -727,7 +727,7 @@ grl_bookmarks_source_search (GrlMediaSource *source,
os->skip = ss->skip;
os->callback = ss->callback;
os->user_data = ss->user_data;
- os->error_code = GRL_ERROR_SEARCH_FAILED;
+ os->error_code = GRL_CORE_ERROR_SEARCH_FAILED;
produce_bookmarks_by_text (os, ss->text);
g_slice_free (OperationSpec, os);
}
@@ -745,8 +745,8 @@ grl_bookmarks_source_query (GrlMediaSource *source,
bookmarks_source = GRL_BOOKMARKS_SOURCE (source);
if (!bookmarks_source->priv->db) {
g_warning ("Can't execute operation: no database connection.");
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_QUERY_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_QUERY_FAILED,
"No database connection");
qs->callback (qs->source, qs->query_id, NULL, 0, qs->user_data, error);
g_error_free (error);
@@ -759,7 +759,7 @@ grl_bookmarks_source_query (GrlMediaSource *source,
os->skip = qs->skip;
os->callback = qs->callback;
os->user_data = qs->user_data;
- os->error_code = GRL_ERROR_SEARCH_FAILED;
+ os->error_code = GRL_CORE_ERROR_SEARCH_FAILED;
produce_bookmarks_by_query (os, qs->query);
g_slice_free (OperationSpec, os);
}
@@ -803,8 +803,8 @@ grl_bookmarks_source_metadata (GrlMediaSource *source,
bookmarks_source = GRL_BOOKMARKS_SOURCE (source);
if (!bookmarks_source->priv->db) {
g_warning ("Can't execute operation: no database connection.");
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_METADATA_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_METADATA_FAILED,
"No database connection");
ms->callback (ms->source, ms->media, ms->user_data, error);
g_error_free (error);
diff --git a/src/filesystem/grl-filesystem.c b/src/filesystem/grl-filesystem.c
index 8c6fa9a..068a7de 100644
--- a/src/filesystem/grl-filesystem.c
+++ b/src/filesystem/grl-filesystem.c
@@ -619,8 +619,8 @@ grl_filesystem_source_metadata (GrlMediaSource *source,
!id);
ms->callback (ms->source, ms->media, ms->user_data, NULL);
} else {
- GError *error = g_error_new (GRL_ERROR,
- GRL_ERROR_METADATA_FAILED,
+ GError *error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_METADATA_FAILED,
"File '%s' does not exist",
path);
ms->callback (ms->source, ms->media, ms->user_data, error);
diff --git a/src/jamendo/grl-jamendo.c b/src/jamendo/grl-jamendo.c
index a393bea..e1943bb 100644
--- a/src/jamendo/grl-jamendo.c
+++ b/src/jamendo/grl-jamendo.c
@@ -314,23 +314,23 @@ xml_parse_result (const gchar *str, GError **error, XmlParseEntries *xpe)
doc = xmlReadMemory (str, strlen (str), NULL, NULL,
XML_PARSE_RECOVER | XML_PARSE_NOBLANKS);
if (!doc) {
- *error = g_error_new (GRL_ERROR,
- GRL_ERROR_BROWSE_FAILED,
+ *error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_BROWSE_FAILED,
"Failed to parse Jamendo's response");
goto free_resources;
}
node = xmlDocGetRootElement (doc);
if (!node) {
- *error = g_error_new (GRL_ERROR,
- GRL_ERROR_BROWSE_FAILED,
+ *error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_BROWSE_FAILED,
"Empty response from Jamendo");
goto free_resources;
}
if (xmlStrcmp (node->name, (const xmlChar *) "data")) {
- *error = g_error_new (GRL_ERROR,
- GRL_ERROR_BROWSE_FAILED,
+ *error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_BROWSE_FAILED,
"Unexpected response from Jamendo: no data");
goto free_resources;
}
@@ -636,20 +636,20 @@ read_done_cb (GObject *source_object,
&vfs_error)) {
switch (xpe->type) {
case METADATA:
- error_code = GRL_ERROR_METADATA_FAILED;
+ error_code = GRL_CORE_ERROR_METADATA_FAILED;
break;
case BROWSE:
- error_code = GRL_ERROR_BROWSE_FAILED;
+ error_code = GRL_CORE_ERROR_BROWSE_FAILED;
break;
case QUERY:
- error_code = GRL_ERROR_QUERY_FAILED;
+ error_code = GRL_CORE_ERROR_QUERY_FAILED;
break;
case SEARCH:
- error_code = GRL_ERROR_SEARCH_FAILED;
+ error_code = GRL_CORE_ERROR_SEARCH_FAILED;
break;
}
- error = g_error_new (GRL_ERROR,
+ error = g_error_new (GRL_CORE_ERROR,
error_code,
"Failed to connect Jamendo: '%s'",
vfs_error->message);
@@ -679,8 +679,8 @@ read_done_cb (GObject *source_object,
}
} else {
if (xpe->type == METADATA) {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_METADATA_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_METADATA_FAILED,
"Unable to get information: '%s'",
grl_media_get_id (xpe->spec.ms->media));
}
@@ -948,8 +948,8 @@ grl_jamendo_source_metadata (GrlMediaSource *source,
id_split = g_strsplit (id, JAMENDO_ID_SEP, 0);
if (g_strv_length (id_split) == 0) {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_METADATA_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_METADATA_FAILED,
"Invalid id: '%s'",
id);
goto send_error;
@@ -993,8 +993,8 @@ grl_jamendo_source_metadata (GrlMediaSource *source,
id_split[1]);
g_free (jamendo_keys);
} else {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_METADATA_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_METADATA_FAILED,
"Invalid id: '%s'",
id);
g_strfreev (id_split);
@@ -1010,8 +1010,8 @@ grl_jamendo_source_metadata (GrlMediaSource *source,
update_media_from_feeds (ms->media);
}
} else {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_METADATA_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_METADATA_FAILED,
"Invalid id: '%s'",
id);
g_strfreev (id_split);
@@ -1070,8 +1070,8 @@ grl_jamendo_source_browse (GrlMediaSource *source,
container_split = g_strsplit (container_id, JAMENDO_ID_SEP, 0);
if (g_strv_length (container_split) == 0) {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_BROWSE_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_BROWSE_FAILED,
"Invalid container-id: '%s'",
container_id);
} else {
@@ -1139,13 +1139,13 @@ grl_jamendo_source_browse (GrlMediaSource *source,
}
} else if (category == JAMENDO_TRACK_CAT) {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_BROWSE_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_BROWSE_FAILED,
"Cannot browse through a track: '%s'",
container_id);
} else {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_BROWSE_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_BROWSE_FAILED,
"Invalid container-id: '%s'",
container_id);
}
@@ -1199,8 +1199,8 @@ grl_jamendo_source_query (GrlMediaSource *source,
g_debug ("grl_jamendo_source_query");
if (!parse_query (qs->query, &category, &term)) {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_QUERY_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_QUERY_FAILED,
"Query malformed: '%s'",
qs->query);
goto send_error;
diff --git a/src/lastfm-albumart/grl-lastfm-albumart.c b/src/lastfm-albumart/grl-lastfm-albumart.c
index 91e1eb9..2afa847 100644
--- a/src/lastfm-albumart/grl-lastfm-albumart.c
+++ b/src/lastfm-albumart/grl-lastfm-albumart.c
@@ -182,8 +182,8 @@ read_done_cb (GObject *source_object,
NULL,
NULL,
&vfs_error)) {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_RESOLVE_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_RESOLVE_FAILED,
"Failed to connect to Last.FM: '%s'",
vfs_error->message);
rs->callback (rs->source, rs->media, rs->user_data, error);
diff --git a/src/metadata-store/grl-metadata-store.c b/src/metadata-store/grl-metadata-store.c
index b45621c..691093f 100644
--- a/src/metadata-store/grl-metadata-store.c
+++ b/src/metadata-store/grl-metadata-store.c
@@ -462,8 +462,8 @@ write_keys (sqlite3 *db,
if (supported_keys == 0) {
g_warning ("Failed to update metadata, none of the specified "
"keys is writable");
- *error = g_error_new (GRL_ERROR,
- GRL_ERROR_SET_METADATA_FAILED,
+ *error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_SET_METADATA_FAILED,
"Failed to update metadata, "
"specified keys are not writable");
goto done;
@@ -481,8 +481,8 @@ write_keys (sqlite3 *db,
source_id, media_id, sqlite3_errmsg (db));
g_list_free (failed_keys);
failed_keys = g_list_copy (sms->keys);
- *error = g_error_new (GRL_ERROR,
- GRL_ERROR_SET_METADATA_FAILED,
+ *error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_SET_METADATA_FAILED,
"Failed to update metadata");
goto done;
}
@@ -502,8 +502,8 @@ write_keys (sqlite3 *db,
source_id, media_id, sqlite3_errmsg (db));
g_list_free (failed_keys);
failed_keys = g_list_copy (sms->keys);
- *error = g_error_new (GRL_ERROR,
- GRL_ERROR_SET_METADATA_FAILED,
+ *error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_SET_METADATA_FAILED,
"Failed to update metadata");
goto done;
}
@@ -578,8 +578,8 @@ grl_metadata_store_source_resolve (GrlMetadataSource *source,
/* We need the source id */
if (!source_id) {
g_warning ("Failed to resolve metadata: source-id not available");
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_RESOLVE_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_RESOLVE_FAILED,
"source-id not available, cannot resolve metadata.");
rs->callback (rs->source, rs->media, rs->user_data, error);
g_error_free (error);
@@ -598,8 +598,8 @@ grl_metadata_store_source_resolve (GrlMetadataSource *source,
rs->callback (rs->source, rs->media, rs->user_data, NULL);
} else {
g_warning ("Failed to resolve metadata");
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_RESOLVE_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_RESOLVE_FAILED,
"Failed to resolve metadata.");
rs->callback (rs->source, rs->media, rs->user_data, error);
g_error_free (error);
@@ -622,8 +622,8 @@ grl_metadata_store_source_set_metadata (GrlMetadataSource *source,
/* We need the source id */
if (!source_id) {
g_warning ("Failed to update metadata: source-id not available");
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_SET_METADATA_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_SET_METADATA_FAILED,
"source-id not available, cannot update metadata.");
failed_keys = g_list_copy (sms->keys);
} else {
diff --git a/src/podcasts/grl-podcasts.c b/src/podcasts/grl-podcasts.c
index 7e380c1..53bd08e 100644
--- a/src/podcasts/grl-podcasts.c
+++ b/src/podcasts/grl-podcasts.c
@@ -634,7 +634,7 @@ produce_podcast_contents_from_db (OperationSpec *os)
if (r != SQLITE_OK) {
g_warning ("Failed to retrieve podcast streams: %s", sqlite3_errmsg (db));
- error = g_error_new (GRL_ERROR,
+ error = g_error_new (GRL_CORE_ERROR,
os->error_code,
"Failed to retrieve podcast streams");
os->callback (os->source, os->operation_id, NULL, 0, os->user_data, error);
@@ -653,7 +653,7 @@ produce_podcast_contents_from_db (OperationSpec *os)
if (r != SQLITE_DONE) {
g_warning ("Failed to retrive podcast streams: %s", sqlite3_errmsg (db));
- error = g_error_new (GRL_ERROR,
+ error = g_error_new (GRL_CORE_ERROR,
os->error_code,
"Failed to retrieve podcast streams");
os->callback (os->source, os->operation_id, NULL, 0, os->user_data, error);
@@ -696,8 +696,8 @@ remove_podcast_streams (sqlite3 *db, const gchar *podcast_id, GError **error)
g_free (sql);
if (r) {
g_warning ("Failed to remove podcast streams cache: %s", sql_error);
- *error = g_error_new (GRL_ERROR,
- GRL_ERROR_REMOVE_FAILED,
+ *error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_REMOVE_FAILED,
"Failed to remove podcast streams");
sqlite3_free (error);
}
@@ -724,8 +724,8 @@ remove_podcast (sqlite3 *db, const gchar *podcast_id, GError **error)
if (r != SQLITE_OK) {
g_warning ("Failed to remove podcast '%s': %s", podcast_id, sql_error);
- *error = g_error_new (GRL_ERROR,
- GRL_ERROR_REMOVE_FAILED,
+ *error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_REMOVE_FAILED,
"Failed to remove podcast");
sqlite3_free (sql_error);
}
@@ -747,8 +747,8 @@ remove_stream (sqlite3 *db, const gchar *url, GError **error)
if (r != SQLITE_OK) {
g_warning ("Failed to remove podcast stream '%s': %s", url, sql_error);
- *error = g_error_new (GRL_ERROR,
- GRL_ERROR_REMOVE_FAILED,
+ *error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_REMOVE_FAILED,
"Failed to remove podcast stream");
sqlite3_free (sql_error);
}
@@ -777,8 +777,8 @@ store_podcast (sqlite3 *db, GrlMedia *podcast, GError **error)
&sql_stmt, NULL);
if (r != SQLITE_OK) {
g_warning ("Failed to store podcast '%s': %s", title, sqlite3_errmsg (db));
- *error = g_error_new (GRL_ERROR,
- GRL_ERROR_STORE_FAILED,
+ *error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_STORE_FAILED,
"Failed to store podcast '%s'", title);
return;
}
@@ -795,8 +795,8 @@ store_podcast (sqlite3 *db, GrlMedia *podcast, GError **error)
if (r != SQLITE_DONE) {
g_warning ("Failed to store podcast '%s': %s", title, sqlite3_errmsg (db));
- *error = g_error_new (GRL_ERROR,
- GRL_ERROR_STORE_FAILED,
+ *error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_STORE_FAILED,
"Failed to store podcast '%s'", title);
sqlite3_finalize (sql_stmt);
return;
@@ -988,7 +988,7 @@ parse_feed (OperationSpec *os, const gchar *str, GError **error)
doc = xmlParseDoc ((xmlChar *) str);
if (!doc) {
- *error = g_error_new (GRL_ERROR,
+ *error = g_error_new (GRL_CORE_ERROR,
os->error_code,
"Failed to parse podcast contents");
goto free_resources;
@@ -997,7 +997,7 @@ parse_feed (OperationSpec *os, const gchar *str, GError **error)
/* Get feed stream list */
xpathCtx = xmlXPathNewContext (doc);
if (!xpathCtx) {
- *error = g_error_new (GRL_ERROR,
+ *error = g_error_new (GRL_CORE_ERROR,
os->error_code,
"Failed to parse podcast contents");
goto free_resources;
@@ -1006,7 +1006,7 @@ parse_feed (OperationSpec *os, const gchar *str, GError **error)
xpathObj = xmlXPathEvalExpression ((xmlChar *) "/rss/channel/item",
xpathCtx);
if(xpathObj == NULL) {
- *error = g_error_new (GRL_ERROR,
+ *error = g_error_new (GRL_CORE_ERROR,
os->error_code,
"Failed to parse podcast contents");
goto free_resources;
@@ -1065,8 +1065,8 @@ read_feed_cb (gchar *xmldata, gpointer user_data)
OperationSpec *os = (OperationSpec *) user_data;
if (!xmldata) {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_BROWSE_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_BROWSE_FAILED,
"Failed to read data from podcast");
} else {
parse_feed (os, xmldata, &error);
@@ -1154,7 +1154,7 @@ produce_podcast_contents (OperationSpec *os)
}
sqlite3_finalize (sql_stmt);
} else {
- error = g_error_new (GRL_ERROR,
+ error = g_error_new (GRL_CORE_ERROR,
os->error_code,
"Failed to retrieve podcast information");
os->callback (os->source, os->operation_id, NULL, 0, os->user_data, error);
@@ -1199,7 +1199,7 @@ produce_podcasts (OperationSpec *os)
if (r != SQLITE_OK) {
g_warning ("Failed to retrieve podcasts: %s", sqlite3_errmsg (db));
- error = g_error_new (GRL_ERROR,
+ error = g_error_new (GRL_CORE_ERROR,
os->error_code,
"Failed to retrieve podcasts list");
os->callback (os->source, os->operation_id, NULL, 0, os->user_data, error);
@@ -1218,7 +1218,7 @@ produce_podcasts (OperationSpec *os)
if (r != SQLITE_DONE) {
g_warning ("Failed to retrieve podcasts: %s", sqlite3_errmsg (db));
- error = g_error_new (GRL_ERROR,
+ error = g_error_new (GRL_CORE_ERROR,
os->error_code,
"Failed to retrieve podcasts list");
os->callback (os->source, os->operation_id, NULL, 0, os->user_data, error);
@@ -1271,8 +1271,8 @@ stream_metadata (GrlMediaSourceMetadataSpec *ms)
if (r != SQLITE_OK) {
g_warning ("Failed to get podcast stream: %s", sqlite3_errmsg (db));
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_METADATA_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_METADATA_FAILED,
"Failed to get podcast stream metadata");
ms->callback (ms->source, ms->media, ms->user_data, error);
g_error_free (error);
@@ -1286,8 +1286,8 @@ stream_metadata (GrlMediaSourceMetadataSpec *ms)
ms->callback (ms->source, ms->media, ms->user_data, NULL);
} else {
g_warning ("Failed to get podcast stream: %s", sqlite3_errmsg (db));
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_METADATA_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_METADATA_FAILED,
"Failed to get podcast stream metadata");
ms->callback (ms->source, ms->media, ms->user_data, error);
g_error_free (error);
@@ -1324,8 +1324,8 @@ podcast_metadata (GrlMediaSourceMetadataSpec *ms)
sqlite3_finalize (sql_stmt);
} else {
g_warning ("Failed to get podcast: %s", sqlite3_errmsg (db));
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_METADATA_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_METADATA_FAILED,
"Failed to get podcast metadata");
ms->callback (ms->source, ms->media, ms->user_data, error);
g_error_free (error);
@@ -1368,8 +1368,8 @@ grl_podcasts_source_browse (GrlMediaSource *source,
podcasts_source = GRL_PODCASTS_SOURCE (source);
if (!podcasts_source->priv->db) {
g_warning ("Can't execute operation: no database connection.");
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_BROWSE_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_BROWSE_FAILED,
"No database connection");
bs->callback (bs->source, bs->browse_id, NULL, 0, bs->user_data, error);
g_error_free (error);
@@ -1384,7 +1384,7 @@ grl_podcasts_source_browse (GrlMediaSource *source,
os->skip = bs->skip;
os->callback = bs->callback;
os->user_data = bs->user_data;
- os->error_code = GRL_ERROR_BROWSE_FAILED;
+ os->error_code = GRL_CORE_ERROR_BROWSE_FAILED;
if (!os->media_id) {
/* Browsing podcasts list */
@@ -1411,8 +1411,8 @@ grl_podcasts_source_search (GrlMediaSource *source,
podcasts_source = GRL_PODCASTS_SOURCE (source);
if (!podcasts_source->priv->db) {
g_warning ("Can't execute operation: no database connection.");
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_QUERY_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_QUERY_FAILED,
"No database connection");
ss->callback (ss->source, ss->search_id, NULL, 0, ss->user_data, error);
g_error_free (error);
@@ -1426,7 +1426,7 @@ grl_podcasts_source_search (GrlMediaSource *source,
os->skip = ss->skip;
os->callback = ss->callback;
os->user_data = ss->user_data;
- os->error_code = GRL_ERROR_SEARCH_FAILED;
+ os->error_code = GRL_CORE_ERROR_SEARCH_FAILED;
produce_podcasts (os);
g_slice_free (OperationSpec, os);
}
@@ -1443,8 +1443,8 @@ grl_podcasts_source_query (GrlMediaSource *source, GrlMediaSourceQuerySpec *qs)
podcasts_source = GRL_PODCASTS_SOURCE (source);
if (!podcasts_source->priv->db) {
g_warning ("Can't execute operation: no database connection.");
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_QUERY_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_QUERY_FAILED,
"No database connection");
qs->callback (qs->source, qs->query_id, NULL, 0, qs->user_data, error);
g_error_free (error);
@@ -1459,7 +1459,7 @@ grl_podcasts_source_query (GrlMediaSource *source, GrlMediaSourceQuerySpec *qs)
os->callback = qs->callback;
os->user_data = qs->user_data;
os->is_query = TRUE;
- os->error_code = GRL_ERROR_QUERY_FAILED;
+ os->error_code = GRL_CORE_ERROR_QUERY_FAILED;
produce_podcasts (os);
g_slice_free (OperationSpec, os);
}
@@ -1477,8 +1477,8 @@ grl_podcasts_source_metadata (GrlMediaSource *source,
podcasts_source = GRL_PODCASTS_SOURCE (source);
if (!podcasts_source->priv->db) {
g_warning ("Can't execute operation: no database connection.");
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_METADATA_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_METADATA_FAILED,
"No database connection");
ms->callback (ms->source, ms->media, ms->user_data, error);
g_error_free (error);
@@ -1498,8 +1498,8 @@ grl_podcasts_source_store (GrlMediaSource *source, GrlMediaSourceStoreSpec *ss)
g_debug ("grl_podcasts_source_store");
GError *error = NULL;
if (GRL_IS_MEDIA_BOX (ss->media)) {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_STORE_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_STORE_FAILED,
"Cannot create containers. Only feeds are accepted.");
} else {
store_podcast (GRL_PODCASTS_SOURCE (ss->source)->priv->db,
diff --git a/src/shoutcast/grl-shoutcast.c b/src/shoutcast/grl-shoutcast.c
index b2689ad..4e6e039 100644
--- a/src/shoutcast/grl-shoutcast.c
+++ b/src/shoutcast/grl-shoutcast.c
@@ -330,7 +330,7 @@ xml_parse_result (const gchar *str, OperationData *op_data)
op_data->xml_doc = xmlReadMemory (str, xmlStrlen ((xmlChar*) str), NULL, NULL,
XML_PARSE_RECOVER | XML_PARSE_NOBLANKS);
if (!op_data->xml_doc) {
- error = g_error_new (GRL_ERROR,
+ error = g_error_new (GRL_CORE_ERROR,
op_data->error_code,
"Failed to parse SHOUTcast's response");
goto finalize;
@@ -338,7 +338,7 @@ xml_parse_result (const gchar *str, OperationData *op_data)
node = xmlDocGetRootElement (op_data->xml_doc);
if (!node) {
- error = g_error_new (GRL_ERROR,
+ error = g_error_new (GRL_CORE_ERROR,
op_data->error_code,
"Empty response from SHOUTcast");
goto finalize;
@@ -376,7 +376,7 @@ xml_parse_result (const gchar *str, OperationData *op_data)
build_media_from_genre (op_data);
}
} else {
- error = g_error_new (GRL_ERROR,
+ error = g_error_new (GRL_CORE_ERROR,
op_data->error_code,
"Can not find media '%s'",
grl_media_get_id (op_data->media));
@@ -386,7 +386,7 @@ xml_parse_result (const gchar *str, OperationData *op_data)
}
xmlXPathFreeContext (xpath_ctx);
} else {
- error = g_error_new (GRL_ERROR,
+ error = g_error_new (GRL_CORE_ERROR,
op_data->error_code,
"Can not build xpath context");
}
@@ -477,7 +477,7 @@ read_done_cb (GObject *source_object,
NULL,
NULL,
&vfs_error)) {
- error = g_error_new (GRL_ERROR,
+ error = g_error_new (GRL_CORE_ERROR,
op_data->error_code,
"Failed to connect SHOUTcast: '%s'",
vfs_error->message);
@@ -576,7 +576,7 @@ grl_shoutcast_source_metadata (GrlMediaSource *source,
data->count = 1;
data->metadata_cb = ms->callback;
data->user_data = ms->user_data;
- data->error_code = GRL_ERROR_METADATA_FAILED;
+ data->error_code = GRL_CORE_ERROR_METADATA_FAILED;
data->media = ms->media;
id_tokens = g_strsplit (media_id, "/", -1);
@@ -629,7 +629,7 @@ grl_shoutcast_source_browse (GrlMediaSource *source,
data->skip = bs->skip;
data->count = bs->count;
data->user_data = bs->user_data;
- data->error_code = GRL_ERROR_BROWSE_FAILED;
+ data->error_code = GRL_CORE_ERROR_BROWSE_FAILED;
container_id = grl_media_get_id (bs->container);
@@ -661,8 +661,8 @@ grl_shoutcast_source_search (GrlMediaSource *source,
/* Check if there is text to search */
if (!ss->text || ss->text[0] == '\0') {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_SEARCH_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_SEARCH_FAILED,
"Search text not specified");
ss->callback (ss->source,
ss->search_id,
@@ -682,7 +682,7 @@ grl_shoutcast_source_search (GrlMediaSource *source,
data->skip = ss->skip;
data->count = ss->count;
data->user_data = ss->user_data;
- data->error_code = GRL_ERROR_SEARCH_FAILED;
+ data->error_code = GRL_CORE_ERROR_SEARCH_FAILED;
grl_media_source_set_operation_data (source, ss->search_id, data);
diff --git a/src/upnp/grl-upnp.c b/src/upnp/grl-upnp.c
index 3ec7cbf..fdd7d63 100644
--- a/src/upnp/grl-upnp.c
+++ b/src/upnp/grl-upnp.c
@@ -1073,8 +1073,8 @@ grl_upnp_source_browse (GrlMediaSource *source, GrlMediaSourceBrowseSpec *bs)
"",
NULL);
if (!action) {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_BROWSE_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_BROWSE_FAILED,
"Failed to start browse action");
bs->callback (bs->source, bs->browse_id, NULL, 0, bs->user_data, error);
g_error_free (error);
@@ -1125,8 +1125,8 @@ grl_upnp_source_search (GrlMediaSource *source, GrlMediaSourceSearchSpec *ss)
"",
NULL);
if (!action) {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_SEARCH_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_SEARCH_FAILED,
"Failed to start browse action");
ss->callback (ss->source, ss->search_id, NULL, 0, ss->user_data, error);
g_error_free (error);
@@ -1172,8 +1172,8 @@ grl_upnp_source_metadata (GrlMediaSource *source,
"",
NULL);
if (!action) {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_METADATA_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_METADATA_FAILED,
"Failed to start metadata action");
ms->callback (ms->source, ms->media, ms->user_data, error);
g_error_free (error);
diff --git a/src/youtube/grl-youtube.c b/src/youtube/grl-youtube.c
index 209fac1..8c24923 100644
--- a/src/youtube/grl-youtube.c
+++ b/src/youtube/grl-youtube.c
@@ -859,7 +859,7 @@ metadata_cb (GObject *object,
(GDATA_YOUTUBE_SERVICE (service), result, &error));
#endif
if (error) {
- error->code = GRL_ERROR_METADATA_FAILED;
+ error->code = GRL_CORE_ERROR_METADATA_FAILED;
ms->callback (ms->source, ms->media, ms->user_data, error);
g_error_free (error);
} else {
@@ -928,7 +928,7 @@ search_cb (GObject *object, GAsyncResult *result, OperationSpec *os)
}
} else {
if (!error) {
- error = g_error_new (GRL_ERROR,
+ error = g_error_new (GRL_CORE_ERROR,
os->error_code,
"Failed to obtain feed from Youtube");
} else {
@@ -1109,8 +1109,8 @@ produce_from_feed (OperationSpec *os)
feed_type = get_feed_type_from_id (os->container_id);
if (feed_type < 0) {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_BROWSE_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_BROWSE_FAILED,
"Invalid feed id: %s", os->container_id);
os->callback (os->source,
os->operation_id,
@@ -1162,8 +1162,8 @@ produce_from_category (OperationSpec *os)
category_index = get_category_index_from_id (os->container_id);
if (!category_term) {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_BROWSE_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_BROWSE_FAILED,
"Invalid category id: %s", os->container_id);
os->callback (os->source,
os->operation_id,
@@ -1246,7 +1246,7 @@ grl_youtube_source_search (GrlMediaSource *source,
os->count = ss->count;
os->callback = ss->callback;
os->user_data = ss->user_data;
- os->error_code = GRL_ERROR_SEARCH_FAILED;
+ os->error_code = GRL_CORE_ERROR_SEARCH_FAILED;
/* Look for OPERATION_SPEC_REF_RATIONALE for details */
operation_spec_ref (os);
@@ -1283,7 +1283,7 @@ grl_youtube_source_browse (GrlMediaSource *source,
os->count = bs->count;
os->callback = bs->callback;
os->user_data = bs->user_data;
- os->error_code = GRL_ERROR_BROWSE_FAILED;
+ os->error_code = GRL_CORE_ERROR_BROWSE_FAILED;
switch (classify_media_id (container_id))
{
@@ -1343,8 +1343,8 @@ grl_youtube_source_metadata (GrlMediaSource *source,
media = produce_container_from_directory (service, ms->media, feeds_dir,
index);
} else {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_METADATA_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_METADATA_FAILED,
"Invalid feed id");
}
}
@@ -1356,8 +1356,8 @@ grl_youtube_source_metadata (GrlMediaSource *source,
media = produce_container_from_directory (service, ms->media,
categories_dir, index);
} else {
- error = g_error_new (GRL_ERROR,
- GRL_ERROR_METADATA_FAILED,
+ error = g_error_new (GRL_CORE_ERROR,
+ GRL_CORE_ERROR_METADATA_FAILED,
"Invalid category id");
}
}
--
1.7.1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]