diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-05-07 16:58:51 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-05-07 19:19:23 +0100 |
commit | c4b8ceb361748495be477bd3de49ac87c1a5bb2a (patch) | |
tree | 5d672f752e85c6635db8a6a531668faeb89c12a6 /plugins | |
parent | eda09f9123a74dcc7e1b5ad52816ff70d794dec2 (diff) |
Use TP_ERROR instead of deprecated TP_ERRORS
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=49596
Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/console.c | 12 | ||||
-rw-r--r-- | plugins/gateways.c | 12 | ||||
-rw-r--r-- | plugins/test.c | 4 |
3 files changed, 14 insertions, 14 deletions
diff --git a/plugins/console.c b/plugins/console.c index 6e24e4fca..69dd1e1e3 100644 --- a/plugins/console.c +++ b/plugins/console.c @@ -95,7 +95,7 @@ gabble_console_plugin_create_sidecar_async ( } else { - g_simple_async_result_set_error (result, TP_ERRORS, + g_simple_async_result_set_error (result, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "'%s' not implemented", sidecar_interface); } @@ -492,7 +492,7 @@ get_iq_type (const gchar *type_str, return TRUE; } - g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Type must be 'get' or 'set', not '%s'", type_str); return FALSE; } @@ -510,7 +510,7 @@ validate_jid (const gchar **to, if (wocky_decode_jid (*to, NULL, NULL, NULL)) return TRUE; - g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "'%s' is not a valid (or empty) JID", *to); return FALSE; } @@ -541,7 +541,7 @@ parse_me_a_stanza ( if (stanza == NULL) { - g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Incomplete stanza! Bad person."); return FALSE; } @@ -620,13 +620,13 @@ stanza_looks_coherent ( if (t == WOCKY_STANZA_TYPE_UNKNOWN) { - g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "I don't know what a <%s/> is", top_node->name); return FALSE; } else if (st == WOCKY_STANZA_SUB_TYPE_UNKNOWN) { - g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "I don't know what type='%s' means", wocky_node_get_attribute (top_node, "type")); return FALSE; diff --git a/plugins/gateways.c b/plugins/gateways.c index b9b232325..8f121128d 100644 --- a/plugins/gateways.c +++ b/plugins/gateways.c @@ -95,7 +95,7 @@ gabble_gateway_plugin_create_sidecar_async ( } else { - g_simple_async_result_set_error (result, TP_ERRORS, + g_simple_async_result_set_error (result, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "'%s' not implemented", sidecar_interface); } @@ -422,12 +422,12 @@ register_cb (GObject *source, switch (error->code) { case WOCKY_XMPP_ERROR_CONFLICT: - g_set_error (&tp_error, TP_ERRORS, TP_ERROR_REGISTRATION_EXISTS, + g_set_error (&tp_error, TP_ERROR, TP_ERROR_REGISTRATION_EXISTS, "someone else registered that username: %s", error->message); break; case WOCKY_XMPP_ERROR_NOT_ACCEPTABLE: - g_set_error (&tp_error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (&tp_error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "registration not acceptable: %s", error->message); break; @@ -487,21 +487,21 @@ gateways_register ( if (strchr (gateway, '@') != NULL) { - g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Gateway names cannot contain '@': %s", gateway); goto error; } if (strchr (gateway, '/') != NULL) { - g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Gateway names cannot contain '/': %s", gateway); goto error; } if (!wocky_decode_jid (gateway, NULL, &normalized_gateway, NULL)) { - g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Invalid gateway name: %s", gateway); goto error; } diff --git a/plugins/test.c b/plugins/test.c index ba1f5fd3f..92c08335d 100644 --- a/plugins/test.c +++ b/plugins/test.c @@ -113,7 +113,7 @@ test_plugin_create_sidecar_async ( /* This deliberately doesn't check for IFACE_TEST_BUGGY, to test Gabble's * reactions to buggy plugins. :) */ - g_simple_async_result_set_error (result, TP_ERRORS, + g_simple_async_result_set_error (result, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "'%s' not implemented", sidecar_interface); } @@ -442,7 +442,7 @@ iq_cb ( if (t == WOCKY_STANZA_SUB_TYPE_RESULT) g_simple_async_result_set_op_res_gboolean (result, TRUE); else - g_simple_async_result_set_error (result, TP_ERRORS, + g_simple_async_result_set_error (result, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "server said no!"); g_object_unref (reply); |