summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-05-07 17:17:15 +0100
committerWill Thompson <will.thompson@collabora.co.uk>2012-11-16 10:08:45 +0000
commitcd23b9a835033f837fe266b6eff18df64c41f8c8 (patch)
treefae0d3c0f17a240ae2ce8a6b1b705a3a99a74862
parent077a77aee8fc3bde292f60786059b27cc03e7428 (diff)
downloadtelepathy-salut-cd23b9a835033f837fe266b6eff18df64c41f8c8.tar.gz
Use TP_ERROR instead of long-deprecated TP_ERRORS
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=49594 Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
-rw-r--r--plugins/test.c2
-rw-r--r--src/avahi-olpc-activity.c2
-rw-r--r--src/bonjour-contact-manager.c2
-rw-r--r--src/bonjour-self.c4
-rw-r--r--src/connection-contact-info.c2
-rw-r--r--src/connection.c68
-rw-r--r--src/file-transfer-channel.c20
-rw-r--r--src/ft-manager.c18
-rw-r--r--src/im-channel.c4
-rw-r--r--src/im-manager.c6
-rw-r--r--src/muc-channel.c8
-rw-r--r--src/muc-manager.c12
-rw-r--r--src/olpc-activity.c6
-rw-r--r--src/plugin-loader.c2
-rw-r--r--src/plugin.c6
-rw-r--r--src/roomlist-manager.c2
-rw-r--r--src/self.c16
-rw-r--r--src/text-helper.c8
-rw-r--r--src/tube-dbus.c6
-rw-r--r--src/tube-stream.c34
-rw-r--r--src/tubes-channel.c40
-rw-r--r--src/tubes-manager.c32
22 files changed, 150 insertions, 150 deletions
diff --git a/plugins/test.c b/plugins/test.c
index 803a7aa9..70e231b8 100644
--- a/plugins/test.c
+++ b/plugins/test.c
@@ -77,7 +77,7 @@ test_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);
}
diff --git a/src/avahi-olpc-activity.c b/src/avahi-olpc-activity.c
index 8db8bd85..ea96235d 100644
--- a/src/avahi-olpc-activity.c
+++ b/src/avahi-olpc-activity.c
@@ -127,7 +127,7 @@ update_activity_service (SalutAvahiOlpcActivity *self,
if (!activity_is_announced (self))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Trying to update an activity that's not announced");
return FALSE;
}
diff --git a/src/bonjour-contact-manager.c b/src/bonjour-contact-manager.c
index 569f6dd8..a9b974a3 100644
--- a/src/bonjour-contact-manager.c
+++ b/src/bonjour-contact-manager.c
@@ -236,7 +236,7 @@ salut_bonjour_contact_manager_start (SalutContactManager *mgr,
if (error_type != kDNSServiceErr_NoError)
{
- *error = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ *error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Service Browse Failed with : (%d)", error_type);
return FALSE;
}
diff --git a/src/bonjour-self.c b/src/bonjour-self.c
index 518db17b..d9a33908 100644
--- a/src/bonjour-self.c
+++ b/src/bonjour-self.c
@@ -39,7 +39,7 @@
#define RETURN_ERROR_IF_FAIL(error_type, error) \
if (error_type != kDNSServiceErr_NoError) \
{ \
- *error = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE, \
+ *error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE, \
"bonjour-self failed with (%d)", error_type); \
return FALSE; \
}
@@ -472,7 +472,7 @@ salut_bonjour_self_set_avatar (SalutSelf *_self,
if (!salut_bonjour_self_publish_avatar (self, data, size, error))
{
- *error = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ *error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"bonjour-self failed with (%d)", error_type);
return FALSE;
}
diff --git a/src/connection-contact-info.c b/src/connection-contact-info.c
index 5e235fdb..c95a1ba9 100644
--- a/src/connection-contact-info.c
+++ b/src/connection-contact-info.c
@@ -340,7 +340,7 @@ salut_conn_contact_info_request_contact_info (
}
else
{
- error = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"No information available for '%s'",
tp_handle_inspect (contacts_repo, handle));
dbus_g_method_return_error (context, error);
diff --git a/src/connection.c b/src/connection.c
index eb8be8f2..03f745c9 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -701,7 +701,7 @@ set_own_status (GObject *obj,
/* TpPresenceMixin should validate this for us, but doesn't */
if (!G_VALUE_HOLDS_STRING (value))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Status argument 'message' requires a string");
return FALSE;
}
@@ -714,7 +714,7 @@ set_own_status (GObject *obj,
if (err != NULL)
{
- *error = g_error_new_literal (TP_ERRORS, TP_ERROR_NETWORK_ERROR,
+ *error = g_error_new_literal (TP_ERROR, TP_ERROR_NETWORK_ERROR,
err->message);
}
@@ -1530,7 +1530,7 @@ salut_connection_set_aliases (TpSvcConnectionInterfaceAliasing *iface,
if (alias == NULL || g_hash_table_size (aliases) != 1)
{
- GError e = { TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ GError e = { TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"In Salut you can only set your own alias" };
dbus_g_method_return_error (context, &e);
@@ -1900,7 +1900,7 @@ _request_avatar_cb (SalutContact *contact, guint8 *avatar, gsize size,
if (size == 0)
{
- err = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ err = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Unable to get avatar");
dbus_g_method_return_error (context, err);
g_error_free (err);
@@ -1947,7 +1947,7 @@ salut_connection_request_avatar (TpSvcConnectionInterfaceAvatars *iface,
contact = salut_contact_manager_get_contact (priv->contact_manager, handle);
if (contact == NULL || contact->avatar_token == NULL)
{
- err = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "No known avatar");
+ err = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE, "No known avatar");
dbus_g_method_return_error (context, err);
g_error_free (err);
if (contact != NULL)
@@ -2488,7 +2488,7 @@ salut_connection_olpc_get_properties (SalutSvcOLPCBuddyInfo *iface,
if (contact == NULL)
{
/* FIXME: should this be InvalidHandle? */
- GError e = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "Unknown contact" };
+ GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE, "Unknown contact" };
dbus_g_method_return_error (context, &e);
return;
}
@@ -2540,7 +2540,7 @@ salut_connection_olpc_set_properties (SalutSvcOLPCBuddyInfo *iface,
if (g_hash_table_find (properties, find_unknown_properties, known_properties)
!= NULL)
{
- error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Unknown property given");
goto error;
}
@@ -2550,7 +2550,7 @@ salut_connection_olpc_set_properties (SalutSvcOLPCBuddyInfo *iface,
{
if (G_VALUE_TYPE (val) != G_TYPE_STRING)
{
- error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Color value should be of type s");
goto error;
}
@@ -2590,7 +2590,7 @@ salut_connection_olpc_set_properties (SalutSvcOLPCBuddyInfo *iface,
if (!correct)
{
- error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Color value has an incorrect format");
goto error;
}
@@ -2601,7 +2601,7 @@ salut_connection_olpc_set_properties (SalutSvcOLPCBuddyInfo *iface,
{
if (G_VALUE_TYPE (val) != DBUS_TYPE_G_UCHAR_ARRAY)
{
- error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Key value should be of type ay");
goto error;
}
@@ -2610,7 +2610,7 @@ salut_connection_olpc_set_properties (SalutSvcOLPCBuddyInfo *iface,
key = g_value_get_boxed (val);
if (key->len == 0)
{
- error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Key value of length 0 not allowed");
goto error;
}
@@ -2622,7 +2622,7 @@ salut_connection_olpc_set_properties (SalutSvcOLPCBuddyInfo *iface,
{
if (G_VALUE_TYPE (val) != G_TYPE_STRING)
{
- error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"JID value should be of type s");
goto error;
}
@@ -2631,7 +2631,7 @@ salut_connection_olpc_set_properties (SalutSvcOLPCBuddyInfo *iface,
if (strchr (jid, '@') == NULL)
{
- error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"JID value has an incorrect format");
goto error;
}
@@ -2712,7 +2712,7 @@ salut_connection_olpc_get_current_activity (SalutSvcOLPCBuddyInfo *iface,
if (contact == NULL)
{
/* FIXME: should this be InvalidHandle? */
- GError e = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "Unknown contact" };
+ GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE, "Unknown contact" };
DEBUG ("Returning error: unknown contact");
dbus_g_method_return_error (context, &e);
return;
@@ -2747,7 +2747,7 @@ salut_connection_olpc_set_current_activity (SalutSvcOLPCBuddyInfo *iface,
{
if (room_handle != 0)
{
- GError e = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError e = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"If activity ID is empty, room handle must be 0" };
dbus_g_method_return_error (context, &e);
@@ -2801,7 +2801,7 @@ salut_connection_olpc_get_activities (SalutSvcOLPCBuddyInfo *iface,
if (contact == NULL)
{
/* FIXME: should this be InvalidHandle? */
- GError e = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "Unknown contact" };
+ GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE, "Unknown contact" };
DEBUG ("Returning error: unknown contact");
dbus_g_method_return_error (context, &e);
return;
@@ -2848,7 +2848,7 @@ salut_connection_olpc_set_activities (SalutSvcOLPCBuddyInfo *iface,
if (activity[0] == '\0')
{
- GError e = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError e = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Invalid empty activity ID" };
DEBUG ("%s", e.message);
@@ -2947,7 +2947,7 @@ salut_connection_act_get_properties (SalutSvcOLPCActivityProperties *iface,
priv->olpc_activity_manager, handle);
if (activity == NULL)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Activity unknown: %u", handle);
goto error;
}
@@ -3017,7 +3017,7 @@ extract_properties_from_hash (GHashTable *properties,
{
if (G_VALUE_TYPE (activity_id_val) != G_TYPE_STRING)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Activity ID value should be of type s");
return FALSE;
}
@@ -3032,7 +3032,7 @@ extract_properties_from_hash (GHashTable *properties,
{
if (G_VALUE_TYPE (color_val) != G_TYPE_STRING)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Color value should be of type s");
return FALSE;
}
@@ -3043,7 +3043,7 @@ extract_properties_from_hash (GHashTable *properties,
if (!check_color (*color))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Color value has an incorrect format");
return FALSE;
}
@@ -3056,7 +3056,7 @@ extract_properties_from_hash (GHashTable *properties,
{
if (G_VALUE_TYPE (activity_name_val) != G_TYPE_STRING)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"name value should be of type s");
return FALSE;
}
@@ -3071,7 +3071,7 @@ extract_properties_from_hash (GHashTable *properties,
{
if (G_VALUE_TYPE (activity_type_val) != G_TYPE_STRING)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"type value should be of type s");
return FALSE;
}
@@ -3082,7 +3082,7 @@ extract_properties_from_hash (GHashTable *properties,
if (*type[0] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"type value must be non-empty");
return FALSE;
}
@@ -3095,7 +3095,7 @@ extract_properties_from_hash (GHashTable *properties,
{
if (G_VALUE_TYPE (activity_type_val) != G_TYPE_STRING)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"tags value should be of type s");
return FALSE;
}
@@ -3110,7 +3110,7 @@ extract_properties_from_hash (GHashTable *properties,
{
if (G_VALUE_TYPE (is_private_val) != G_TYPE_BOOLEAN)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"private value should be of type b");
return FALSE;
}
@@ -3145,7 +3145,7 @@ salut_connection_act_set_properties (SalutSvcOLPCActivityProperties *iface,
if (g_hash_table_find (properties, find_unknown_properties, known_properties)
!= NULL)
{
- error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Unknown property given");
goto error;
}
@@ -3288,7 +3288,7 @@ salut_connection_act_get_activity (SalutSvcOLPCActivityProperties *iface,
priv->olpc_activity_manager, activity_id);
if (activity == NULL)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Activity unknown: %s", activity_id);
goto error;
}
@@ -3326,7 +3326,7 @@ salut_normalize_non_empty (const gchar *id,
if (*id == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"Salut handle names may not be the empty string");
return NULL;
}
@@ -3812,7 +3812,7 @@ salut_connection_start_connecting (TpBaseConnection *base, GError **error)
if (!salut_discovery_client_start (priv->discovery_client, &client_error))
{
- *error = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ *error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Unable to initialize the avahi client: %s",
client_error->message);
DEBUG ("%s", (*error)->message);
@@ -3925,7 +3925,7 @@ create_sidecar_cb (
{
/* TODO: maybe this lives in the loader? It knows what the plugin is
* called. */
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"A buggy plugin created a %s sidecar when asked to create %s",
actual_iface, ctx->sidecar_iface);
}
@@ -3979,7 +3979,7 @@ salut_connection_ensure_sidecar (
if (base_conn->status == TP_CONNECTION_STATUS_DISCONNECTED)
{
- GError e = { TP_ERRORS, TP_ERROR_DISCONNECTED,
+ GError e = { TP_ERROR, TP_ERROR_DISCONNECTED,
"This connection has already disconnected" };
DEBUG ("already disconnected, declining request for %s", sidecar_iface);
@@ -3989,7 +3989,7 @@ salut_connection_ensure_sidecar (
if (!tp_dbus_check_valid_interface_name (sidecar_iface, &error))
{
- error->domain = TP_ERRORS;
+ error->domain = TP_ERROR;
error->code = TP_ERROR_INVALID_ARGUMENT;
DEBUG ("%s is malformed: %s", sidecar_iface, error->message);
dbus_g_method_return_error (context, error);
@@ -4075,7 +4075,7 @@ sidecars_conn_status_changed_cb (
{
const gchar *sidecar_iface = key;
GList *contexts = value;
- GError *error = g_error_new (TP_ERRORS, TP_ERROR_CANCELLED,
+ GError *error = g_error_new (TP_ERROR, TP_ERROR_CANCELLED,
"Disconnected before %s could be created", sidecar_iface);
DEBUG ("failing all %u requests for %s", g_list_length (contexts),
diff --git a/src/file-transfer-channel.c b/src/file-transfer-channel.c
index 837f7402..9afcce8b 100644
--- a/src/file-transfer-channel.c
+++ b/src/file-transfer-channel.c
@@ -414,21 +414,21 @@ file_transfer_channel_properties_setter (GObject *object,
if (self->priv->uri != NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"URI has already be set");
return FALSE;
}
if (tp_base_channel_is_requested (TP_BASE_CHANNEL (self)))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Channel is not an incoming transfer");
return FALSE;
}
if (self->priv->state != TP_FILE_TRANSFER_STATE_PENDING)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"State is not pending; cannot set URI");
return FALSE;
}
@@ -1155,7 +1155,7 @@ check_address_and_access_control (SalutFileTransferChannel *self,
GUINT_TO_POINTER (address_type));
if (access_arr == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"AddressType %u is not implemented", address_type);
return FALSE;
}
@@ -1170,7 +1170,7 @@ check_address_and_access_control (SalutFileTransferChannel *self,
return TRUE;
}
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"AccesControl %u is not implemented with AddressType %u",
access_control, address_type);
@@ -1220,7 +1220,7 @@ salut_file_transfer_channel_accept_file (TpSvcChannelTypeFileTransfer *iface,
if (self->priv->state != TP_FILE_TRANSFER_STATE_PENDING)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"State is not pending; cannot accept file");
dbus_g_method_return_error (context, error);
return;
@@ -1242,7 +1242,7 @@ salut_file_transfer_channel_accept_file (TpSvcChannelTypeFileTransfer *iface,
if (!setup_local_socket (self, address_type, access_control))
{
DEBUG ("Could not set up local socket");
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Could not set up local socket");
dbus_g_method_return_error (context, error);
}
@@ -1289,7 +1289,7 @@ salut_file_transfer_channel_provide_file (
if (!tp_base_channel_is_requested (base))
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Channel is not an outgoing transfer");
dbus_g_method_return_error (context, error);
return;
@@ -1297,7 +1297,7 @@ salut_file_transfer_channel_provide_file (
if (self->priv->socket != NULL)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"ProvideFile has already been called for this channel");
dbus_g_method_return_error (context, error);
return;
@@ -1314,7 +1314,7 @@ salut_file_transfer_channel_provide_file (
if (!setup_local_socket (self, address_type, access_control))
{
DEBUG ("Could not set up local socket");
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Could not set up local socket");
dbus_g_method_return_error (context, error);
}
diff --git a/src/ft-manager.c b/src/ft-manager.c
index 353fa619..a345d45e 100644
--- a/src/ft-manager.c
+++ b/src/ft-manager.c
@@ -324,7 +324,7 @@ salut_ft_manager_handle_request (TpChannelManager *manager,
/* Don't support opening a channel to our self handle */
if (handle == base_connection->self_handle)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Can't open a file transfer channel to yourself");
goto error;
}
@@ -333,7 +333,7 @@ salut_ft_manager_handle_request (TpChannelManager *manager,
TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".ContentType");
if (content_type == NULL)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"ContentType property is mandatory");
goto error;
}
@@ -342,7 +342,7 @@ salut_ft_manager_handle_request (TpChannelManager *manager,
TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Filename");
if (filename == NULL)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Filename property is mandatory");
goto error;
}
@@ -351,7 +351,7 @@ salut_ft_manager_handle_request (TpChannelManager *manager,
TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Size", NULL);
if (size == 0)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Size property is mandatory");
goto error;
}
@@ -367,7 +367,7 @@ salut_ft_manager_handle_request (TpChannelManager *manager,
{
if (content_hash_type >= NUM_TP_FILE_HASH_TYPES)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"%u is not a valid ContentHashType", content_hash_type);
goto error;
}
@@ -379,7 +379,7 @@ salut_ft_manager_handle_request (TpChannelManager *manager,
TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".ContentHash");
if (content_hash == NULL)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"ContentHash property is mandatory if ContentHashType is "
"not None");
goto error;
@@ -411,7 +411,7 @@ salut_ft_manager_handle_request (TpChannelManager *manager,
if (metadata != NULL && g_hash_table_lookup ((GHashTable *) metadata, "FORM_TYPE"))
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Metadata cannot contain an item with key 'FORM_TYPE'");
goto error;
}
@@ -421,7 +421,7 @@ salut_ft_manager_handle_request (TpChannelManager *manager,
{
const gchar *name = tp_handle_inspect (contact_repo, handle);
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"%s is not online", name);
goto error;
@@ -431,7 +431,7 @@ salut_ft_manager_handle_request (TpChannelManager *manager,
{
if (!gabble_capability_set_has (contact->caps, NS_TP_FT_METADATA))
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_CAPABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_CAPABLE,
"The specified contact does not support the "
"Metadata extension; you should ensure both ServiceName and "
"Metadata properties are not present in the channel "
diff --git a/src/im-channel.c b/src/im-channel.c
index de04eca5..957cc6d5 100644
--- a/src/im-channel.c
+++ b/src/im-channel.c
@@ -443,10 +443,10 @@ error:
if (stanza != NULL)
g_object_unref (G_OBJECT (stanza));
- if (error != NULL && error->domain != TP_ERRORS)
+ if (error != NULL && error->domain != TP_ERROR)
{
GError *e = NULL;
- g_set_error_literal (&e, TP_ERRORS,
+ g_set_error_literal (&e, TP_ERROR,
TP_ERROR_NETWORK_ERROR,
error->message);
g_error_free (error);
diff --git a/src/im-manager.c b/src/im-manager.c
index e0f6bf18..fe5c7bca 100644
--- a/src/im-manager.c
+++ b/src/im-manager.c
@@ -414,7 +414,7 @@ salut_im_manager_requestotron (SalutImManager *self,
/* Don't support opening a channel to our self handle */
if (handle == base_conn->self_handle)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Can't open a text channel to yourself");
goto error;
}
@@ -430,7 +430,7 @@ salut_im_manager_requestotron (SalutImManager *self,
if (require_new)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Already chatting with contact #%u in another channel", handle);
goto error;
}
@@ -544,7 +544,7 @@ salut_im_manager_new_channel (SalutImManager *mgr,
if (contact == NULL)
{
gchar *message = g_strdup_printf ("%s is not online", name);
- tp_channel_manager_emit_request_failed (mgr, request, TP_ERRORS,
+ tp_channel_manager_emit_request_failed (mgr, request, TP_ERROR,
TP_ERROR_NOT_AVAILABLE, message);
g_free (message);
return NULL;
diff --git a/src/muc-channel.c b/src/muc-channel.c
index 53fe3273..93caa556 100644
--- a/src/muc-channel.c
+++ b/src/muc-channel.c
@@ -462,7 +462,7 @@ salut_muc_channel_send_invitation (SalutMucChannel *self,
if (contact == NULL)
{
- *error = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ *error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Couldn't contact the contact");
return FALSE;
}
@@ -524,7 +524,7 @@ salut_muc_channel_add_member (GObject *iface,
}
else
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NETWORK_ERROR,
+ g_set_error (error, TP_ERROR, TP_ERROR_NETWORK_ERROR,
"Failed to connect to the group");
ret = FALSE;
}
@@ -593,7 +593,7 @@ salut_muc_channel_remove_member_with_reason (GObject *object,
if (handle != base_connection->self_handle)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Contacts cannot be kicked from Clique chatrooms");
return FALSE;
}
@@ -1084,7 +1084,7 @@ salut_muc_channel_disconnected (GibberTransport *transport, gpointer user_data)
if (!priv->connected)
{
/* FIXME the disconnected signal should give us an error */
- GError error = { TP_ERRORS, TP_ERROR_NETWORK_ERROR,
+ GError error = { TP_ERROR, TP_ERROR_NETWORK_ERROR,
"can't join the muc" };
g_signal_emit (self, signals[JOIN_ERROR], 0, &error);
}
diff --git a/src/muc-manager.c b/src/muc-manager.c
index 8951da92..182c1e92 100644
--- a/src/muc-manager.c
+++ b/src/muc-manager.c
@@ -604,7 +604,7 @@ salut_muc_manager_request_new_muc_channel (SalutMucManager *mgr,
{
DEBUG ("get connection failed: %s", connection_error->message);
if (error != NULL)
- *error = g_error_new_literal (TP_ERRORS, TP_ERROR_NETWORK_ERROR,
+ *error = g_error_new_literal (TP_ERROR, TP_ERROR_NETWORK_ERROR,
connection_error->message);
g_error_free (connection_error);
return NULL;
@@ -615,7 +615,7 @@ salut_muc_manager_request_new_muc_channel (SalutMucManager *mgr,
{
DEBUG ("Connect failed: %s", connection_error->message);
if (error != NULL)
- *error = g_error_new_literal (TP_ERRORS, TP_ERROR_NETWORK_ERROR,
+ *error = g_error_new_literal (TP_ERROR, TP_ERROR_NETWORK_ERROR,
connection_error->message);
g_error_free (connection_error);
g_object_unref (connection);
@@ -793,7 +793,7 @@ handle_stream_tube_channel_request (SalutMucManager *self,
TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service");
if (service == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Request does not contain the mandatory property '%s'",
TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service");
return FALSE;
@@ -824,7 +824,7 @@ handle_dbus_tube_channel_request (SalutMucManager *self,
TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName");
if (service == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Request does not contain the mandatory property '%s'",
TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName");
return FALSE;
@@ -880,7 +880,7 @@ salut_muc_manager_request (SalutMucManager *self,
{
if (require_new)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"That channel has already been created (or requested)");
goto error;
}
@@ -913,7 +913,7 @@ salut_muc_manager_request (SalutMucManager *self,
{
if (require_new)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"That channel has already been created (or requested)");
goto error;
}
diff --git a/src/olpc-activity.c b/src/olpc-activity.c
index 4077559f..333c884d 100644
--- a/src/olpc-activity.c
+++ b/src/olpc-activity.c
@@ -329,7 +329,7 @@ send_properties_change_msg (SalutOlpcActivity *self,
result = gibber_muc_connection_send (muc_connection, stanza, &err);
if (!result)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NETWORK_ERROR, "%s",
+ g_set_error (error, TP_ERROR, TP_ERROR_NETWORK_ERROR, "%s",
err->message);
g_error_free (err);
}
@@ -408,7 +408,7 @@ salut_olpc_activity_announce (SalutOlpcActivity *self,
if (!SALUT_OLPC_ACTIVITY_GET_CLASS (self)->announce (self, &err))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NETWORK_ERROR, "%s",
+ g_set_error (error, TP_ERROR, TP_ERROR_NETWORK_ERROR, "%s",
err->message);
g_error_free (err);
return FALSE;
@@ -563,7 +563,7 @@ salut_olpc_activity_joined (SalutOlpcActivity *self,
if (priv->muc == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Can't find muc channel for room %s", tp_handle_inspect (
room_repo, self->room));
return FALSE;
diff --git a/src/plugin-loader.c b/src/plugin-loader.c
index 024fd632..a54fd545 100644
--- a/src/plugin-loader.c
+++ b/src/plugin-loader.c
@@ -295,7 +295,7 @@ salut_plugin_loader_create_sidecar_async (
}
g_simple_async_report_error_in_idle (G_OBJECT (self), callback, user_data,
- TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED, "No plugin implements sidecar '%s'",
+ TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "No plugin implements sidecar '%s'",
sidecar_interface);
}
diff --git a/src/plugin.c b/src/plugin.c
index 4c1f7b05..12104e55 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -80,17 +80,17 @@ salut_plugin_create_sidecar_async (
if (!salut_plugin_implements_sidecar (plugin, sidecar_interface))
g_simple_async_report_error_in_idle (G_OBJECT (plugin), callback,
- user_data, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ user_data, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Salut is buggy: '%s' doesn't implement sidecar %s",
iface->name, sidecar_interface);
else if (iface->create_sidecar_async == NULL)
g_simple_async_report_error_in_idle (G_OBJECT (plugin), callback,
- user_data, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ user_data, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"'%s' is buggy: it claims to implement %s, but does not implement "
"create_sidecar", iface->name, sidecar_interface);
else if (iface->create_sidecar_finish == NULL)
g_simple_async_report_error_in_idle (G_OBJECT (plugin), callback,
- user_data, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ user_data, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"'%s' is buggy: does not implement create_sidecar_finish",
iface->name);
else
diff --git a/src/roomlist-manager.c b/src/roomlist-manager.c
index f95fbd31..b121917e 100644
--- a/src/roomlist-manager.c
+++ b/src/roomlist-manager.c
@@ -401,7 +401,7 @@ salut_roomlist_manager_request (TpChannelManager *manager,
if (tp_asv_get_uint32 (request_properties,
TP_IFACE_CHANNEL ".TargetHandleType", NULL) != 0)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"RoomList channels can't have a target handle");
goto error;
}
diff --git a/src/self.c b/src/self.c
index 820363a1..f2def72b 100644
--- a/src/self.c
+++ b/src/self.c
@@ -605,7 +605,7 @@ salut_self_set_alias (SalutSelf *self, const gchar *alias, GError **error)
if (!ret)
{
if (error != NULL)
- *error = g_error_new_literal (TP_ERRORS, TP_ERROR_NETWORK_ERROR,
+ *error = g_error_new_literal (TP_ERROR, TP_ERROR_NETWORK_ERROR,
err->message);
g_error_free (err);
}
@@ -648,7 +648,7 @@ salut_self_set_avatar (SalutSelf *self, guint8 *data,
{
salut_self_remove_avatar (self);
if (err != NULL)
- *error = g_error_new_literal (TP_ERRORS, TP_ERROR_NETWORK_ERROR,
+ *error = g_error_new_literal (TP_ERROR, TP_ERROR_NETWORK_ERROR,
err->message);
g_error_free (err);
}
@@ -670,7 +670,7 @@ salut_self_add_olpc_activity (SalutSelf *self, const gchar *activity_id,
if (strchr (activity_id, ':') != NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Activity IDs may not contain ':'");
return FALSE;
}
@@ -808,7 +808,7 @@ salut_self_set_olpc_current_activity (SalutSelf *self,
if (id[0] != '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"In SetCurrentActivity, activity ID must be \"\" if room handle "
"is 0");
return FALSE;
@@ -820,7 +820,7 @@ salut_self_set_olpc_current_activity (SalutSelf *self,
if (id[0] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"In SetCurrentActivity, activity ID must not be \"\" if room "
"handle is non-zero");
return FALSE;
@@ -839,7 +839,7 @@ salut_self_set_olpc_current_activity (SalutSelf *self,
if (!SALUT_SELF_GET_CLASS (self)->update_current_activity (self, room_name,
&err))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NETWORK_ERROR, "%s",
+ g_set_error (error, TP_ERROR, TP_ERROR_NETWORK_ERROR, "%s",
err->message);
g_error_free (err);
return FALSE;
@@ -872,7 +872,7 @@ salut_self_set_olpc_activity_properties (SalutSelf *self,
{
/* User have to call org.laptop.Telepathy.BuddyInfo.SetActivities
* to create the activity */
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"No activity associated with room having handle %d", handle);
return FALSE;
}
@@ -922,7 +922,7 @@ salut_self_set_olpc_properties (SalutSelf *self,
if (!SALUT_SELF_GET_CLASS (self)->set_olpc_properties (self, key, color, jid,
&err))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NETWORK_ERROR, "%s",
+ g_set_error (error, TP_ERROR, TP_ERROR_NETWORK_ERROR, "%s",
err->message);
g_error_free (err);
return FALSE;
diff --git a/src/text-helper.c b/src/text-helper.c
index 4c15ab05..c21842fd 100644
--- a/src/text-helper.c
+++ b/src/text-helper.c
@@ -68,7 +68,7 @@ create_message_stanza (const gchar *from, const gchar *to,
{
DEBUG ("invalid message type %u", type);
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"invalid message type: %u", type);
return NULL;
@@ -248,7 +248,7 @@ text_helper_validate_tp_message (TpMessage *message,
if (tp_message_count_parts (message) != 2)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Invalid number of message parts, expected 2, got %d",
tp_message_count_parts (message));
return FALSE;
@@ -261,7 +261,7 @@ text_helper_validate_tp_message (TpMessage *message,
if (!valid || msgtype > TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Invalid message type");
return FALSE;
}
@@ -271,7 +271,7 @@ text_helper_validate_tp_message (TpMessage *message,
if (msgtext == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Empty message content");
return FALSE;
}
diff --git a/src/tube-dbus.c b/src/tube-dbus.c
index 6ed2dec9..026295f5 100644
--- a/src/tube-dbus.c
+++ b/src/tube-dbus.c
@@ -457,7 +457,7 @@ create_dbus_server (SalutTubeDBus *self,
g_free (priv->socket_path);
priv->socket_path = NULL;
- g_set_error (err, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (err, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Can't create D-Bus server");
return FALSE;
}
@@ -1218,7 +1218,7 @@ salut_tube_dbus_offer (SalutTubeDBus *self,
if (priv->offered)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Tube has already been offered");
return FALSE;
}
@@ -1758,7 +1758,7 @@ salut_tube_dbus_check_access_control (SalutTubeDBus *self,
break;
default:
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"%u socket access control is not supported", access_control);
return FALSE;
}
diff --git a/src/tube-stream.c b/src/tube-stream.c
index 3d9bb127..e538cc16 100644
--- a/src/tube-stream.c
+++ b/src/tube-stream.c
@@ -577,7 +577,7 @@ start_stream_initiation (SalutTubeStream *self,
if (contact == NULL)
{
result = FALSE;
- g_set_error (error, TP_ERRORS, TP_ERROR_NETWORK_ERROR,
+ g_set_error (error, TP_ERROR, TP_ERROR_NETWORK_ERROR,
"can't find contact with handle %d", priv->initiator);
g_object_unref (transport);
g_slice_free (struct _extra_bytestream_negotiate_cb_data, data);
@@ -637,7 +637,7 @@ start_stream_direct (SalutTubeStream *self,
contact = salut_contact_manager_get_contact (contact_mgr, priv->initiator);
if (contact == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NETWORK_ERROR,
+ g_set_error (error, TP_ERROR, TP_ERROR_NETWORK_ERROR,
"can't find contact with handle %d", priv->initiator);
g_object_unref (contact_mgr);
@@ -2043,7 +2043,7 @@ check_unix_params (TpSocketAddressType address_type,
/* Check address type */
if (G_VALUE_TYPE (address) != DBUS_TYPE_G_UCHAR_ARRAY)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Unix socket address is supposed to be ay");
return FALSE;
}
@@ -2052,7 +2052,7 @@ check_unix_params (TpSocketAddressType address_type,
if (array->len > sizeof (dummy.sun_path) - 1)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Unix socket path is too long (max length allowed: %"
G_GSIZE_FORMAT ")",
sizeof (dummy.sun_path) - 1);
@@ -2063,7 +2063,7 @@ check_unix_params (TpSocketAddressType address_type,
{
if (g_array_index (array, gchar , i) == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Unix socket path can't contain zero bytes");
return FALSE;
}
@@ -2075,7 +2075,7 @@ check_unix_params (TpSocketAddressType address_type,
{
DEBUG ("Error calling stat on socket: %s", g_strerror (errno));
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, "%s: %s",
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "%s: %s",
socket_path->str, g_strerror (errno));
g_string_free (socket_path, TRUE);
return FALSE;
@@ -2085,7 +2085,7 @@ check_unix_params (TpSocketAddressType address_type,
{
DEBUG ("%s is not a socket", socket_path->str);
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"%s is not a socket", socket_path->str);
g_string_free (socket_path, TRUE);
return FALSE;
@@ -2095,7 +2095,7 @@ check_unix_params (TpSocketAddressType address_type,
if (access_control != TP_SOCKET_ACCESS_CONTROL_LOCALHOST)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Unix sockets only support localhost control access");
return FALSE;
}
@@ -2121,7 +2121,7 @@ check_ip_params (TpSocketAddressType address_type,
{
if (G_VALUE_TYPE (address) != TP_STRUCT_TYPE_SOCKET_ADDRESS_IPV4)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"IPv4 socket address is supposed to be sq");
return FALSE;
}
@@ -2130,7 +2130,7 @@ check_ip_params (TpSocketAddressType address_type,
{
if (G_VALUE_TYPE (address) != TP_STRUCT_TYPE_SOCKET_ADDRESS_IPV6)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"IPv6 socket address is supposed to be sq");
return FALSE;
}
@@ -2158,7 +2158,7 @@ check_ip_params (TpSocketAddressType address_type,
ret = getaddrinfo (ip, NULL, &req, &result);
if (ret != 0)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Invalid address: %s", gai_strerror (ret));
g_free (ip);
return FALSE;
@@ -2169,7 +2169,7 @@ check_ip_params (TpSocketAddressType address_type,
if (access_control != TP_SOCKET_ACCESS_CONTROL_LOCALHOST)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"%s sockets only support localhost control access",
(address_type == TP_SOCKET_ADDRESS_TYPE_IPV4 ? "IPv4" : "IPv6"));
return FALSE;
@@ -2198,7 +2198,7 @@ salut_tube_stream_check_params (TpSocketAddressType address_type,
access_control_param, error);
default:
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Address type %d not implemented", address_type);
return FALSE;
}
@@ -2224,7 +2224,7 @@ salut_tube_stream_offer_async (TpSvcChannelTypeStreamTube *iface,
if (priv->state != TP_TUBE_CHANNEL_STATE_NOT_OFFERED)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Tube is not in the not offered state");
dbus_g_method_return_error (context, error);
g_error_free (error);
@@ -2280,7 +2280,7 @@ salut_tube_stream_accept_async (TpSvcChannelTypeStreamTube *iface,
if (priv->state != TP_TUBE_CHANNEL_STATE_LOCAL_PENDING)
{
- GError e = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError e = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Tube is not in the local pending state" };
dbus_g_method_return_error (context, &e);
@@ -2291,7 +2291,7 @@ salut_tube_stream_accept_async (TpSvcChannelTypeStreamTube *iface,
address_type != TP_SOCKET_ADDRESS_TYPE_IPV4 &&
address_type != TP_SOCKET_ADDRESS_TYPE_IPV6)
{
- error = g_error_new (TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ error = g_error_new (TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Address type %d not implemented", address_type);
dbus_g_method_return_error (context, error);
@@ -2301,7 +2301,7 @@ salut_tube_stream_accept_async (TpSvcChannelTypeStreamTube *iface,
if (access_control != TP_SOCKET_ACCESS_CONTROL_LOCALHOST)
{
- GError e = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError e = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Unix sockets only support localhost control access" };
dbus_g_method_return_error (context, &e);
diff --git a/src/tubes-channel.c b/src/tubes-channel.c
index 0058eb05..3be20e6f 100644
--- a/src/tubes-channel.c
+++ b/src/tubes-channel.c
@@ -1481,7 +1481,7 @@ salut_tubes_channel_offer_d_bus_tube (TpSvcChannelTypeTubes *iface,
&& !tp_handle_set_is_member (TP_GROUP_MIXIN (self->muc)->members,
priv->self_handle))
{
- GError error = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError error = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Tube channel isn't connected" };
dbus_g_method_return_error (context, &error);
@@ -1530,7 +1530,7 @@ salut_tubes_channel_accept_d_bus_tube (TpSvcChannelTypeTubes *iface,
tube = g_hash_table_lookup (priv->tubes, GUINT_TO_POINTER (id));
if (tube == NULL)
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, "Unknown tube" };
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Unknown tube" };
dbus_g_method_return_error (context, &error);
@@ -1544,7 +1544,7 @@ salut_tubes_channel_accept_d_bus_tube (TpSvcChannelTypeTubes *iface,
if (type != TP_TUBE_TYPE_DBUS)
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Tube is not a D-Bus tube" };
dbus_g_method_return_error (context, &error);
@@ -1553,7 +1553,7 @@ salut_tubes_channel_accept_d_bus_tube (TpSvcChannelTypeTubes *iface,
if (state != TP_TUBE_CHANNEL_STATE_LOCAL_PENDING)
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Tube is not in the local pending state" };
dbus_g_method_return_error (context, &error);
@@ -1595,7 +1595,7 @@ salut_tubes_channel_close_tube (TpSvcChannelTypeTubes *iface,
tube = g_hash_table_lookup (priv->tubes, GUINT_TO_POINTER (id));
if (tube == NULL)
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, "Unknown tube" };
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Unknown tube" };
dbus_g_method_return_error (context, &error);
return;
@@ -1632,7 +1632,7 @@ salut_tubes_channel_get_d_bus_tube_address (TpSvcChannelTypeTubes *iface,
if (tube == NULL)
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, "Unknown tube" };
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Unknown tube" };
dbus_g_method_return_error (context, &error);
return;
@@ -1645,7 +1645,7 @@ salut_tubes_channel_get_d_bus_tube_address (TpSvcChannelTypeTubes *iface,
if (type != TP_TUBE_TYPE_DBUS)
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Tube is not a D-Bus tube" };
dbus_g_method_return_error (context, &error);
@@ -1654,7 +1654,7 @@ salut_tubes_channel_get_d_bus_tube_address (TpSvcChannelTypeTubes *iface,
if (state != TP_TUBE_CHANNEL_STATE_OPEN)
{
- GError error = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError error = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Tube is not open" };
dbus_g_method_return_error (context, &error);
@@ -1711,7 +1711,7 @@ salut_tubes_channel_get_d_bus_names (TpSvcChannelTypeTubes *iface,
if (tube == NULL)
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, "Unknown tube" };
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Unknown tube" };
dbus_g_method_return_error (context, &error);
return;
@@ -1724,7 +1724,7 @@ salut_tubes_channel_get_d_bus_names (TpSvcChannelTypeTubes *iface,
if (type != TP_TUBE_TYPE_DBUS)
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Tube is not a D-Bus tube" };
dbus_g_method_return_error (context, &error);
@@ -1733,7 +1733,7 @@ salut_tubes_channel_get_d_bus_names (TpSvcChannelTypeTubes *iface,
if (state != TP_TUBE_CHANNEL_STATE_OPEN)
{
- GError error = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError error = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Tube is not open" };
dbus_g_method_return_error (context, &error);
@@ -1963,7 +1963,7 @@ salut_tubes_channel_offer_stream_tube (TpSvcChannelTypeTubes *iface,
&& !tp_handle_set_is_member (TP_GROUP_MIXIN (self->muc)->members,
priv->self_handle))
{
- GError err = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError err = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Tube channel isn't connected" };
dbus_g_method_return_error (context, &err);
@@ -2034,7 +2034,7 @@ salut_tubes_channel_accept_stream_tube (TpSvcChannelTypeTubes *iface,
tube = g_hash_table_lookup (priv->tubes, GUINT_TO_POINTER (id));
if (tube == NULL)
{
- GError err = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, "Unknown tube" };
+ GError err = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Unknown tube" };
dbus_g_method_return_error (context, &err);
return;
@@ -2046,7 +2046,7 @@ salut_tubes_channel_accept_stream_tube (TpSvcChannelTypeTubes *iface,
{
GError *err = NULL;
- err = g_error_new (TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ err = g_error_new (TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Address type %d not implemented", address_type);
dbus_g_method_return_error (context, err);
@@ -2059,7 +2059,7 @@ salut_tubes_channel_accept_stream_tube (TpSvcChannelTypeTubes *iface,
{
GError *err = NULL;
- err = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ err = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Unix sockets only support localhost control access");
dbus_g_method_return_error (context, err);
@@ -2075,7 +2075,7 @@ salut_tubes_channel_accept_stream_tube (TpSvcChannelTypeTubes *iface,
if (type != TP_TUBE_TYPE_STREAM)
{
- GError err = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError err = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Tube is not a stream tube" };
dbus_g_method_return_error (context, &err);
@@ -2084,7 +2084,7 @@ salut_tubes_channel_accept_stream_tube (TpSvcChannelTypeTubes *iface,
if (state != TP_TUBE_CHANNEL_STATE_LOCAL_PENDING)
{
- GError err = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError err = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Tube is not in the local pending state" };
dbus_g_method_return_error (context, &err);
@@ -2131,7 +2131,7 @@ salut_tubes_channel_get_stream_tube_socket_address (TpSvcChannelTypeTubes *iface
tube = g_hash_table_lookup (priv->tubes, GUINT_TO_POINTER (id));
if (tube == NULL)
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, "Unknown tube" };
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Unknown tube" };
dbus_g_method_return_error (context, &error);
return;
@@ -2144,7 +2144,7 @@ salut_tubes_channel_get_stream_tube_socket_address (TpSvcChannelTypeTubes *iface
if (type != TP_TUBE_TYPE_STREAM)
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Tube is not a Stream tube" };
dbus_g_method_return_error (context, &error);
@@ -2153,7 +2153,7 @@ salut_tubes_channel_get_stream_tube_socket_address (TpSvcChannelTypeTubes *iface
if (state != TP_TUBE_CHANNEL_STATE_OPEN)
{
- GError error = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError error = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Tube is not open" };
dbus_g_method_return_error (context, &error);
diff --git a/src/tubes-manager.c b/src/tubes-manager.c
index c768f6a3..3fc6bfc7 100644
--- a/src/tubes-manager.c
+++ b/src/tubes-manager.c
@@ -138,7 +138,7 @@ extract_tube_information (TpHandleRepoIface *contact_repo,
from = wocky_node_get_attribute (iq, "from");
if (from == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"got a message without a from field");
return FALSE;
}
@@ -147,7 +147,7 @@ extract_tube_information (TpHandleRepoIface *contact_repo,
if (*initiator_handle == 0)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"invalid initiator ID %s", from);
return FALSE;
}
@@ -160,13 +160,13 @@ extract_tube_information (TpHandleRepoIface *contact_repo,
if (tube_node == NULL && close_node == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The <iq> does not have a <tube> nor a <close>");
return FALSE;
}
if (tube_node != NULL && close_node != NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The <iq> has both a <tube> nor a <close>");
return FALSE;
}
@@ -194,7 +194,7 @@ extract_tube_information (TpHandleRepoIface *contact_repo,
str = wocky_node_get_attribute (node, "id");
if (str == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"no tube id in tube request");
return FALSE;
}
@@ -202,7 +202,7 @@ extract_tube_information (TpHandleRepoIface *contact_repo,
tmp = strtol (str, &endptr, 10);
if (!endptr || *endptr)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"tube id is not numeric: %s", str);
return FALSE;
}
@@ -224,7 +224,7 @@ extract_tube_information (TpHandleRepoIface *contact_repo,
*type = TP_TUBE_TYPE_DBUS;
else
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The <iq><tube> does not have a correct type: '%s'", tube_type);
return FALSE;
}
@@ -254,7 +254,7 @@ extract_tube_information (TpHandleRepoIface *contact_repo,
transport_node = wocky_node_get_child (tube_node, "transport");
if (transport_node == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"no transport to connect to in the tube request");
return FALSE;
}
@@ -262,7 +262,7 @@ extract_tube_information (TpHandleRepoIface *contact_repo,
str = wocky_node_get_attribute (transport_node, "port");
if (str == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"no port to connect to in the tube request");
return FALSE;
}
@@ -270,7 +270,7 @@ extract_tube_information (TpHandleRepoIface *contact_repo,
tmp = strtol (str, &endptr, 10);
if (!endptr || *endptr)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"port is not numeric: %s", str);
return FALSE;
}
@@ -638,7 +638,7 @@ new_tubes_channel (SalutTubesManager *fac,
TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (
base_conn, TP_HANDLE_TYPE_CONTACT);
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"%s is not online", tp_handle_inspect (contact_repo, handle));
return NULL;
}
@@ -840,7 +840,7 @@ salut_tubes_manager_requestotron (SalutTubesManager *self,
TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service");
if (service == NULL)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"StreamTube requests must include '%s'",
TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service");
goto error;
@@ -863,7 +863,7 @@ salut_tubes_manager_requestotron (SalutTubesManager *self,
TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName");
if (service == NULL)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Request missed a mandatory property '%s'",
TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName");
goto error;
@@ -872,7 +872,7 @@ salut_tubes_manager_requestotron (SalutTubesManager *self,
if (!tp_dbus_check_valid_bus_name (service, TP_DBUS_NAME_TYPE_WELL_KNOWN,
&err))
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Invalid ServiceName: %s", err->message);
g_error_free (err);
goto error;
@@ -889,7 +889,7 @@ salut_tubes_manager_requestotron (SalutTubesManager *self,
/* Don't support opening a channel to our self handle */
if (handle == base_conn->self_handle)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Can't open a channel to your self handle");
goto error;
}
@@ -920,7 +920,7 @@ salut_tubes_manager_requestotron (SalutTubesManager *self,
if (require_new)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"A tube channel with contact #%u already exists", handle);
DEBUG ("A tube channel with contact #%u already exists", handle);
goto error;