summaryrefslogtreecommitdiff
path: root/src/search-channel.c
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-05-07 16:58:51 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-05-07 19:19:23 +0100
commitc4b8ceb361748495be477bd3de49ac87c1a5bb2a (patch)
tree5d672f752e85c6635db8a6a531668faeb89c12a6 /src/search-channel.c
parenteda09f9123a74dcc7e1b5ad52816ff70d794dec2 (diff)
downloadtelepathy-gabble-c4b8ceb361748495be477bd3de49ac87c1a5bb2a.tar.gz
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 'src/search-channel.c')
-rw-r--r--src/search-channel.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/search-channel.c b/src/search-channel.c
index afbb098ee..94abbd99f 100644
--- a/src/search-channel.c
+++ b/src/search-channel.c
@@ -234,7 +234,7 @@ parse_unextended_field_response (
}
else
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"server is broken: %s is not a field defined in XEP 0055",
field->name);
g_ptr_array_unref (search_keys);
@@ -272,7 +272,7 @@ parse_data_form (
if (tp_strdiff (wocky_node_get_attribute (x_node, "type"), "form"))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"server is broken: <x> not type='form'");
goto fail;
}
@@ -308,7 +308,7 @@ parse_data_form (
if (tp_strdiff (form_type, NS_SEARCH))
{
DEBUG ("<x> form does not have FORM_TYPE %s", NS_SEARCH);
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"server is broken: form lacking FORM_TYPE %s", NS_SEARCH);
goto fail;
}
@@ -416,7 +416,7 @@ query_reply_cb (GabbleConnection *conn,
}
else if (NULL == query_node)
{
- err = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ err = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"%s is broken: it replied to our <query> with an empty IQ",
chan->priv->server);
}
@@ -461,7 +461,7 @@ request_search_fields (GabbleSearchChannel *chan)
* change_search_state:
* @chan: a search channel
* @state: the new state for the channel
- * @reason: an error in the TP_ERRORS domain if the search has failed; NULL
+ * @reason: an error in the TP_ERROR domain if the search has failed; NULL
* otherwise.
*/
static void
@@ -493,7 +493,7 @@ change_search_state (GabbleSearchChannel *chan,
if (state == TP_CHANNEL_CONTACT_SEARCH_STATE_FAILED)
{
g_assert (reason != NULL);
- g_assert (reason->domain == TP_ERRORS);
+ g_assert (reason->domain == TP_ERROR);
error_name = tp_error_get_dbus_name (reason->code);
g_value_init (&v, G_TYPE_STRING);
@@ -737,7 +737,7 @@ parse_extended_search_results (GabbleSearchChannel *chan,
x = wocky_node_get_child_ns (query_node, "x", NS_X_DATA);
if (x == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"reply doens't contain a <x> node");
return FALSE;
}
@@ -802,7 +802,7 @@ search_reply_cb (GabbleConnection *conn,
}
else if (NULL == query_node)
{
- err = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ err = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"%s is broken: its iq reply didn't contain a <query/>",
chan->priv->server);
}
@@ -848,7 +848,7 @@ validate_terms (GabbleSearchChannel *chan,
if (!tp_strv_contains (asks, field))
{
DEBUG ("%s is not in AvailableSearchKeys", field);
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"%s is not in AvailableSearchKeys", field);
return FALSE;
}
@@ -1204,7 +1204,7 @@ gabble_search_channel_class_init (GabbleSearchChannelClass *klass)
* server gave us a set of search keys, and they were sane, all components
* will be 0 or %NULL, indicating that this channel can be announced and
* used; if the server doesn't actually speak XEP 0055 or is full of bees,
- * they'll be an error in either the GABBLE_XMPP_ERROR or the TP_ERRORS
+ * they'll be an error in either the GABBLE_XMPP_ERROR or the TP_ERROR
* domain.
*/
signals[READY_OR_NOT] =
@@ -1235,7 +1235,7 @@ gabble_search_channel_search (TpSvcChannelTypeContactSearch *self,
if (priv->state != TP_CHANNEL_CONTACT_SEARCH_STATE_NOT_STARTED)
{
- error = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"SearchState is %s", states[priv->state]);
goto err;
}
@@ -1262,7 +1262,7 @@ gabble_search_channel_stop (TpSvcChannelTypeContactSearch *self,
{
case TP_CHANNEL_CONTACT_SEARCH_STATE_IN_PROGRESS:
{
- GError e = { TP_ERRORS, TP_ERROR_CANCELLED, "Stop() called" };
+ GError e = { TP_ERROR, TP_ERROR_CANCELLED, "Stop() called" };
change_search_state (chan,
TP_CHANNEL_CONTACT_SEARCH_STATE_FAILED, &e);
@@ -1274,7 +1274,7 @@ gabble_search_channel_stop (TpSvcChannelTypeContactSearch *self,
break;
case TP_CHANNEL_CONTACT_SEARCH_STATE_NOT_STARTED:
{
- GError e = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Search() hasn't been called yet" };
dbus_g_method_return_error (context, &e);