summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/client/dbus-tubes/accepter.c2
-rw-r--r--examples/client/stream-tubes/accepter.c2
-rw-r--r--examples/cm/call/call-channel.c4
-rw-r--r--examples/cm/call/call-manager.c4
-rw-r--r--examples/cm/call/protocol.c4
-rw-r--r--examples/cm/channelspecific/conn.c6
-rw-r--r--examples/cm/channelspecific/protocol.c12
-rw-r--r--examples/cm/channelspecific/room-manager.c2
-rw-r--r--examples/cm/channelspecific/room.c2
-rw-r--r--examples/cm/contactlist/protocol.c4
-rw-r--r--examples/cm/echo-message-parts/im-manager.c2
-rw-r--r--examples/cm/echo-message-parts/protocol.c6
-rw-r--r--examples/cm/extended/protocol.c6
-rw-r--r--telepathy-glib/account-channel-request.c6
-rw-r--r--telepathy-glib/account-manager.c2
-rw-r--r--telepathy-glib/account.c12
-rw-r--r--telepathy-glib/add-dispatch-operation-context.c2
-rw-r--r--telepathy-glib/base-call-channel.c22
-rw-r--r--telepathy-glib/base-call-content.c2
-rw-r--r--telepathy-glib/base-call-stream.c8
-rw-r--r--telepathy-glib/base-client.c22
-rw-r--r--telepathy-glib/base-connection-manager.c6
-rw-r--r--telepathy-glib/base-connection.c26
-rw-r--r--telepathy-glib/base-connection.h2
-rw-r--r--telepathy-glib/base-contact-list.c46
-rw-r--r--telepathy-glib/base-media-call-content.c24
-rw-r--r--telepathy-glib/base-media-call-stream.c6
-rw-r--r--telepathy-glib/base-password-channel.c14
-rw-r--r--telepathy-glib/base-protocol.c32
-rw-r--r--telepathy-glib/call-channel.c2
-rw-r--r--telepathy-glib/call-content-media-description.c8
-rw-r--r--telepathy-glib/call-content.c8
-rw-r--r--telepathy-glib/call-stream-endpoint.c16
-rw-r--r--telepathy-glib/call-stream.c2
-rw-r--r--telepathy-glib/channel-contacts.c2
-rw-r--r--telepathy-glib/channel-dispatch-operation.c10
-rw-r--r--telepathy-glib/channel-dispatcher.c2
-rw-r--r--telepathy-glib/channel-group.c2
-rw-r--r--telepathy-glib/channel-manager.c2
-rw-r--r--telepathy-glib/channel-request.c4
-rw-r--r--telepathy-glib/channel.c6
-rw-r--r--telepathy-glib/client.c2
-rw-r--r--telepathy-glib/connection-contact-info.c2
-rw-r--r--telepathy-glib/connection-manager.c14
-rw-r--r--telepathy-glib/connection.c6
-rw-r--r--telepathy-glib/contact-list-channel.c6
-rw-r--r--telepathy-glib/contact.c12
-rw-r--r--telepathy-glib/dbus-daemon.c16
-rw-r--r--telepathy-glib/dbus-properties-mixin.c18
-rw-r--r--telepathy-glib/dbus-tube-channel.c4
-rw-r--r--telepathy-glib/dbus.c2
-rw-r--r--telepathy-glib/debug-client.c4
-rw-r--r--telepathy-glib/errors.c7
-rw-r--r--telepathy-glib/file-transfer-channel.c12
-rw-r--r--telepathy-glib/gnio-util.c12
-rw-r--r--telepathy-glib/group-mixin.c16
-rw-r--r--telepathy-glib/handle-channels-context.c2
-rw-r--r--telepathy-glib/handle-repo-dynamic.c4
-rw-r--r--telepathy-glib/handle-repo-static.c4
-rw-r--r--telepathy-glib/media-interfaces.c4
-rw-r--r--telepathy-glib/message-mixin.c16
-rw-r--r--telepathy-glib/observe-channels-context.c2
-rw-r--r--telepathy-glib/presence-mixin.c14
-rw-r--r--telepathy-glib/properties-mixin.c12
-rw-r--r--telepathy-glib/protocol.c2
-rw-r--r--telepathy-glib/stream-tube-channel.c2
-rw-r--r--telepathy-glib/text-channel.c6
-rw-r--r--telepathy-glib/text-mixin.c2
-rw-r--r--telepathy-glib/util.c4
-rw-r--r--tests/dbus/account-channel-request.c30
-rw-r--r--tests/dbus/account-manager.c2
-rw-r--r--tests/dbus/base-client.c4
-rw-r--r--tests/dbus/call-cancellation.c2
-rw-r--r--tests/dbus/call-channel.c4
-rw-r--r--tests/dbus/channel-dispatch-operation.c4
-rw-r--r--tests/dbus/channel-introspect.c4
-rw-r--r--tests/dbus/channel-request.c2
-rw-r--r--tests/dbus/channel.c2
-rw-r--r--tests/dbus/cli-group.c6
-rw-r--r--tests/dbus/connection-aliasing.c2
-rw-r--r--tests/dbus/connection-balance.c2
-rw-r--r--tests/dbus/connection-bug-18845.c2
-rw-r--r--tests/dbus/connection-error.c2
-rw-r--r--tests/dbus/connection-getinterfaces-failure.c2
-rw-r--r--tests/dbus/connection-interests.c2
-rw-r--r--tests/dbus/connection.c8
-rw-r--r--tests/dbus/contact-lists.c12
-rw-r--r--tests/dbus/disconnection.c2
-rw-r--r--tests/dbus/error-enum.c2
-rw-r--r--tests/dbus/example-no-protocols.c2
-rw-r--r--tests/dbus/finalized-in-invalidated-handler.c2
-rw-r--r--tests/dbus/get-interface-after-invalidate.c2
-rw-r--r--tests/dbus/message-mixin.c2
-rw-r--r--tests/dbus/room-list.c2
-rw-r--r--tests/dbus/self-presence.c4
-rw-r--r--tests/dbus/simple-approver.c4
-rw-r--r--tests/dbus/simple-handler.c4
-rw-r--r--tests/dbus/simple-observer.c4
-rw-r--r--tests/dbus/stream-tube.c4
-rw-r--r--tests/dbus/text-mixin.c2
-rw-r--r--tests/dbus/unsupported-interface.c2
-rw-r--r--tests/lib/echo-conn.c2
-rw-r--r--tests/lib/echo-im-manager.c2
-rw-r--r--tests/lib/file-transfer-chan.c16
-rw-r--r--tests/lib/my-conn-proxy.c4
-rw-r--r--tests/lib/params-cm.c4
-rw-r--r--tests/lib/room-list-chan.c4
-rw-r--r--tests/lib/simple-channel-dispatch-operation.c2
-rw-r--r--tests/lib/simple-channel-dispatcher.c2
-rw-r--r--tests/lib/simple-channel-request.c2
-rw-r--r--tests/lib/simple-client.c2
-rw-r--r--tests/lib/simple-conn.c4
-rw-r--r--tests/lib/stream-tube-chan.c8
113 files changed, 370 insertions, 371 deletions
diff --git a/examples/client/dbus-tubes/accepter.c b/examples/client/dbus-tubes/accepter.c
index 638c536d7..e9c3835b1 100644
--- a/examples/client/dbus-tubes/accepter.c
+++ b/examples/client/dbus-tubes/accepter.c
@@ -141,7 +141,7 @@ handle_channels (TpSimpleHandler *handler,
{
TpDBusTubeChannel *tube;
GList *l;
- GError error = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError error = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"No channel to be handled" };
g_debug ("Handling channels");
diff --git a/examples/client/stream-tubes/accepter.c b/examples/client/stream-tubes/accepter.c
index 41d7652bc..79e8eff80 100644
--- a/examples/client/stream-tubes/accepter.c
+++ b/examples/client/stream-tubes/accepter.c
@@ -127,7 +127,7 @@ _handle_channels (TpSimpleHandler *handler,
g_debug ("Rejecting channels");
- error = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"No channels to be handled");
tp_handle_channels_context_fail (context, error);
diff --git a/examples/cm/call/call-channel.c b/examples/cm/call/call-channel.c
index 1e67bc10b..0d4a4464d 100644
--- a/examples/cm/call/call-channel.c
+++ b/examples/cm/call/call-channel.c
@@ -482,7 +482,7 @@ example_call_channel_add_content (ExampleCallChannel *self,
contents = tp_base_call_channel_get_contents (base);
if (g_list_length (contents) > MAX_CONTENTS_PER_CALL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_PERMISSION_DENIED,
+ g_set_error (error, TP_ERROR, TP_ERROR_PERMISSION_DENIED,
"What are you doing with all those contents anyway?!");
return NULL;
}
@@ -785,7 +785,7 @@ hold_request_hold (TpSvcChannelInterfaceHold *iface,
if (!hold && strstr (peer, "(no unhold)") != NULL)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"unable to unhold");
goto error;
}
diff --git a/examples/cm/call/call-manager.c b/examples/cm/call/call-manager.c
index 8f1ac61be..64c7992df 100644
--- a/examples/cm/call/call-manager.c
+++ b/examples/cm/call/call-manager.c
@@ -439,7 +439,7 @@ example_call_manager_request (ExampleCallManager *self,
if (!initial_audio && !initial_video)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Call channels must initially have either audio or video content");
goto error;
}
@@ -460,7 +460,7 @@ example_call_manager_request (ExampleCallManager *self,
* from the other. For simplicity, this example simulates a protocol
* where this is not the case.
*/
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"In this protocol, you can't call yourself");
goto error;
}
diff --git a/examples/cm/call/protocol.c b/examples/cm/call/protocol.c
index 26540ddcc..4233fdefc 100644
--- a/examples/cm/call/protocol.c
+++ b/examples/cm/call/protocol.c
@@ -36,7 +36,7 @@ example_call_protocol_check_contact_id (const gchar *id,
if (id[0] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"ID must not be empty");
return FALSE;
}
@@ -129,7 +129,7 @@ identify_account (TpBaseProtocol *self G_GNUC_UNUSED,
if (account != NULL)
return normalize_contact (self, account, error);
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"'account' parameter not given");
return NULL;
}
diff --git a/examples/cm/channelspecific/conn.c b/examples/cm/channelspecific/conn.c
index 603ca0204..69da8179c 100644
--- a/examples/cm/channelspecific/conn.c
+++ b/examples/cm/channelspecific/conn.c
@@ -137,20 +137,20 @@ example_csh_normalize_room (TpHandleRepoIface *repo,
if (id[0] != '#')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"Chatroom names in this protocol start with #");
}
if (id[1] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"Chatroom name cannot be empty");
return NULL;
}
if (strchr (id, '@') != NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"Chatroom names in this protocol cannot contain '@'");
return NULL;
}
diff --git a/examples/cm/channelspecific/protocol.c b/examples/cm/channelspecific/protocol.c
index 67bfda92d..112f7cef0 100644
--- a/examples/cm/channelspecific/protocol.c
+++ b/examples/cm/channelspecific/protocol.c
@@ -46,7 +46,7 @@ example_csh_protocol_check_contact_id (const gchar *id,
if (id[0] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"ID must not be empty");
return FALSE;
}
@@ -55,28 +55,28 @@ example_csh_protocol_check_contact_id (const gchar *id,
if (at == NULL || at == id || at[1] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"ID must look like aaa@bbb");
return FALSE;
}
if (strchr (at + 1, '@') != NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"ID cannot contain more than one '@'");
return FALSE;
}
if (at[1] == '#' && at[2] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"chatroom name cannot be empty");
return FALSE;
}
if (strchr (at + 2, '#') != NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"realm/chatroom cannot contain '#' except at the beginning");
return FALSE;
}
@@ -169,7 +169,7 @@ identify_account (TpBaseProtocol *self G_GNUC_UNUSED,
if (account != NULL)
return normalize_contact (self, account, error);
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"'account' parameter not given");
return NULL;
}
diff --git a/examples/cm/channelspecific/room-manager.c b/examples/cm/channelspecific/room-manager.c
index fdff18d6c..5aa164419 100644
--- a/examples/cm/channelspecific/room-manager.c
+++ b/examples/cm/channelspecific/room-manager.c
@@ -328,7 +328,7 @@ example_csh_room_manager_request (ExampleCSHRoomManager *self,
}
else if (require_new)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"A Text channel for room #%u already exists", handle);
goto error;
}
diff --git a/examples/cm/channelspecific/room.c b/examples/cm/channelspecific/room.c
index 6e78d116f..4d3f715e1 100644
--- a/examples/cm/channelspecific/room.c
+++ b/examples/cm/channelspecific/room.c
@@ -375,7 +375,7 @@ remove_member_with_reason (GObject *object,
{
/* TODO: also simulate some channels where the user is an operator and
* can kick people */
- g_set_error (error, TP_ERRORS, TP_ERROR_PERMISSION_DENIED,
+ g_set_error (error, TP_ERROR, TP_ERROR_PERMISSION_DENIED,
"You can't eject other users from this channel");
return FALSE;
}
diff --git a/examples/cm/contactlist/protocol.c b/examples/cm/contactlist/protocol.c
index 555a8dfd0..fcc05ebed 100644
--- a/examples/cm/contactlist/protocol.c
+++ b/examples/cm/contactlist/protocol.c
@@ -36,7 +36,7 @@ example_contact_list_protocol_check_contact_id (const gchar *id,
if (id[0] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"ID must not be empty");
return FALSE;
}
@@ -129,7 +129,7 @@ identify_account (TpBaseProtocol *self G_GNUC_UNUSED,
if (account != NULL)
return normalize_contact (self, account, error);
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"'account' parameter not given");
return NULL;
}
diff --git a/examples/cm/echo-message-parts/im-manager.c b/examples/cm/echo-message-parts/im-manager.c
index a16268528..6451fb8f8 100644
--- a/examples/cm/echo-message-parts/im-manager.c
+++ b/examples/cm/echo-message-parts/im-manager.c
@@ -324,7 +324,7 @@ example_echo_2_im_manager_request (ExampleEcho2ImManager *self,
}
else if (require_new)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"An echo2 channel to contact #%u already exists", handle);
goto error;
}
diff --git a/examples/cm/echo-message-parts/protocol.c b/examples/cm/echo-message-parts/protocol.c
index 11a22269c..7981fedaa 100644
--- a/examples/cm/echo-message-parts/protocol.c
+++ b/examples/cm/echo-message-parts/protocol.c
@@ -77,7 +77,7 @@ new_connection (TpBaseProtocol *protocol,
if (account == NULL || account[0] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The 'account' parameter is required");
return NULL;
}
@@ -96,7 +96,7 @@ example_echo_2_protocol_normalize_contact (const gchar *id, GError **error)
{
if (id[0] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"ID must not be empty");
return NULL;
}
@@ -122,7 +122,7 @@ identify_account (TpBaseProtocol *self G_GNUC_UNUSED,
if (account != NULL)
return g_strdup (account);
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"'account' parameter not given");
return NULL;
}
diff --git a/examples/cm/extended/protocol.c b/examples/cm/extended/protocol.c
index 7da407efe..0a85a504c 100644
--- a/examples/cm/extended/protocol.c
+++ b/examples/cm/extended/protocol.c
@@ -55,7 +55,7 @@ new_connection (TpBaseProtocol *protocol,
if (account == NULL || account[0] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The 'account' parameter is required");
return NULL;
}
@@ -75,7 +75,7 @@ example_extended_protocol_normalize_contact (const gchar *id,
{
if (id[0] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"ID must not be empty");
return NULL;
}
@@ -101,7 +101,7 @@ identify_account (TpBaseProtocol *self G_GNUC_UNUSED,
if (account != NULL)
return example_extended_protocol_normalize_contact (account, error);
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"'account' parameter not given");
return NULL;
}
diff --git a/telepathy-glib/account-channel-request.c b/telepathy-glib/account-channel-request.c
index f3beac4e9..75b78f76d 100644
--- a/telepathy-glib/account-channel-request.c
+++ b/telepathy-glib/account-channel-request.c
@@ -600,7 +600,7 @@ handle_channels (TpSimpleHandler *handler,
if (G_UNLIKELY (g_list_length (channels) != 1))
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"We are supposed to handle only one channel" };
tp_handle_channels_context_fail (context, &error);
@@ -710,7 +710,7 @@ acr_channel_request_succeeded_with_channel (TpChannelRequest *chan_req,
/* ChannelRequest succeeded */
if (self->priv->action_type == ACTION_TYPE_HANDLE)
{
- GError err = { TP_ERRORS, TP_ERROR_NOT_YOURS,
+ GError err = { TP_ERROR, TP_ERROR_NOT_YOURS,
"Another Handler is handling this channel" };
if (self->priv->result == NULL)
@@ -727,7 +727,7 @@ acr_channel_request_succeeded_with_channel (TpChannelRequest *chan_req,
if (self->priv->channel == NULL)
{
- GError err = { TP_ERRORS, TP_ERROR_CONFUSED,
+ GError err = { TP_ERROR, TP_ERROR_CONFUSED,
"Channel has been created but MC didn't give it back to us" };
DEBUG ("%s", err.message);
diff --git a/telepathy-glib/account-manager.c b/telepathy-glib/account-manager.c
index 05e860026..0e78bbc2b 100644
--- a/telepathy-glib/account-manager.c
+++ b/telepathy-glib/account-manager.c
@@ -729,7 +729,7 @@ tp_account_manager_init_known_interfaces (void)
tp_proxy_or_subclass_hook_on_interface_add (tp_type,
tp_cli_account_manager_add_signals);
tp_proxy_subclass_add_error_mapping (tp_type,
- TP_ERROR_PREFIX, TP_ERRORS, TP_TYPE_ERROR);
+ TP_ERROR_PREFIX, TP_ERROR, TP_TYPE_ERROR);
g_once_init_leave (&once, 1);
}
diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c
index 29768a795..4664e4c8d 100644
--- a/telepathy-glib/account.c
+++ b/telepathy-glib/account.c
@@ -2040,7 +2040,7 @@ tp_account_init_known_interfaces (void)
tp_proxy_or_subclass_hook_on_interface_add (tp_type,
tp_cli_account_add_signals);
tp_proxy_subclass_add_error_mapping (tp_type,
- TP_ERROR_PREFIX, TP_ERRORS, TP_TYPE_ERROR);
+ TP_ERROR_PREFIX, TP_ERROR, TP_TYPE_ERROR);
g_once_init_leave (&once, 1);
}
@@ -3571,7 +3571,7 @@ tp_account_parse_object_path (const gchar *object_path,
if (!g_str_has_prefix (object_path, TP_ACCOUNT_OBJECT_PATH_BASE))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Account path does not start with the right prefix: %s",
object_path);
return FALSE;
@@ -3583,7 +3583,7 @@ tp_account_parse_object_path (const gchar *object_path,
if (g_strv_length (segments) != 3)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Account path '%s' is malformed: should have 3 trailing components, "
"not %u", object_path, g_strv_length (segments));
goto free_segments_and_fail;
@@ -3591,7 +3591,7 @@ tp_account_parse_object_path (const gchar *object_path,
if (!g_ascii_isalpha (segments[0][0]))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Account path '%s' is malformed: CM name should start with a letter",
object_path);
goto free_segments_and_fail;
@@ -3599,7 +3599,7 @@ tp_account_parse_object_path (const gchar *object_path,
if (!g_ascii_isalpha (segments[1][0]))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Account path '%s' is malformed: "
"protocol name should start with a letter",
object_path);
@@ -3608,7 +3608,7 @@ tp_account_parse_object_path (const gchar *object_path,
if (!g_ascii_isalpha (segments[2][0]) && segments[2][0] != '_')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Account path '%s' is malformed: "
"account ID should start with a letter or underscore",
object_path);
diff --git a/telepathy-glib/add-dispatch-operation-context.c b/telepathy-glib/add-dispatch-operation-context.c
index 5342c83c9..c1294a483 100644
--- a/telepathy-glib/add-dispatch-operation-context.c
+++ b/telepathy-glib/add-dispatch-operation-context.c
@@ -106,7 +106,7 @@ tp_add_dispatch_operation_context_dispose (GObject *object)
if (self->priv->state == TP_ADD_DISPATCH_OPERATION_CONTEXT_STATE_NONE ||
self->priv->state == TP_ADD_DISPATCH_OPERATION_CONTEXT_STATE_DELAYED)
{
- GError error = { TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ GError error = { TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Disposing the TpAddDispatchOperationContext" };
WARNING ("Disposing a context in the %s state",
diff --git a/telepathy-glib/base-call-channel.c b/telepathy-glib/base-call-channel.c
index 664393fd8..067c22f7f 100644
--- a/telepathy-glib/base-call-channel.c
+++ b/telepathy-glib/base-call-channel.c
@@ -1268,13 +1268,13 @@ tp_base_call_channel_set_ringing (TpSvcChannelTypeCall *iface,
if (tp_base_channel_is_requested (tp_base))
{
- GError e = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError e = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Call was requested. Ringing doesn't make sense." };
dbus_g_method_return_error (context, &e);
}
else if (self->priv->state != TP_CALL_STATE_INITIALISED)
{
- GError e = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Call is not in the right state for Ringing." };
dbus_g_method_return_error (context, &e);
}
@@ -1309,14 +1309,14 @@ tp_base_call_channel_set_queued (TpSvcChannelTypeCall *iface,
if (tp_base_channel_is_requested (tp_base))
{
- GError e = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError e = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Call was requested. Queued doesn't make sense." };
dbus_g_method_return_error (context, &e);
}
else if (self->priv->state != TP_CALL_STATE_INITIALISING &&
self->priv->state != TP_CALL_STATE_INITIALISED)
{
- GError e = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Call is not in the right state for Queuing." };
dbus_g_method_return_error (context, &e);
}
@@ -1364,7 +1364,7 @@ tp_base_call_channel_accept (TpSvcChannelTypeCall *iface,
}
else
{
- GError e = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Invalid state for Accept" };
dbus_g_method_return_error (context, &e);
return;
@@ -1382,7 +1382,7 @@ tp_base_call_channel_accept (TpSvcChannelTypeCall *iface,
}
else
{
- GError e = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Invalid state for Accept" };
dbus_g_method_return_error (context, &e);
return;
@@ -1415,7 +1415,7 @@ tp_base_call_channel_hangup (TpSvcChannelTypeCall *iface,
if (self->priv->state == TP_CALL_STATE_ENDED)
{
- GError e = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"This call has already ended" };
dbus_g_method_return_error (context, &e);
return;
@@ -1445,28 +1445,28 @@ tp_base_call_channel_add_content_dbus (TpSvcChannelTypeCall *iface,
if (self->priv->state == TP_CALL_STATE_ENDED)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"No contents can be added. The call has already ended.");
goto error;
}
if (mtype >= TP_NUM_MEDIA_STREAM_TYPES)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Unknown content type");
goto error;
}
if (initial_direction >= TP_NUM_MEDIA_STREAM_DIRECTIONS)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Invalid initial direction");
goto error;
}
if (!self->priv->mutable_contents || klass->add_content == NULL)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_CAPABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_CAPABLE,
"Contents are not mutable");
goto error;
}
diff --git a/telepathy-glib/base-call-content.c b/telepathy-glib/base-call-content.c
index 4bb32ef8a..2f572c5f7 100644
--- a/telepathy-glib/base-call-content.c
+++ b/telepathy-glib/base-call-content.c
@@ -762,7 +762,7 @@ tp_call_content_remove (TpSvcCallContent *content,
if (!tp_base_call_channel_has_mutable_contents (self->priv->channel))
{
- GError error = { TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ GError error = { TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Contents are not mutable" };
dbus_g_method_return_error (context, &error);
return;
diff --git a/telepathy-glib/base-call-stream.c b/telepathy-glib/base-call-stream.c
index 7aee93d95..f4d72dbdf 100644
--- a/telepathy-glib/base-call-stream.c
+++ b/telepathy-glib/base-call-stream.c
@@ -777,7 +777,7 @@ tp_base_call_stream_request_receiving (TpSvcCallStream *iface,
g_object_get (self, "can-request-receiving", &can_request_receiving, NULL);
if (!can_request_receiving)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_CAPABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_CAPABLE,
"The contact does not support requesting to receive");
goto error;
}
@@ -785,14 +785,14 @@ tp_base_call_stream_request_receiving (TpSvcCallStream *iface,
if (!g_hash_table_lookup_extended (self->priv->remote_members,
GUINT_TO_POINTER (contact), NULL, (gpointer *) &remote_sending_state))
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Contact %u is not member of this stream", contact);
goto error;
}
if (klass->request_receiving == NULL)
{
- g_set_error_literal (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error_literal (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"This CM does not implement request_receiving");
goto error;
}
@@ -907,7 +907,7 @@ _tp_base_call_stream_set_sending (TpBaseCallStream *self,
if (klass->set_sending == NULL)
{
- g_set_error_literal (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error_literal (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"This CM does not implement SetSending");
return FALSE;
}
diff --git a/telepathy-glib/base-client.c b/telepathy-glib/base-client.c
index e58b38008..0704e2e20 100644
--- a/telepathy-glib/base-client.c
+++ b/telepathy-glib/base-client.c
@@ -1585,7 +1585,7 @@ context_prepare_cb (GObject *source,
if (_tp_observe_channels_context_get_state (ctx) ==
TP_OBSERVE_CHANNELS_CONTEXT_STATE_NONE)
{
- error = g_error_new (TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ error = g_error_new (TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Implementation of ObserveChannels in %s didn't call "
"tp_observe_channels_context_{accept,fail,delay}",
G_OBJECT_TYPE_NAME (self));
@@ -1718,7 +1718,7 @@ _tp_base_client_observe_channels (TpSvcClientObserver *iface,
if (channels_arr->len == 0)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Channels should contain at least one channel");
DEBUG ("%s", error->message);
goto out;
@@ -1732,7 +1732,7 @@ _tp_base_client_observe_channels (TpSvcClientObserver *iface,
connection = tp_account_ensure_connection (account, connection_path);
if (connection == NULL)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Connection %s doesn't seem to exist. (Maybe the CM doesn't own "
"the corresponding bus name?)", connection_path);
DEBUG ("Failed to create TpConnection: %s", error->message);
@@ -1873,7 +1873,7 @@ add_dispatch_context_prepare_cb (GObject *source,
if (_tp_add_dispatch_operation_context_get_state (ctx) ==
TP_ADD_DISPATCH_OPERATION_CONTEXT_STATE_NONE)
{
- error = g_error_new (TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ error = g_error_new (TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Implementation of AddDispatchOperation in %s didn't call "
"tp_add_dispatch_operation_context_{accept,fail,delay}",
G_OBJECT_TYPE_NAME (self));
@@ -1928,7 +1928,7 @@ _tp_base_client_add_dispatch_operation (TpSvcClientApprover *iface,
TP_PROP_CHANNEL_DISPATCH_OPERATION_ACCOUNT);
if (path == NULL)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Properties doesn't contain 'Account'");
DEBUG ("%s", error->message);
goto out;
@@ -1943,7 +1943,7 @@ _tp_base_client_add_dispatch_operation (TpSvcClientApprover *iface,
TP_PROP_CHANNEL_DISPATCH_OPERATION_CONNECTION);
if (path == NULL)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Properties doesn't contain 'Connection'");
DEBUG ("%s", error->message);
goto out;
@@ -1958,7 +1958,7 @@ _tp_base_client_add_dispatch_operation (TpSvcClientApprover *iface,
if (channels_arr->len == 0)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Channels should contain at least one channel");
DEBUG ("%s", error->message);
goto out;
@@ -2230,7 +2230,7 @@ handle_channels_context_prepare_cb (GObject *source,
if (_tp_handle_channels_context_get_state (ctx) ==
TP_HANDLE_CHANNELS_CONTEXT_STATE_NONE)
{
- error = g_error_new (TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ error = g_error_new (TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Implementation of HandledChannels in %s didn't call "
"tp_handle_channels_context_{accept,fail,delay}",
G_OBJECT_TYPE_NAME (self));
@@ -2301,7 +2301,7 @@ _tp_base_client_handle_channels (TpSvcClientHandler *iface,
if (channels_arr->len == 0)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Channels should contain at least one channel");
DEBUG ("%s", error->message);
goto out;
@@ -2480,7 +2480,7 @@ _tp_base_client_add_request (TpSvcClientInterfaceRequests *iface,
path = tp_asv_get_object_path (properties, TP_PROP_CHANNEL_REQUEST_ACCOUNT);
if (path == NULL)
{
- error = g_error_new_literal (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ error = g_error_new_literal (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Mandatory 'Account' property is missing");
DEBUG ("%s", error->message);
@@ -2528,7 +2528,7 @@ _tp_base_client_remove_request (TpSvcClientInterfaceRequests *iface,
request = find_request_by_path (self, path);
if (request == NULL)
{
- GError err = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError err = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Uknown ChannelRequest" };
dbus_g_method_return_error (context, &err);
diff --git a/telepathy-glib/base-connection-manager.c b/telepathy-glib/base-connection-manager.c
index 4f60972e1..241f5117b 100644
--- a/telepathy-glib/base-connection-manager.c
+++ b/telepathy-glib/base-connection-manager.c
@@ -124,7 +124,7 @@ _tp_legacy_protocol_new_connection (TpBaseProtocol *protocol,
if (self->cm == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Connection manager no longer available");
return NULL;
}
@@ -605,7 +605,7 @@ tp_base_connection_manager_get_protocol (TpBaseConnectionManager *self,
if (protocol != NULL)
return protocol;
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"unknown protocol %s", protocol_name);
return NULL;
@@ -808,7 +808,7 @@ set_param_from_value (const TpCMParamSpec *paramspec,
DEBUG ("expected type %s for parameter %s, got %s",
g_type_name (paramspec->gtype), paramspec->name,
G_VALUE_TYPE_NAME (value));
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"expected type %s for account parameter %s, got %s",
g_type_name (paramspec->gtype), paramspec->name,
G_VALUE_TYPE_NAME (value));
diff --git a/telepathy-glib/base-connection.c b/telepathy-glib/base-connection.c
index 25ce68c79..0fc3d9fb8 100644
--- a/telepathy-glib/base-connection.c
+++ b/telepathy-glib/base-connection.c
@@ -358,7 +358,7 @@ static void
channel_request_cancel (gpointer data, gpointer user_data)
{
ChannelRequest *request = (ChannelRequest *) data;
- GError error = { TP_ERRORS, TP_ERROR_DISCONNECTED,
+ GError error = { TP_ERROR, TP_ERROR_DISCONNECTED,
"unable to service this channel request, we're disconnecting!" };
DEBUG ("cancelling request at %p for %s/%u/%u", request,
@@ -1883,7 +1883,7 @@ tp_base_connection_close_all_channels (TpBaseConnection *self)
static inline TpConnectionStatusReason
conn_status_reason_from_g_error (GError *error)
{
- if (error->domain == TP_ERRORS)
+ if (error->domain == TP_ERROR)
{
switch (error->code)
{
@@ -1927,7 +1927,7 @@ conn_status_reason_from_g_error (GError *error)
case TP_ERROR_SERVICE_BUSY:
return TP_CONNECTION_STATUS_REASON_NETWORK_ERROR;
- /* current status: all TP_ERRORS up to and including
+ /* current status: all TP_ERRORs up to and including
* TP_ERROR_RESOURCE_UNAVAILABLE have been looked at */
}
}
@@ -2338,7 +2338,7 @@ tp_base_connection_request_channel (TpSvcConnection *iface,
{
if (handle != 0)
{
- GError e = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError e = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"When handle type is NONE, handle must be 0" };
dbus_g_method_return_error (context, &e);
@@ -2352,7 +2352,7 @@ tp_base_connection_request_channel (TpSvcConnection *iface,
if (handle_repo == NULL)
{
- GError e = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Handle type not supported by this connection manager" };
dbus_g_method_return_error (context, &e);
@@ -2458,7 +2458,7 @@ tp_base_connection_request_channel (TpSvcConnection *iface,
case TP_CHANNEL_FACTORY_REQUEST_STATUS_INVALID_HANDLE:
DEBUG ("invalid handle %u", handle);
- error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ error = g_error_new (TP_ERROR, TP_ERROR_INVALID_HANDLE,
"invalid handle %u", handle);
break;
@@ -2467,7 +2467,7 @@ tp_base_connection_request_channel (TpSvcConnection *iface,
DEBUG ("requested channel is unavailable with "
"handle type %u", handle_type);
- error = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"requested channel is not available with "
"handle type %u", handle_type);
@@ -2476,7 +2476,7 @@ tp_base_connection_request_channel (TpSvcConnection *iface,
case TP_CHANNEL_FACTORY_REQUEST_STATUS_NOT_IMPLEMENTED:
DEBUG ("unsupported channel type %s", type);
- error = g_error_new (TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ error = g_error_new (TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"unsupported channel type %s", type);
break;
@@ -2568,7 +2568,7 @@ tp_base_connection_dbus_request_handles (TpSvcConnection *iface,
{
DEBUG ("unimplemented handle type %u", handle_type);
- error = g_error_new (TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ error = g_error_new (TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"unimplemented handle type %u", handle_type);
goto out;
}
@@ -3432,7 +3432,7 @@ static void conn_requests_offer_request (TpBaseConnection *self,
#define RETURN_INVALID_ARGUMENT(message) \
G_STMT_START { \
- GError e = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, message }; \
+ GError e = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT, message }; \
dbus_g_method_return_error (context, &e); \
return; \
} G_STMT_END
@@ -3571,7 +3571,7 @@ conn_requests_requestotron_validate_handle (TpBaseConnection *self,
if (handles == NULL)
{
- GError e = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Handle type not supported by this connection manager" };
dbus_g_method_return_error (context, &e);
@@ -3588,7 +3588,7 @@ conn_requests_requestotron_validate_handle (TpBaseConnection *self,
/* tp_handle_ensure can return any error in any domain; force
* the domain and code to be as documented for CreateChannel.
*/
- error->domain = TP_ERRORS;
+ error->domain = TP_ERROR;
error->code = TP_ERROR_INVALID_HANDLE;
dbus_g_method_return_error (context, error);
g_error_free (error);
@@ -3611,7 +3611,7 @@ conn_requests_requestotron_validate_handle (TpBaseConnection *self,
/* Check the supplied TargetHandle is valid */
if (!tp_handle_is_valid (handles, target_handle, &error))
{
- error->domain = TP_ERRORS;
+ error->domain = TP_ERROR;
error->code = TP_ERROR_INVALID_HANDLE;
dbus_g_method_return_error (context, error);
g_error_free (error);
diff --git a/telepathy-glib/base-connection.h b/telepathy-glib/base-connection.h
index 913f08ea4..903a6cac4 100644
--- a/telepathy-glib/base-connection.h
+++ b/telepathy-glib/base-connection.h
@@ -196,7 +196,7 @@ gboolean tp_base_connection_channel_manager_iter_next (
\
if (c->status != TP_CONNECTION_STATUS_CONNECTED) \
{ \
- GError e = { TP_ERRORS, TP_ERROR_DISCONNECTED, \
+ GError e = { TP_ERROR, TP_ERROR_DISCONNECTED, \
(gchar *) "Connection is disconnected" }; \
\
dbus_g_method_return_error ((context), &e); \
diff --git a/telepathy-glib/base-contact-list.c b/telepathy-glib/base-contact-list.c
index ecbe09b1d..e56e6c4c4 100644
--- a/telepathy-glib/base-contact-list.c
+++ b/telepathy-glib/base-contact-list.c
@@ -591,11 +591,11 @@ tp_base_contact_list_fail_blocked_contact_requests (
static void
tp_base_contact_list_free_contents (TpBaseContactList *self)
{
- GError error = { TP_ERRORS, TP_ERROR_DISCONNECTED,
+ GError error = { TP_ERROR, TP_ERROR_DISCONNECTED,
"Disconnected before blocked contacts were retrieved" };
guint i;
- tp_base_contact_list_fail_channel_requests (self, TP_ERRORS,
+ tp_base_contact_list_fail_channel_requests (self, TP_ERROR,
TP_ERROR_DISCONNECTED,
"Unable to complete channel request due to disconnection");
tp_base_contact_list_fail_blocked_contact_requests (self, &error);
@@ -720,7 +720,7 @@ tp_base_contact_list_repo_normalize_group (TpHandleRepoIface *repo,
ret = tp_base_contact_list_normalize_group (self, id);
if (ret == NULL)
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"Invalid group name '%s'", id);
return ret;
@@ -883,7 +883,7 @@ tp_base_contact_list_download_async_default (TpBaseContactList *self,
gpointer user_data)
{
g_simple_async_report_error_in_idle (G_OBJECT (self), callback,
- user_data, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ user_data, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"This CM does not implement Download");
}
@@ -1173,7 +1173,7 @@ tp_base_contact_list_create_group_cb (GObject *source,
if (tokens == NULL)
return;
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"%s did not create a group even though it claims to have done so",
G_OBJECT_TYPE_NAME (self));
}
@@ -1234,7 +1234,7 @@ tp_base_contact_list_request_helper (TpChannelManager *manager,
if (handle == TP_LIST_HANDLE_STORED &&
!tp_base_contact_list_get_contact_list_persists (self))
{
- g_set_error_literal (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error_literal (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Subscriptions do not persist, so this connection lacks the "
"'stored' channel");
goto error;
@@ -1243,7 +1243,7 @@ tp_base_contact_list_request_helper (TpChannelManager *manager,
if (handle == TP_LIST_HANDLE_DENY &&
!tp_base_contact_list_can_block (self))
{
- g_set_error_literal (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error_literal (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"This connection cannot put people on the 'deny' list");
goto error;
}
@@ -1288,7 +1288,7 @@ tp_base_contact_list_request_helper (TpChannelManager *manager,
}
else
{
- g_set_error_literal (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error_literal (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"This connection cannot create new groups");
goto error;
}
@@ -1296,7 +1296,7 @@ tp_base_contact_list_request_helper (TpChannelManager *manager,
}
else if (is_create)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"A ContactList channel for type #%u, handle #%u already exists",
handle_type, handle);
goto error;
@@ -1446,7 +1446,7 @@ _tp_base_contact_list_add_to_group (TpBaseContactList *self,
if (!TP_IS_MUTABLE_CONTACT_GROUP_LIST (self))
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Cannot add contacts to a group");
goto error;
}
@@ -1508,7 +1508,7 @@ _tp_base_contact_list_remove_from_group (TpBaseContactList *self,
if (!TP_IS_MUTABLE_CONTACT_GROUP_LIST (self))
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Cannot remove contacts from a group");
goto error;
}
@@ -1562,13 +1562,13 @@ _tp_base_contact_list_delete_group_by_handle (TpBaseContactList *self,
if (tp_base_contact_list_get_state (self, error) !=
TP_CONTACT_LIST_STATE_SUCCESS)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_DISCONNECTED, "Disconnected");
+ g_set_error (error, TP_ERROR, TP_ERROR_DISCONNECTED, "Disconnected");
return FALSE;
}
if (!TP_IS_MUTABLE_CONTACT_GROUP_LIST (self))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Cannot remove a group");
return FALSE;
}
@@ -1673,7 +1673,7 @@ _tp_base_contact_list_add_to_list (TpBaseContactList *self,
if (!tp_base_contact_list_can_change_contact_list (self))
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Cannot change subscriptions");
goto error;
}
@@ -1775,7 +1775,7 @@ _tp_base_contact_list_remove_from_list (TpBaseContactList *self,
if (!tp_base_contact_list_can_change_contact_list (self))
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Cannot change subscriptions");
goto error;
}
@@ -5084,7 +5084,7 @@ tp_base_contact_list_check_list_change (TpBaseContactList *self,
if (!tp_base_contact_list_can_change_contact_list (self))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Cannot change subscriptions");
return FALSE;
}
@@ -5103,7 +5103,7 @@ tp_base_contact_list_check_group_change (TpBaseContactList *self,
if (tp_base_contact_list_get_group_storage (self) ==
TP_CONTACT_METADATA_STORAGE_TYPE_NONE)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Cannot change group memberships");
return FALSE;
}
@@ -5840,7 +5840,7 @@ tp_base_contact_list_mixin_rename_group (
if (old_handle == 0 || old_channel == NULL)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_DOES_NOT_EXIST,
+ g_set_error (&error, TP_ERROR, TP_ERROR_DOES_NOT_EXIST,
"Group '%s' does not exist", before);
goto sync_exit;
}
@@ -5853,7 +5853,7 @@ tp_base_contact_list_mixin_rename_group (
if (g_hash_table_lookup (self->priv->groups, GUINT_TO_POINTER (new_handle))
!= NULL)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Group '%s' already exists",
tp_handle_inspect (self->priv->group_repo, new_handle));
goto sync_exit;
@@ -6026,7 +6026,7 @@ tp_base_contact_list_mixin_groups_iface_init (
#define ERROR_IF_BLOCKING_NOT_SUPPORTED(self, context) \
if (!self->priv->svc_contact_blocking) \
{ \
- GError e = { TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED, \
+ GError e = { TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, \
"ContactBlocking is not supported on this connection" }; \
dbus_g_method_return_error (context, &e); \
return; \
@@ -6068,7 +6068,7 @@ tp_base_contact_list_mixin_request_blocked_contacts (
default:
{
- GError broken = { TP_ERRORS, TP_ERROR_CONFUSED,
+ GError broken = { TP_ERROR, TP_ERROR_CONFUSED,
"My internal list of blocked contacts is inconsistent! "
"I apologise for any inconvenience caused." };
dbus_g_method_return_error (context, &broken);
@@ -6360,7 +6360,7 @@ tp_base_contact_list_get_state (TpBaseContactList *self,
TP_CONTACT_LIST_STATE_FAILURE);
if (self->priv->state != TP_CONTACT_LIST_STATE_SUCCESS)
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_YET,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_YET,
"Contact list not downloaded yet");
return self->priv->state;
@@ -6386,7 +6386,7 @@ tp_base_contact_list_get_connection (TpBaseContactList *self,
if (self->priv->conn == NULL)
{
- g_set_error_literal (error, TP_ERRORS, TP_ERROR_DISCONNECTED,
+ g_set_error_literal (error, TP_ERROR, TP_ERROR_DISCONNECTED,
"Connection is no longer connected");
return NULL;
}
diff --git a/telepathy-glib/base-media-call-content.c b/telepathy-glib/base-media-call-content.c
index 36f6fb517..a0032f4b1 100644
--- a/telepathy-glib/base-media-call-content.c
+++ b/telepathy-glib/base-media-call-content.c
@@ -685,7 +685,7 @@ tp_base_media_call_content_update_local_media_description (
if (self->priv->current_offer != NULL)
{
- GError error = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError error = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"There is a media description offer around so "
"UpdateMediaDescription shouldn't be called." };
dbus_g_method_return_error (context, &error);
@@ -696,7 +696,7 @@ tp_base_media_call_content_update_local_media_description (
TP_PROP_CALL_CONTENT_MEDIA_DESCRIPTION_REMOTE_CONTACT,
NULL, &contact))
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The media description is missing the RemoteContact key." };
dbus_g_method_return_error (context, &error);
return;
@@ -708,7 +708,7 @@ tp_base_media_call_content_update_local_media_description (
if (current_properties == NULL)
{
- GError error = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError error = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"The initial MediaDescription object has not yet appeared" };
dbus_g_method_return_error (context, &error);
return;
@@ -720,7 +720,7 @@ tp_base_media_call_content_update_local_media_description (
TP_ARRAY_TYPE_CODEC_LIST);
if (!codecs || codecs->len == 0)
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Codecs can not be empty" };
dbus_g_method_return_error (context, &error);
return;
@@ -729,7 +729,7 @@ tp_base_media_call_content_update_local_media_description (
if (self->priv->current_offer != NULL &&
tp_call_content_media_description_get_remote_contact (self->priv->current_offer) == GPOINTER_TO_UINT (contact))
{
- GError error = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError error = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Can not update the media description while there is"
" an outstanding offer for this contact." };
dbus_g_method_return_error (context, &error);
@@ -769,7 +769,7 @@ tp_base_media_call_content_acknowledge_dtmf_change (
if (self->priv->current_dtmf_event != in_Event)
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The acknoledgement is not for the right event"};
dbus_g_method_return_error (context, &error);
return;
@@ -778,7 +778,7 @@ tp_base_media_call_content_acknowledge_dtmf_change (
if (in_State != TP_SENDING_STATE_SENDING &&
in_State != TP_SENDING_STATE_NONE)
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The new sending state can not be a pending state"};
dbus_g_method_return_error (context, &error);
return;
@@ -790,7 +790,7 @@ tp_base_media_call_content_acknowledge_dtmf_change (
if (self->priv->current_dtmf_state != TP_SENDING_STATE_PENDING_SEND &&
self->priv->current_dtmf_state != TP_SENDING_STATE_PENDING_STOP_SENDING)
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Acknowledge rejected because we are not in a pending state"};
dbus_g_method_return_error (context, &error);
return;
@@ -802,7 +802,7 @@ tp_base_media_call_content_acknowledge_dtmf_change (
TP_SENDING_STATE_PENDING_STOP_SENDING &&
in_State != TP_SENDING_STATE_NONE))
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The new sending state does not match the pending state"};
dbus_g_method_return_error (context, &error);
return;
@@ -934,7 +934,7 @@ tp_base_media_call_content_start_tone (TpBaseCallContent *bcc,
if (self->priv->currently_sending_tones != NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_SERVICE_BUSY,
+ g_set_error (error, TP_ERROR, TP_ERROR_SERVICE_BUSY,
"Already sending a tone");
return FALSE;
}
@@ -976,7 +976,7 @@ tp_base_media_call_content_stop_tone (TpBaseCallContent *bcc,
if (self->priv->currently_sending_tones == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"No tone is currently being played");
return FALSE;
}
@@ -1007,7 +1007,7 @@ tp_base_media_call_content_multiple_tones (TpBaseCallContent *bcc,
if (self->priv->currently_sending_tones != NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_SERVICE_BUSY,
+ g_set_error (error, TP_ERROR, TP_ERROR_SERVICE_BUSY,
"Already sending a tone");
return FALSE;
}
diff --git a/telepathy-glib/base-media-call-stream.c b/telepathy-glib/base-media-call-stream.c
index 20dd03d84..b0cf3667d 100644
--- a/telepathy-glib/base-media-call-stream.c
+++ b/telepathy-glib/base-media-call-stream.c
@@ -1213,7 +1213,7 @@ tp_base_media_call_stream_complete_sending_state_change (
if (!correct_state_transition (self->priv->sending_state, state))
{
- GError e = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError e = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Invalid sending state transition" };
dbus_g_method_return_error (context, &e);
return;
@@ -1299,7 +1299,7 @@ tp_base_media_call_stream_complete_receiving_state_change (
if (!correct_state_transition (self->priv->receiving_state, state))
{
- GError e = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError e = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Invalid receiving state transition" };
dbus_g_method_return_error (context, &e);
return;
@@ -1417,7 +1417,7 @@ tp_base_media_call_stream_add_candidates (TpSvcCallStreamInterfaceMedia *iface,
if (klass->add_local_candidates == NULL)
{
- GError e = { TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ GError e = { TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Connection Manager did not implement "
"TpBaseMediaCallStream::add_local_candidates vmethod" };
dbus_g_method_return_error (context, &e);
diff --git a/telepathy-glib/base-password-channel.c b/telepathy-glib/base-password-channel.c
index ba6efec92..d5a246abf 100644
--- a/telepathy-glib/base-password-channel.c
+++ b/telepathy-glib/base-password-channel.c
@@ -468,7 +468,7 @@ tp_base_password_channel_close (TpBaseChannel *base)
tp_base_password_channel_change_status (self,
TP_SASL_STATUS_CLIENT_FAILED, TP_ERROR_STR_CANCELLED);
- g_signal_emit (self, signals[FINISHED], 0, NULL, TP_ERRORS,
+ g_signal_emit (self, signals[FINISHED], 0, NULL, TP_ERROR,
TP_ERROR_CANCELLED, "BasePassword channel was closed");
}
@@ -512,14 +512,14 @@ tp_base_password_channel_start_mechanism_with_data (
if (!tp_strv_contains (
tp_base_password_channel_available_mechanisms, mechanism))
{
- error = g_error_new (TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ error = g_error_new (TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"The mechanism %s is not implemented", mechanism);
goto error;
}
if (priv->sasl_status != TP_SASL_STATUS_NOT_STARTED)
{
- error = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"StartMechanismWithData cannot be called in state %u",
priv->sasl_status);
goto error;
@@ -527,7 +527,7 @@ tp_base_password_channel_start_mechanism_with_data (
if (initial_data->len == 0)
{
- error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"No initial data given");
goto error;
}
@@ -562,7 +562,7 @@ tp_base_password_channel_accept_sasl (
if (priv->sasl_status != TP_SASL_STATUS_SERVER_SUCCEEDED)
{
- GError *error = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError *error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"AcceptSASL cannot be called in state %u", priv->sasl_status);
dbus_g_method_return_error (context, error);
g_error_free (error);
@@ -591,7 +591,7 @@ tp_base_password_channel_abort_sasl (
if (priv->sasl_status == TP_SASL_STATUS_SERVER_SUCCEEDED
|| priv->sasl_status == TP_SASL_STATUS_CLIENT_ACCEPTED)
{
- GError *error = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError *error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"AbortSASL cannot be called in state %u", priv->sasl_status);
dbus_g_method_return_error (context, error);
g_error_free (error);
@@ -611,7 +611,7 @@ tp_base_password_channel_abort_sasl (
tp_base_password_channel_change_status (channel,
TP_SASL_STATUS_CLIENT_FAILED, TP_ERROR_STR_CANCELLED);
- g_signal_emit (channel, signals[FINISHED], 0, NULL, TP_ERRORS,
+ g_signal_emit (channel, signals[FINISHED], 0, NULL, TP_ERROR,
TP_ERROR_CANCELLED, "AbortSASL was called");
}
diff --git a/telepathy-glib/base-protocol.c b/telepathy-glib/base-protocol.c
index 27e61b298..3732c5bda 100644
--- a/telepathy-glib/base-protocol.c
+++ b/telepathy-glib/base-protocol.c
@@ -221,7 +221,7 @@ tp_cm_param_filter_uint_nonzero (const TpCMParamSpec *paramspec,
{
if (g_value_get_uint (value) == 0)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Account parameter '%s' may not be set to zero",
paramspec->name);
return FALSE;
@@ -248,7 +248,7 @@ tp_cm_param_filter_string_nonempty (const TpCMParamSpec *paramspec,
if (str == NULL || str[0] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Account parameter '%s' may not be set to an empty string",
paramspec->name);
return FALSE;
@@ -1314,7 +1314,7 @@ _tp_cm_param_spec_check_all_allowed (const TpCMParamSpec *parameters,
error_txt = g_string_free (error_str, FALSE);
DEBUG ("%s", error_txt);
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"%s", error_txt);
g_free (error_txt);
ret = FALSE;
@@ -1335,7 +1335,7 @@ _tp_cm_param_spec_coerce (const TpCMParamSpec *param_spec,
if (tp_asv_lookup (asv, name) == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"%s not found in parameters", name);
return NULL;
}
@@ -1351,7 +1351,7 @@ _tp_cm_param_spec_coerce (const TpCMParamSpec *param_spec,
if (G_VALUE_TYPE (value) != param_spec->gtype)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"%s has type %s, but %s was expected",
name, G_VALUE_TYPE_NAME (value),
g_type_name (param_spec->gtype));
@@ -1372,7 +1372,7 @@ _tp_cm_param_spec_coerce (const TpCMParamSpec *param_spec,
if (!valid)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"%s has a non-integer type or is out of range (type=%s)",
name, G_VALUE_TYPE_NAME (value));
return NULL;
@@ -1381,7 +1381,7 @@ _tp_cm_param_spec_coerce (const TpCMParamSpec *param_spec,
if (param_spec->dtype[0] == DBUS_TYPE_INT16 &&
(i < -0x8000 || i > 0x7fff))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"%s is out of range for a 16-bit signed integer", name);
return NULL;
}
@@ -1401,7 +1401,7 @@ _tp_cm_param_spec_coerce (const TpCMParamSpec *param_spec,
if (!valid)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"%s has a non-integer type or is out of range (type=%s)",
name, G_VALUE_TYPE_NAME (value));
return NULL;
@@ -1409,14 +1409,14 @@ _tp_cm_param_spec_coerce (const TpCMParamSpec *param_spec,
if (param_spec->dtype[0] == DBUS_TYPE_BYTE && i > 0xff)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"%s is out of range for a byte", name);
return NULL;
}
if (param_spec->dtype[0] == DBUS_TYPE_UINT16 && i > 0xffff)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"%s is out of range for a 16-bit unsigned integer", name);
return NULL;
}
@@ -1437,7 +1437,7 @@ _tp_cm_param_spec_coerce (const TpCMParamSpec *param_spec,
if (!valid)
{
- 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 64-bit signed integer (type=%s)", name,
G_VALUE_TYPE_NAME (value));
return NULL;
@@ -1456,7 +1456,7 @@ _tp_cm_param_spec_coerce (const TpCMParamSpec *param_spec,
if (!valid)
{
- 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 64-bit unsigned integer (type=%s)", name,
G_VALUE_TYPE_NAME (value));
return NULL;
@@ -1475,7 +1475,7 @@ _tp_cm_param_spec_coerce (const TpCMParamSpec *param_spec,
if (!valid)
{
- 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 double (type=%s)", name,
G_VALUE_TYPE_NAME (value));
return NULL;
@@ -1579,7 +1579,7 @@ tp_base_protocol_sanitize_parameters (TpBaseProtocol *self,
else if ((parameters[i].flags & mandatory_flag) != 0)
{
DEBUG ("missing mandatory account parameter %s", name);
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"missing mandatory account parameter %s",
name);
goto except;
@@ -1669,7 +1669,7 @@ protocol_normalize_contact (TpSvcProtocol *protocol,
}
else
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"This Protocol does not implement NormalizeContact");
}
@@ -1710,7 +1710,7 @@ protocol_identify_account (TpSvcProtocol *protocol,
}
else
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"This Protocol does not implement IdentifyAccount");
}
diff --git a/telepathy-glib/call-channel.c b/telepathy-glib/call-channel.c
index b346e4f22..2473f510a 100644
--- a/telepathy-glib/call-channel.c
+++ b/telepathy-glib/call-channel.c
@@ -1820,7 +1820,7 @@ tp_call_channel_request_hold_async (TpCallChannel *self,
else
{
g_simple_async_result_set_error (result,
- TP_ERRORS, TP_ERROR_NOT_CAPABLE,
+ TP_ERROR, TP_ERROR_NOT_CAPABLE,
"Channel does NOT implement the Hold interface");
g_simple_async_result_complete_in_idle (result);
}
diff --git a/telepathy-glib/call-content-media-description.c b/telepathy-glib/call-content-media-description.c
index ff3725cf2..bc8339c85 100644
--- a/telepathy-glib/call-content-media-description.c
+++ b/telepathy-glib/call-content-media-description.c
@@ -1202,7 +1202,7 @@ tp_call_content_media_description_accept (TpSvcCallContentMediaDescription *ifac
TP_ARRAY_TYPE_CODEC_LIST);
if (!codecs || codecs->len == 0)
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Codecs can not be empty" };
dbus_g_method_return_error (context, &error);
return;
@@ -1213,7 +1213,7 @@ tp_call_content_media_description_accept (TpSvcCallContentMediaDescription *ifac
&valid);
if (valid && remote_contact != self->priv->remote_contact)
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Remote contact must the same as in request." };
dbus_g_method_return_error (context, &error);
return;
@@ -1240,7 +1240,7 @@ tp_call_content_media_description_reject (TpSvcCallContentMediaDescription *ifac
if (!self->priv->has_remote_information)
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Can not reject an empty Media Description" };
dbus_g_method_return_error (context, &error);
return;
@@ -1255,7 +1255,7 @@ tp_call_content_media_description_reject (TpSvcCallContentMediaDescription *ifac
}
g_simple_async_result_set_error (self->priv->result,
- TP_ERRORS, TP_ERROR_MEDIA_CODECS_INCOMPATIBLE,
+ TP_ERROR, TP_ERROR_MEDIA_CODECS_INCOMPATIBLE,
"Media description was rejected");
g_simple_async_result_complete (self->priv->result);
g_clear_object (&self->priv->result);
diff --git a/telepathy-glib/call-content.c b/telepathy-glib/call-content.c
index 41c33e4ee..071e304e7 100644
--- a/telepathy-glib/call-content.c
+++ b/telepathy-glib/call-content.c
@@ -371,7 +371,7 @@ tones_stopped_cb (TpCallContent *self,
{
if (cancelled)
{
- GError e = { TP_ERRORS, TP_ERROR_CANCELLED,
+ GError e = { TP_ERROR, TP_ERROR_CANCELLED,
"The DTMF tones were actively cancelled via StopTones" };
complete_sending_tones (self, &e);
return;
@@ -404,7 +404,7 @@ maybe_send_tones (TpCallContent *self)
/* Yes this is safe if cancellable is NULL! */
if (g_cancellable_is_cancelled (self->priv->current_tones->cancellable))
{
- GError e = { TP_ERRORS, TP_ERROR_CANCELLED,
+ GError e = { TP_ERROR, TP_ERROR_CANCELLED,
"The DTMF tones were cancelled before it has started" };
complete_sending_tones (self, &e);
return;
@@ -748,7 +748,7 @@ tp_call_content_init_known_interfaces (void)
tp_proxy_or_subclass_hook_on_interface_add (tp_type,
tp_cli_call_content_add_signals);
tp_proxy_subclass_add_error_mapping (tp_type,
- TP_ERROR_PREFIX, TP_ERRORS, TP_TYPE_ERROR);
+ TP_ERROR_PREFIX, TP_ERROR, TP_TYPE_ERROR);
g_once_init_leave (&once, 1);
}
@@ -931,7 +931,7 @@ tp_call_content_send_tones_async (TpCallContent *self,
TP_IFACE_QUARK_CALL_CONTENT_INTERFACE_DTMF))
{
g_simple_async_report_error_in_idle (G_OBJECT (self),
- callback, user_data, TP_ERRORS, TP_ERROR_NOT_CAPABLE,
+ callback, user_data, TP_ERROR, TP_ERROR_NOT_CAPABLE,
"Content does not support DTMF");
return;
}
diff --git a/telepathy-glib/call-stream-endpoint.c b/telepathy-glib/call-stream-endpoint.c
index 3e8ea1c67..698c473c1 100644
--- a/telepathy-glib/call-stream-endpoint.c
+++ b/telepathy-glib/call-stream-endpoint.c
@@ -676,7 +676,7 @@ validate_candidate (const GValueArray *candidate,
if (candidate->n_values != 4)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"A candidate should have 4 values, got %d", candidate->n_values);
return FALSE;
}
@@ -684,7 +684,7 @@ validate_candidate (const GValueArray *candidate,
value = g_value_array_get_nth ((GValueArray *) candidate, 0);
if (g_value_get_uint (value) >= TP_NUM_STREAM_COMPONENTS)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Invalid component id: %d", g_value_get_uint (value));
return FALSE;
}
@@ -692,7 +692,7 @@ validate_candidate (const GValueArray *candidate,
value = g_value_array_get_nth ((GValueArray *) candidate, 1);
if (tp_str_empty (g_value_get_string (value)))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Invalid address: %s", g_value_get_string (value));
return FALSE;
}
@@ -700,7 +700,7 @@ validate_candidate (const GValueArray *candidate,
value = g_value_array_get_nth ((GValueArray *) candidate, 2);
if (g_value_get_uint (value) > 65535)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Invalid port: %d", g_value_get_uint (value));
return FALSE;
}
@@ -732,14 +732,14 @@ common_checks (TpCallStreamEndpoint *self,
if (get_candidate_component (local_candidate) !=
get_candidate_component (remote_candidate))
{
- g_set_error_literal (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error_literal (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Component must be the same in local and remote candidate");
return FALSE;
}
if (!self->priv->controlling)
{
- g_set_error_literal (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error_literal (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Only controlling side can call SetSelectedCandidatePair");
return FALSE;
}
@@ -813,7 +813,7 @@ call_stream_endpoint_set_endpoint_state (TpSvcCallStreamEndpoint *iface,
if (component >= TP_NUM_STREAM_COMPONENTS)
{
- GError *error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError *error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Stream component %d is out of the valid range.", state);
dbus_g_method_return_error (context, error);
g_error_free (error);
@@ -822,7 +822,7 @@ call_stream_endpoint_set_endpoint_state (TpSvcCallStreamEndpoint *iface,
if (state >= TP_NUM_STREAM_ENDPOINT_STATES)
{
- GError *error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError *error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Stream state %d is out of the valid range.", state);
dbus_g_method_return_error (context, error);
g_error_free (error);
diff --git a/telepathy-glib/call-stream.c b/telepathy-glib/call-stream.c
index 976e3d760..ac05b8f37 100644
--- a/telepathy-glib/call-stream.c
+++ b/telepathy-glib/call-stream.c
@@ -483,7 +483,7 @@ tp_call_stream_init_known_interfaces (void)
tp_proxy_or_subclass_hook_on_interface_add (tp_type,
tp_cli_call_stream_add_signals);
tp_proxy_subclass_add_error_mapping (tp_type,
- TP_ERROR_PREFIX, TP_ERRORS, TP_TYPE_ERROR);
+ TP_ERROR_PREFIX, TP_ERROR, TP_TYPE_ERROR);
g_once_init_leave (&once, 1);
}
diff --git a/telepathy-glib/channel-contacts.c b/telepathy-glib/channel-contacts.c
index 6896a463c..f21e44d67 100644
--- a/telepathy-glib/channel-contacts.c
+++ b/telepathy-glib/channel-contacts.c
@@ -1114,7 +1114,7 @@ _tp_channel_contacts_prepare_async (TpProxy *proxy,
if (self->priv->cm_too_old_for_contacts)
{
g_simple_async_report_error_in_idle ((GObject *) self, callback,
- user_data, TP_ERRORS, TP_ERROR_SOFTWARE_UPGRADE_REQUIRED,
+ user_data, TP_ERROR, TP_ERROR_SOFTWARE_UPGRADE_REQUIRED,
"The Connection Manager does not implement the required telepathy "
"specification (>= 0.23.4) to prepare TP_CHANNEL_FEATURE_CONTACTS.");
return;
diff --git a/telepathy-glib/channel-dispatch-operation.c b/telepathy-glib/channel-dispatch-operation.c
index d37c944e9..1c26b813e 100644
--- a/telepathy-glib/channel-dispatch-operation.c
+++ b/telepathy-glib/channel-dispatch-operation.c
@@ -588,7 +588,7 @@ get_dispatch_operation_prop_cb (TpProxy *proxy,
if (self->priv->connection == NULL)
{
- e = g_error_new_literal (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ e = g_error_new_literal (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Mandatory 'Connection' property is missing");
DEBUG ("%s", e->message);
@@ -602,7 +602,7 @@ get_dispatch_operation_prop_cb (TpProxy *proxy,
if (self->priv->account == NULL)
{
- e = g_error_new_literal (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ e = g_error_new_literal (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Mandatory 'Account' property is missing");
DEBUG ("%s", e->message);
@@ -616,7 +616,7 @@ get_dispatch_operation_prop_cb (TpProxy *proxy,
if (self->priv->possible_handlers == NULL)
{
- e = g_error_new_literal (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ e = g_error_new_literal (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Mandatory 'PossibleHandlers' property is missing");
DEBUG ("%s", e->message);
@@ -632,7 +632,7 @@ get_dispatch_operation_prop_cb (TpProxy *proxy,
TP_ARRAY_TYPE_CHANNEL_DETAILS_LIST);
if (channels == NULL)
{
- e = g_error_new_literal (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ e = g_error_new_literal (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Mandatory 'Channels' property is missing");
DEBUG ("%s", e->message);
@@ -865,7 +865,7 @@ tp_channel_dispatch_operation_init_known_interfaces (void)
tp_proxy_or_subclass_hook_on_interface_add (tp_type,
tp_cli_channel_dispatch_operation_add_signals);
tp_proxy_subclass_add_error_mapping (tp_type,
- TP_ERROR_PREFIX, TP_ERRORS, TP_TYPE_ERROR);
+ TP_ERROR_PREFIX, TP_ERROR, TP_TYPE_ERROR);
g_once_init_leave (&once, 1);
}
diff --git a/telepathy-glib/channel-dispatcher.c b/telepathy-glib/channel-dispatcher.c
index 9e8819d19..21638244c 100644
--- a/telepathy-glib/channel-dispatcher.c
+++ b/telepathy-glib/channel-dispatcher.c
@@ -139,7 +139,7 @@ tp_channel_dispatcher_init_known_interfaces (void)
tp_proxy_or_subclass_hook_on_interface_add (tp_type,
tp_cli_channel_dispatcher_add_signals);
tp_proxy_subclass_add_error_mapping (tp_type,
- TP_ERROR_PREFIX, TP_ERRORS, TP_TYPE_ERROR);
+ TP_ERROR_PREFIX, TP_ERROR, TP_TYPE_ERROR);
g_once_init_leave (&once, 1);
}
diff --git a/telepathy-glib/channel-group.c b/telepathy-glib/channel-group.c
index 704ae3a29..c7f2b07cf 100644
--- a/telepathy-glib/channel-group.c
+++ b/telepathy-glib/channel-group.c
@@ -973,7 +973,7 @@ _tp_channel_group_improve_remove_error (TpChannel *self,
/* If we changed the code we also need to change the domain; if not, we did
* an early return, so we'll never reach this */
- error->domain = TP_ERRORS;
+ error->domain = TP_ERROR;
}
static void
diff --git a/telepathy-glib/channel-manager.c b/telepathy-glib/channel-manager.c
index 0aef44399..56fca962a 100644
--- a/telepathy-glib/channel-manager.c
+++ b/telepathy-glib/channel-manager.c
@@ -785,7 +785,7 @@ tp_channel_manager_asv_has_unknown_properties (GHashTable *properties,
if (!tp_strv_contains (fixed, property_name) &&
!tp_strv_contains (allowed, property_name))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Request contained unknown property '%s'", property_name);
return TRUE;
}
diff --git a/telepathy-glib/channel-request.c b/telepathy-glib/channel-request.c
index 08fcf1f9c..636456ab1 100644
--- a/telepathy-glib/channel-request.c
+++ b/telepathy-glib/channel-request.c
@@ -72,7 +72,7 @@
* indicates that the channel request no longer exists).
*
* On failure, the #TpProxy::invalidated signal will be emitted with some
- * other suitable error, usually from the %TP_ERRORS domain.
+ * other suitable error, usually from the %TP_ERROR domain.
*
* If the channel dispatcher crashes or exits, the #TpProxy::invalidated
* signal will be emitted with the domain %TP_DBUS_ERRORS and the error code
@@ -544,7 +544,7 @@ tp_channel_request_init_known_interfaces (void)
tp_proxy_or_subclass_hook_on_interface_add (tp_type,
tp_cli_channel_request_add_signals);
tp_proxy_subclass_add_error_mapping (tp_type,
- TP_ERROR_PREFIX, TP_ERRORS, TP_TYPE_ERROR);
+ TP_ERROR_PREFIX, TP_ERROR, TP_TYPE_ERROR);
g_once_init_leave (&once, 1);
}
diff --git a/telepathy-glib/channel.c b/telepathy-glib/channel.c
index 41f016a54..19a4ee818 100644
--- a/telepathy-glib/channel.c
+++ b/telepathy-glib/channel.c
@@ -2090,7 +2090,7 @@ tp_channel_new (TpConnection *conn,
{
/* in the properties, we do actually allow the user to give us an
* assumed-valid handle of unknown type - but that'd be silly */
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Nonzero handle of type NONE or unknown makes no sense");
goto finally;
}
@@ -2313,7 +2313,7 @@ tp_channel_once (gpointer data G_GNUC_UNUSED)
tp_proxy_or_subclass_hook_on_interface_add (type,
tp_cli_channel_add_signals);
tp_proxy_subclass_add_error_mapping (type,
- TP_ERROR_PREFIX, TP_ERRORS, TP_TYPE_ERROR);
+ TP_ERROR_PREFIX, TP_ERROR, TP_TYPE_ERROR);
return NULL;
}
@@ -2878,7 +2878,7 @@ provide_password_cb (TpChannel *self,
{
DEBUG ("Wrong password provided for %s", tp_proxy_get_object_path (self));
- g_simple_async_result_set_error (result, TP_ERRORS,
+ g_simple_async_result_set_error (result, TP_ERROR,
TP_ERROR_AUTHENTICATION_FAILED, "Password was not correct");
}
diff --git a/telepathy-glib/client.c b/telepathy-glib/client.c
index 0e62a96ed..0bd5502b7 100644
--- a/telepathy-glib/client.c
+++ b/telepathy-glib/client.c
@@ -136,7 +136,7 @@ tp_client_init_known_interfaces (void)
tp_proxy_or_subclass_hook_on_interface_add (tp_type,
tp_cli_client_add_signals);
tp_proxy_subclass_add_error_mapping (tp_type,
- TP_ERROR_PREFIX, TP_ERRORS, TP_TYPE_ERROR);
+ TP_ERROR_PREFIX, TP_ERROR, TP_TYPE_ERROR);
g_once_init_leave (&once, 1);
}
diff --git a/telepathy-glib/connection-contact-info.c b/telepathy-glib/connection-contact-info.c
index e33b6491f..07b213aa2 100644
--- a/telepathy-glib/connection-contact-info.c
+++ b/telepathy-glib/connection-contact-info.c
@@ -453,7 +453,7 @@ tp_connection_get_contact_info_cb (TpProxy *proxy,
if (!valid || specs == NULL)
{
DEBUG ("Some properties are missing on the ContactInfo interface");
- g_simple_async_result_set_error (result, TP_ERRORS, TP_ERROR_CONFUSED,
+ g_simple_async_result_set_error (result, TP_ERROR, TP_ERROR_CONFUSED,
"Some properties are missing on the ContactInfo interface");
goto finally;
}
diff --git a/telepathy-glib/connection-manager.c b/telepathy-glib/connection-manager.c
index 69d0ff55d..2808a10c1 100644
--- a/telepathy-glib/connection-manager.c
+++ b/telepathy-glib/connection-manager.c
@@ -1408,7 +1408,7 @@ tp_connection_manager_init_known_interfaces (void)
tp_proxy_or_subclass_hook_on_interface_add (tp_type,
tp_cli_connection_manager_add_signals);
tp_proxy_subclass_add_error_mapping (tp_type,
- TP_ERROR_PREFIX, TP_ERRORS, TP_TYPE_ERROR);
+ TP_ERROR_PREFIX, TP_ERROR, TP_TYPE_ERROR);
g_once_init_leave (&once, 1);
}
@@ -1998,14 +1998,14 @@ tp_connection_manager_check_valid_name (const gchar *name,
if (tp_str_empty (name))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The empty string is not a valid connection manager name");
return FALSE;
}
if (!g_ascii_isalpha (name[0]))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Not a valid connection manager name because first character "
"is not an ASCII letter: %s", name);
return FALSE;
@@ -2015,7 +2015,7 @@ tp_connection_manager_check_valid_name (const gchar *name,
{
if (!g_ascii_isalnum (*name_char) && *name_char != '_')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Not a valid connection manager name because character '%c' "
"is not an ASCII letter, digit or underscore: %s",
*name_char, name);
@@ -2047,14 +2047,14 @@ tp_connection_manager_check_valid_protocol_name (const gchar *name,
if (name == NULL || name[0] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The empty string is not a valid protocol name");
return FALSE;
}
if (!g_ascii_isalpha (name[0]))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Not a valid protocol name because first character "
"is not an ASCII letter: %s", name);
return FALSE;
@@ -2064,7 +2064,7 @@ tp_connection_manager_check_valid_protocol_name (const gchar *name,
{
if (!g_ascii_isalnum (*name_char) && *name_char != '-')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Not a valid protocol name because character '%c' "
"is not an ASCII letter, digit or hyphen/minus: %s",
*name_char, name);
diff --git a/telepathy-glib/connection.c b/telepathy-glib/connection.c
index 3a6f2567d..2fa2fafa3 100644
--- a/telepathy-glib/connection.c
+++ b/telepathy-glib/connection.c
@@ -1177,7 +1177,7 @@ _tp_connection_status_reason_to_gerror (TpConnectionStatusReason reason,
return;
}
- g_set_error (error, TP_ERRORS, code, "%s", message);
+ g_set_error (error, TP_ERROR, code, "%s", message);
if (ret_str != NULL)
*ret_str = tp_error_get_dbus_name (code);
@@ -2900,7 +2900,7 @@ tp_connection_once (gpointer data G_GNUC_UNUSED)
tp_proxy_or_subclass_hook_on_interface_add (type,
tp_cli_connection_add_signals);
tp_proxy_subclass_add_error_mapping (type,
- TP_ERROR_PREFIX, TP_ERRORS, TP_TYPE_ERROR);
+ TP_ERROR_PREFIX, TP_ERROR, TP_TYPE_ERROR);
return NULL;
}
@@ -3276,7 +3276,7 @@ tp_connection_get_detailed_error (TpConnection *self,
*details = self->priv->connection_error_details;
}
- if (proxy->invalidated->domain == TP_ERRORS)
+ if (proxy->invalidated->domain == TP_ERROR)
{
return tp_error_get_dbus_name (proxy->invalidated->code);
}
diff --git a/telepathy-glib/contact-list-channel.c b/telepathy-glib/contact-list-channel.c
index cd5db353c..6346da8b3 100644
--- a/telepathy-glib/contact-list-channel.c
+++ b/telepathy-glib/contact-list-channel.c
@@ -219,7 +219,7 @@ tp_base_contact_list_channel_check_still_usable (
{
if (self->manager == NULL)
{
- GError e = { TP_ERRORS, TP_ERROR_TERMINATED, "Channel already closed" };
+ GError e = { TP_ERROR, TP_ERROR_TERMINATED, "Channel already closed" };
dbus_g_method_return_error (context, &e);
return FALSE;
}
@@ -340,7 +340,7 @@ static void
list_channel_close (TpSvcChannel *iface G_GNUC_UNUSED,
DBusGMethodInvocation *context)
{
- GError e = { TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ GError e = { TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"ContactList channels with handle type LIST may not be closed" };
dbus_g_method_return_error (context, &e);
@@ -358,7 +358,7 @@ group_channel_close (TpSvcChannel *iface,
if (tp_handle_set_size (self->group.members) > 0)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Non-empty groups may not be deleted (closed)");
goto error;
}
diff --git a/telepathy-glib/contact.c b/telepathy-glib/contact.c
index 1c7a00ef6..70912f652 100644
--- a/telepathy-glib/contact.c
+++ b/telepathy-glib/contact.c
@@ -1804,7 +1804,7 @@ contacts_context_fail (ContactsContext *c,
* @contacts will contain contact objects for those IDs that were
* valid (it may be empty), and @failed_id_errors will map the IDs
* that were not valid to a corresponding #GError (if the connection manager
- * complies with the Telepathy spec, it will have domain %TP_ERRORS and code
+ * complies with the Telepathy spec, it will have domain %TP_ERROR and code
* %TP_ERROR_INVALID_HANDLE).
*
* If an unrecoverable error occurs (for instance, if @connection
@@ -1944,7 +1944,7 @@ contacts_held_one (TpConnection *connection,
g_ptr_array_add (c->contacts, contact);
c->next_index++;
}
- else if (error->domain == TP_ERRORS &&
+ else if (error->domain == TP_ERROR &&
error->code == TP_ERROR_INVALID_HANDLE)
{
g_array_append_val (c->invalid,
@@ -2006,7 +2006,7 @@ contacts_held_handles (TpConnection *connection,
g_array_index (c->handles, TpHandle, i)));
}
}
- else if (error->domain == TP_ERRORS &&
+ else if (error->domain == TP_ERROR &&
error->code == TP_ERROR_INVALID_HANDLE)
{
/* One of the handles is bad. We don't know which one :-( so split
@@ -2211,7 +2211,7 @@ contacts_got_aliases (TpConnection *connection,
g_object_notify ((GObject *) contact, "alias");
}
}
- else if ((error->domain == TP_ERRORS &&
+ else if ((error->domain == TP_ERROR &&
error->code == TP_ERROR_NOT_IMPLEMENTED) ||
(error->domain == DBUS_GERROR &&
error->code == DBUS_GERROR_UNKNOWN_METHOD))
@@ -4370,7 +4370,7 @@ contacts_requested_one_handle (TpConnection *connection,
g_ptr_array_add (c->contacts, contact);
c->next_index++;
}
- else if (error->domain == TP_ERRORS &&
+ else if (error->domain == TP_ERROR &&
(error->code == TP_ERROR_INVALID_HANDLE ||
error->code == TP_ERROR_NOT_AVAILABLE ||
error->code == TP_ERROR_INVALID_ARGUMENT))
@@ -4434,7 +4434,7 @@ contacts_requested_handles (TpConnection *connection,
g_ptr_array_add (c->contacts, contact);
}
}
- else if (error->domain == TP_ERRORS &&
+ else if (error->domain == TP_ERROR &&
(error->code == TP_ERROR_INVALID_HANDLE ||
error->code == TP_ERROR_NOT_AVAILABLE ||
error->code == TP_ERROR_INVALID_ARGUMENT))
diff --git a/telepathy-glib/dbus-daemon.c b/telepathy-glib/dbus-daemon.c
index 478ff3b29..f98236ffa 100644
--- a/telepathy-glib/dbus-daemon.c
+++ b/telepathy-glib/dbus-daemon.c
@@ -805,7 +805,7 @@ tp_dbus_daemon_request_name (TpDBusDaemon *self,
}
else
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Name '%s' already in use by this process", well_known_name);
return FALSE;
}
@@ -813,18 +813,18 @@ tp_dbus_daemon_request_name (TpDBusDaemon *self,
case DBUS_REQUEST_NAME_REPLY_EXISTS:
case DBUS_REQUEST_NAME_REPLY_IN_QUEUE:
/* the latter shouldn't actually happen since we said DO_NOT_QUEUE */
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Name '%s' already in use by another process", well_known_name);
return FALSE;
case -1:
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"%s: %s", dbus_error.name, dbus_error.message);
dbus_error_free (&dbus_error);
return FALSE;
default:
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"RequestName('%s') returned %d and I don't know what that means",
well_known_name, result);
return FALSE;
@@ -883,23 +883,23 @@ tp_dbus_daemon_release_name (TpDBusDaemon *self,
return TRUE;
case DBUS_RELEASE_NAME_REPLY_NOT_OWNER:
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_YOURS,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_YOURS,
"Name '%s' owned by another process", well_known_name);
return FALSE;
case DBUS_RELEASE_NAME_REPLY_NON_EXISTENT:
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Name '%s' not owned", well_known_name);
return FALSE;
case -1:
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"%s: %s", dbus_error.name, dbus_error.message);
dbus_error_free (&dbus_error);
return FALSE;
default:
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"ReleaseName('%s') returned %d and I don't know what that means",
well_known_name, result);
return FALSE;
diff --git a/telepathy-glib/dbus-properties-mixin.c b/telepathy-glib/dbus-properties-mixin.c
index fc9523bb1..5ae17cd08 100644
--- a/telepathy-glib/dbus-properties-mixin.c
+++ b/telepathy-glib/dbus-properties-mixin.c
@@ -755,7 +755,7 @@ _iface_impl_get_property_impl (
if (prop_impl == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Unknown property %s on %s", property_name, interface_name);
return FALSE;
}
@@ -764,14 +764,14 @@ _iface_impl_get_property_impl (
if ((prop_info->flags & TP_DBUS_PROPERTIES_MIXIN_FLAG_READ) == 0)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_PERMISSION_DENIED,
+ g_set_error (error, TP_ERROR, TP_ERROR_PERMISSION_DENIED,
"Property %s on %s is write-only", property_name, interface_name);
return FALSE;
}
if (iface_impl->getter == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Getting properties on %s is unimplemented", interface_name);
return FALSE;
}
@@ -818,7 +818,7 @@ tp_dbus_properties_mixin_get (GObject *self,
if (iface_impl == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"No properties known for interface %s", interface_name);
return FALSE;
}
@@ -1230,7 +1230,7 @@ tp_dbus_properties_mixin_set (
if (iface_impl == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"No properties known for interface '%s'", interface_name);
return FALSE;
}
@@ -1242,7 +1242,7 @@ tp_dbus_properties_mixin_set (
if (prop_impl == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Unknown property '%s' on interface '%s'", property_name,
interface_name);
return FALSE;
@@ -1252,14 +1252,14 @@ tp_dbus_properties_mixin_set (
if ((prop_info->flags & TP_DBUS_PROPERTIES_MIXIN_FLAG_WRITE) == 0)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_PERMISSION_DENIED,
+ g_set_error (error, TP_ERROR, TP_ERROR_PERMISSION_DENIED,
"'%s.%s' is read-only", interface_name, property_name);
return FALSE;
}
if (iface_impl->setter == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Setting properties on '%s' is unimplemented", interface_name);
return FALSE;
}
@@ -1270,7 +1270,7 @@ tp_dbus_properties_mixin_set (
if (!g_value_transform (value, &copy))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Cannot convert %s to %s for property %s",
g_type_name (G_VALUE_TYPE (value)),
g_type_name (prop_info->type),
diff --git a/telepathy-glib/dbus-tube-channel.c b/telepathy-glib/dbus-tube-channel.c
index b796e7bc3..0533b098a 100644
--- a/telepathy-glib/dbus-tube-channel.c
+++ b/telepathy-glib/dbus-tube-channel.c
@@ -569,7 +569,7 @@ proxy_prepare_offer_cb (GObject *source,
if (self->priv->state != TP_TUBE_CHANNEL_STATE_NOT_OFFERED)
{
- g_simple_async_result_set_error (self->priv->result, TP_ERRORS,
+ g_simple_async_result_set_error (self->priv->result, TP_ERROR,
TP_ERROR_INVALID_ARGUMENT, "Tube is not in the NotOffered state");
complete_operation (self);
goto out;
@@ -694,7 +694,7 @@ proxy_prepare_accept_cb (GObject *source,
if (self->priv->state != TP_TUBE_CHANNEL_STATE_LOCAL_PENDING)
{
- g_simple_async_result_set_error (self->priv->result, TP_ERRORS,
+ g_simple_async_result_set_error (self->priv->result, TP_ERROR,
TP_ERROR_INVALID_ARGUMENT, "Tube is not in the LocalPending state");
complete_operation (self);
return;
diff --git a/telepathy-glib/dbus.c b/telepathy-glib/dbus.c
index 91153850e..4ef2fcf5d 100644
--- a/telepathy-glib/dbus.c
+++ b/telepathy-glib/dbus.c
@@ -93,7 +93,7 @@
void
tp_dbus_g_method_return_not_implemented (DBusGMethodInvocation *context)
{
- GError e = { TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED, "Not implemented" };
+ GError e = { TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "Not implemented" };
dbus_g_method_return_error (context, &e);
}
diff --git a/telepathy-glib/debug-client.c b/telepathy-glib/debug-client.c
index 8418feef1..a16da379d 100644
--- a/telepathy-glib/debug-client.c
+++ b/telepathy-glib/debug-client.c
@@ -275,7 +275,7 @@ got_enabled_cb (
}
else if (!G_VALUE_HOLDS_BOOLEAN (value))
{
- GError *e = g_error_new (TP_ERRORS,
+ GError *e = g_error_new (TP_ERROR,
TP_ERROR_NOT_IMPLEMENTED,
"this service doesn't implement the Debug interface correctly "
"(the Enabled property is not a boolean, but a %s)",
@@ -343,7 +343,7 @@ tp_debug_client_init_known_interfaces (void)
tp_proxy_or_subclass_hook_on_interface_add (tp_type,
tp_cli_debug_add_signals);
tp_proxy_subclass_add_error_mapping (tp_type,
- TP_ERROR_PREFIX, TP_ERRORS, TP_TYPE_ERROR);
+ TP_ERROR_PREFIX, TP_ERROR, TP_TYPE_ERROR);
g_once_init_leave (&once, 1);
}
diff --git a/telepathy-glib/errors.c b/telepathy-glib/errors.c
index 8000d7fd3..bc045b5be 100644
--- a/telepathy-glib/errors.c
+++ b/telepathy-glib/errors.c
@@ -48,8 +48,7 @@
* dbus-glib for server-side use (using dbus_g_error_domain_register()) when
* called.
*
- * This used to be called %TP_ERRORS. To be compatible with telepathy-glib
- * 0.10.x, use %TP_ERRORS.
+ * This used to be called %TP_ERRORS.
*
* Since: 0.11.7
*/
@@ -269,7 +268,7 @@
void
tp_g_set_error_invalid_handle_type (guint type, GError **error)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"unsupported handle type %u", type);
}
@@ -287,7 +286,7 @@ tp_g_set_error_invalid_handle_type (guint type, GError **error)
void
tp_g_set_error_unsupported_handle_type (guint type, GError **error)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"unsupported handle type %u", type);
}
diff --git a/telepathy-glib/file-transfer-channel.c b/telepathy-glib/file-transfer-channel.c
index 5b4b5ef85..db39bff5d 100644
--- a/telepathy-glib/file-transfer-channel.c
+++ b/telepathy-glib/file-transfer-channel.c
@@ -1328,7 +1328,7 @@ tp_file_transfer_channel_accept_file_async (TpFileTransferChannel *self,
if (self->priv->access_control_param != NULL)
{
g_simple_async_report_error_in_idle (G_OBJECT (self), callback,
- user_data, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ user_data, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Can't accept already accepted transfer");
return;
@@ -1337,7 +1337,7 @@ tp_file_transfer_channel_accept_file_async (TpFileTransferChannel *self,
if (self->priv->state != TP_FILE_TRANSFER_STATE_PENDING)
{
g_simple_async_report_error_in_idle (G_OBJECT (self), callback,
- user_data, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ user_data, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Can't accept a transfer that isn't pending");
return;
@@ -1346,7 +1346,7 @@ tp_file_transfer_channel_accept_file_async (TpFileTransferChannel *self,
if (tp_channel_get_requested (TP_CHANNEL (self)))
{
g_simple_async_report_error_in_idle (G_OBJECT (self), callback,
- user_data, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ user_data, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Can't accept outgoing transfer");
return;
@@ -1449,7 +1449,7 @@ tp_file_transfer_channel_provide_file_async (TpFileTransferChannel *self,
if (self->priv->access_control_param != NULL)
{
g_simple_async_report_error_in_idle (G_OBJECT (self), callback,
- user_data, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ user_data, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Can't provide already provided transfer");
return;
@@ -1459,7 +1459,7 @@ tp_file_transfer_channel_provide_file_async (TpFileTransferChannel *self,
&& self->priv->state != TP_FILE_TRANSFER_STATE_PENDING)
{
g_simple_async_report_error_in_idle (G_OBJECT (self), callback,
- user_data, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ user_data, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Can't provide a transfer that isn't pending or accepted");
return;
@@ -1468,7 +1468,7 @@ tp_file_transfer_channel_provide_file_async (TpFileTransferChannel *self,
if (!tp_channel_get_requested (TP_CHANNEL (self)))
{
g_simple_async_report_error_in_idle (G_OBJECT (self), callback,
- user_data, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ user_data, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Can't provide incoming transfer");
return;
diff --git a/telepathy-glib/gnio-util.c b/telepathy-glib/gnio-util.c
index 625854e92..190f1a3cc 100644
--- a/telepathy-glib/gnio-util.c
+++ b/telepathy-glib/gnio-util.c
@@ -87,7 +87,7 @@ tp_g_socket_address_from_variant (TpSocketAddressType type,
case TP_SOCKET_ADDRESS_TYPE_UNIX:
if (!G_VALUE_HOLDS (variant, 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,
"variant is %s not DBUS_TYPE_G_UCHAR_ARRAY",
G_VALUE_TYPE_NAME (variant));
@@ -108,7 +108,7 @@ tp_g_socket_address_from_variant (TpSocketAddressType type,
case TP_SOCKET_ADDRESS_TYPE_ABSTRACT_UNIX:
if (!G_VALUE_HOLDS (variant, 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,
"variant is %s not DBUS_TYPE_G_UCHAR_ARRAY",
G_VALUE_TYPE_NAME (variant));
@@ -129,7 +129,7 @@ tp_g_socket_address_from_variant (TpSocketAddressType type,
if (type == TP_SOCKET_ADDRESS_TYPE_IPV4 &&
!G_VALUE_HOLDS (variant, 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,
"variant is %s not TP_STRUCT_TYPE_SOCKET_ADDRESS_IPV4",
G_VALUE_TYPE_NAME (variant));
@@ -138,7 +138,7 @@ tp_g_socket_address_from_variant (TpSocketAddressType type,
else if (type == TP_SOCKET_ADDRESS_TYPE_IPV6 &&
!G_VALUE_HOLDS (variant, 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,
"variant is %s not TP_STRUCT_TYPE_SOCKET_ADDRESS_IPV6",
G_VALUE_TYPE_NAME (variant));
@@ -167,7 +167,7 @@ tp_g_socket_address_from_variant (TpSocketAddressType type,
break;
default:
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Unknown TpSocketAddressType (%i)",
type);
@@ -268,7 +268,7 @@ tp_address_variant_from_g_socket_address (GSocketAddress *address,
break;
default:
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Unknown GSocketAddressFamily %i",
g_socket_address_get_family (address));
diff --git a/telepathy-glib/group-mixin.c b/telepathy-glib/group-mixin.c
index 182aaf4f0..a07f309ef 100644
--- a/telepathy-glib/group-mixin.c
+++ b/telepathy-glib/group-mixin.c
@@ -584,7 +584,7 @@ tp_group_mixin_add_members (GObject *obj,
DEBUG ("handle %u cannot be added to members without "
"GROUP_FLAG_CAN_ADD", handle);
- g_set_error (error, TP_ERRORS, TP_ERROR_PERMISSION_DENIED,
+ g_set_error (error, TP_ERROR, TP_ERROR_PERMISSION_DENIED,
"handle %u cannot be added to members without "
"GROUP_FLAG_CAN_ADD", handle);
@@ -606,7 +606,7 @@ tp_group_mixin_add_members (GObject *obj,
if (mixin_cls->add_member == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Adding members to this Group channel is not possible");
return FALSE;
}
@@ -718,7 +718,7 @@ tp_group_mixin_remove_members_with_reason (GObject *obj,
DEBUG ("handle %u cannot be removed from members without "
"GROUP_FLAG_CAN_REMOVE", handle);
- g_set_error (error, TP_ERRORS, TP_ERROR_PERMISSION_DENIED,
+ g_set_error (error, TP_ERROR, TP_ERROR_PERMISSION_DENIED,
"handle %u cannot be removed from members without "
"GROUP_FLAG_CAN_REMOVE", handle);
@@ -732,7 +732,7 @@ tp_group_mixin_remove_members_with_reason (GObject *obj,
DEBUG ("handle %u cannot be removed from remote pending "
"without GROUP_FLAG_CAN_RESCIND", handle);
- g_set_error (error, TP_ERRORS, TP_ERROR_PERMISSION_DENIED,
+ g_set_error (error, TP_ERROR, TP_ERROR_PERMISSION_DENIED,
"handle %u cannot be removed from remote pending without "
"GROUP_FLAG_CAN_RESCIND", handle);
@@ -774,7 +774,7 @@ tp_group_mixin_remove_members_with_reason (GObject *obj,
}
else
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Removing contacts from this Group channel is not possible");
return FALSE;
}
@@ -1125,7 +1125,7 @@ tp_group_mixin_get_handle_owners (GObject *obj,
if ((mixin->group_flags &
TP_CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES) == 0)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"channel doesn't have channel specific handles");
return FALSE;
@@ -1145,7 +1145,7 @@ tp_group_mixin_get_handle_owners (GObject *obj,
if (!tp_handle_set_is_member (mixin->members, local_handle))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"handle %u is not a member", local_handle);
g_array_unref (*ret);
@@ -2390,7 +2390,7 @@ tp_external_group_mixin_get_dbus_property (GObject *object,
\
if (var == NULL) \
{ \
- GError na = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "I'm sure I " \
+ GError na = { TP_ERROR, TP_ERROR_NOT_AVAILABLE, "I'm sure I " \
"had a group object around here somewhere?" };\
\
dbus_g_method_return_error (context, &na); \
diff --git a/telepathy-glib/handle-channels-context.c b/telepathy-glib/handle-channels-context.c
index c05023812..aa5692569 100644
--- a/telepathy-glib/handle-channels-context.c
+++ b/telepathy-glib/handle-channels-context.c
@@ -119,7 +119,7 @@ tp_handle_channels_context_dispose (GObject *object)
if (self->priv->state == TP_HANDLE_CHANNELS_CONTEXT_STATE_NONE ||
self->priv->state == TP_HANDLE_CHANNELS_CONTEXT_STATE_DELAYED)
{
- GError error = { TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ GError error = { TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Disposing the TpHandleChannelsContext" };
WARNING ("Disposing a context in the %s state",
diff --git a/telepathy-glib/handle-repo-dynamic.c b/telepathy-glib/handle-repo-dynamic.c
index 052c28498..e324f440d 100644
--- a/telepathy-glib/handle-repo-dynamic.c
+++ b/telepathy-glib/handle-repo-dynamic.c
@@ -328,7 +328,7 @@ dynamic_handle_is_valid (TpHandleRepoIface *irepo,
if (handle_priv_lookup (self, handle) == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"handle %u is not currently a valid %s handle (type %u)",
handle, tp_handle_type_to_string (self->handle_type),
self->handle_type);
@@ -458,7 +458,7 @@ dynamic_lookup_handle (TpHandleRepoIface *irepo,
if (handle == 0)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"no %s handle (type %u) currently exists for ID \"%s\"",
tp_handle_type_to_string (self->handle_type),
self->handle_type, id);
diff --git a/telepathy-glib/handle-repo-static.c b/telepathy-glib/handle-repo-static.c
index 5477f8aa9..322adced5 100644
--- a/telepathy-glib/handle-repo-static.c
+++ b/telepathy-glib/handle-repo-static.c
@@ -197,7 +197,7 @@ static_handle_is_valid (TpHandleRepoIface *irepo,
if (handle <= 0 || handle > self->last_handle)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"handle %u is not a valid %s handle (type %u)",
handle, tp_handle_type_to_string (self->handle_type),
self->handle_type);
@@ -281,7 +281,7 @@ static_lookup_handle (TpHandleRepoIface *irepo,
return (TpHandle) i + 1;
}
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"'%s' is not one of the valid handles", id);
return 0;
}
diff --git a/telepathy-glib/media-interfaces.c b/telepathy-glib/media-interfaces.c
index c42316261..8f046baed 100644
--- a/telepathy-glib/media-interfaces.c
+++ b/telepathy-glib/media-interfaces.c
@@ -236,7 +236,7 @@ tp_media_stream_handler_init_known_interfaces (void)
tp_proxy_or_subclass_hook_on_interface_add (tp_type,
tp_cli_media_stream_handler_add_signals);
tp_proxy_subclass_add_error_mapping (tp_type,
- TP_ERROR_PREFIX, TP_ERRORS, TP_TYPE_ERROR);
+ TP_ERROR_PREFIX, TP_ERROR, TP_TYPE_ERROR);
g_once_init_leave (&once, 1);
}
@@ -267,7 +267,7 @@ tp_media_session_handler_init_known_interfaces (void)
tp_proxy_or_subclass_hook_on_interface_add (tp_type,
tp_cli_media_session_handler_add_signals);
tp_proxy_subclass_add_error_mapping (tp_type,
- TP_ERROR_PREFIX, TP_ERRORS, TP_TYPE_ERROR);
+ TP_ERROR_PREFIX, TP_ERROR, TP_TYPE_ERROR);
g_once_init_leave (&once, 1);
}
diff --git a/telepathy-glib/message-mixin.c b/telepathy-glib/message-mixin.c
index c4a46e90c..db0d201f8 100644
--- a/telepathy-glib/message-mixin.c
+++ b/telepathy-glib/message-mixin.c
@@ -417,7 +417,7 @@ tp_message_mixin_acknowledge_pending_messages_async (
if (link_ == NULL)
{
- GError *error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError *error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"invalid message id %u", id);
DEBUG ("%s", error->message);
@@ -554,7 +554,7 @@ tp_message_mixin_get_pending_message_content_async (
if (node == NULL)
{
- GError *error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError *error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"invalid message id %u", message_id);
DEBUG ("%s", error->message);
@@ -571,7 +571,7 @@ tp_message_mixin_get_pending_message_content_async (
if (part == 0 || part >= item->parts->len)
{
- GError *error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError *error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"part number %u out of range", part);
DEBUG ("%s", error->message);
@@ -997,7 +997,7 @@ tp_message_mixin_send_message_async (TpSvcChannelInterfaceMessages *iface,
/* it must have at least a header part */
if (parts->len < 1)
{
- GError e = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError e = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Cannot send a message that does not have at least one part" };
dbus_g_method_return_error (context, &e);
@@ -1012,7 +1012,7 @@ tp_message_mixin_send_message_async (TpSvcChannelInterfaceMessages *iface,
{
if (g_hash_table_lookup (header, *iter) != NULL)
{
- GError *error = g_error_new (TP_ERRORS,
+ GError *error = g_error_new (TP_ERROR,
TP_ERROR_INVALID_ARGUMENT,
"Key '%s' not allowed in a sent message", *iter);
@@ -1026,7 +1026,7 @@ tp_message_mixin_send_message_async (TpSvcChannelInterfaceMessages *iface,
{
if (g_hash_table_lookup (header, *iter) != NULL)
{
- GError *error = g_error_new (TP_ERRORS,
+ GError *error = g_error_new (TP_ERROR,
TP_ERROR_INVALID_ARGUMENT,
"Key '%s' not allowed in a message header", *iter);
@@ -1039,7 +1039,7 @@ tp_message_mixin_send_message_async (TpSvcChannelInterfaceMessages *iface,
{
if (g_hash_table_lookup (header, *iter) != NULL)
{
- GError *error = g_error_new (TP_ERRORS,
+ GError *error = g_error_new (TP_ERROR,
TP_ERROR_INVALID_ARGUMENT,
"Key '%s' not allowed in an outgoing message header", *iter);
@@ -1055,7 +1055,7 @@ tp_message_mixin_send_message_async (TpSvcChannelInterfaceMessages *iface,
if (g_hash_table_lookup (g_ptr_array_index (parts, i), *iter)
!= NULL)
{
- GError *error = g_error_new (TP_ERRORS,
+ GError *error = g_error_new (TP_ERROR,
TP_ERROR_INVALID_ARGUMENT,
"Key '%s' not allowed in a message body", *iter);
diff --git a/telepathy-glib/observe-channels-context.c b/telepathy-glib/observe-channels-context.c
index 0351460c1..038b9d9d8 100644
--- a/telepathy-glib/observe-channels-context.c
+++ b/telepathy-glib/observe-channels-context.c
@@ -107,7 +107,7 @@ tp_observe_channels_context_dispose (GObject *object)
if (self->priv->state == TP_OBSERVE_CHANNELS_CONTEXT_STATE_NONE ||
self->priv->state == TP_OBSERVE_CHANNELS_CONTEXT_STATE_DELAYED)
{
- GError error = { TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ GError error = { TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Disposing the TpObserveChannelsContext" };
WARNING ("Disposing a context in the %s state",
diff --git a/telepathy-glib/presence-mixin.c b/telepathy-glib/presence-mixin.c
index 6b33d7625..7a4e8dcfe 100644
--- a/telepathy-glib/presence-mixin.c
+++ b/telepathy-glib/presence-mixin.c
@@ -661,7 +661,7 @@ tp_presence_mixin_add_status (TpSvcConnectionInterfacePresence *iface,
DBusGMethodInvocation *context)
{
TpBaseConnection *conn = TP_BASE_CONNECTION (iface);
- GError error = { TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ GError error = { TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Only one status is possible at a time with this protocol!" };
DEBUG ("called.");
@@ -786,7 +786,7 @@ check_status_available (GObject *object,
{
if (!mixin_cls->statuses[i].self)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"cannot set status '%s' on yourself",
mixin_cls->statuses[i].name);
return FALSE;
@@ -799,7 +799,7 @@ check_status_available (GObject *object,
case TP_CONNECTION_PRESENCE_TYPE_OFFLINE:
case TP_CONNECTION_PRESENCE_TYPE_UNKNOWN:
case TP_CONNECTION_PRESENCE_TYPE_ERROR:
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"cannot set offline/unknown/error status '%s' on yourself",
mixin_cls->statuses[i].name);
return FALSE;
@@ -814,7 +814,7 @@ check_status_available (GObject *object,
{
DEBUG ("requested status %s is not available",
mixin_cls->statuses[i].name);
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"requested status '%s' is not available on this connection",
mixin_cls->statuses[i].name);
return FALSE;
@@ -971,7 +971,7 @@ tp_presence_mixin_remove_status (TpSvcConnectionInterfacePresence *iface,
}
else
{
- GError nonexistent = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError nonexistent = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Attempting to remove non-existent presence." };
dbus_g_method_return_error (context, &nonexistent);
}
@@ -1057,7 +1057,7 @@ check_for_status (GObject *object, const gchar *status, GError **error)
else
{
DEBUG ("got unknown status identifier %s", status);
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"unknown status identifier: %s", status);
return -1;
}
@@ -1167,7 +1167,7 @@ tp_presence_mixin_set_status (TpSvcConnectionInterfacePresence *iface,
if (!g_hash_table_iter_next (&iter, &key, &value) ||
g_hash_table_iter_next (&iter, NULL, NULL))
{
- GError invalid = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError invalid = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Only one status may be set at a time in this protocol" };
DEBUG ("got more than one status");
dbus_g_method_return_error (context, &invalid);
diff --git a/telepathy-glib/properties-mixin.c b/telepathy-glib/properties-mixin.c
index 38f29a6e3..16160067b 100644
--- a/telepathy-glib/properties-mixin.c
+++ b/telepathy-glib/properties-mixin.c
@@ -331,7 +331,7 @@ tp_properties_mixin_get_properties (GObject *obj,
/* Valid? */
if (prop_id >= mixin_cls->num_props)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"invalid property identifier %d", prop_id);
return FALSE;
@@ -340,7 +340,7 @@ tp_properties_mixin_get_properties (GObject *obj,
/* Permitted? */
if (!tp_properties_mixin_is_readable (obj, prop_id))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_PERMISSION_DENIED,
+ g_set_error (error, TP_ERROR, TP_ERROR_PERMISSION_DENIED,
"permission denied for property identifier %d", prop_id);
return FALSE;
@@ -396,7 +396,7 @@ tp_properties_mixin_set_properties (GObject *obj,
/* Is another SetProperties request already in progress? */
if (ctx->dbus_ctx)
{
- error = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"A SetProperties request is already in progress");
dbus_g_method_return_error (context, error);
g_error_free (error);
@@ -434,7 +434,7 @@ tp_properties_mixin_set_properties (GObject *obj,
if (prop_id >= mixin_cls->num_props)
{
g_boxed_free (G_TYPE_VALUE, prop_val);
- error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"invalid property identifier %d", prop_id);
goto ERROR;
}
@@ -443,7 +443,7 @@ tp_properties_mixin_set_properties (GObject *obj,
if (!tp_properties_mixin_is_writable (obj, prop_id))
{
g_boxed_free (G_TYPE_VALUE, prop_val);
- error = g_error_new (TP_ERRORS, TP_ERROR_PERMISSION_DENIED,
+ error = g_error_new (TP_ERROR, TP_ERROR_PERMISSION_DENIED,
"permission denied for property identifier %d",
prop_id);
goto ERROR;
@@ -454,7 +454,7 @@ tp_properties_mixin_set_properties (GObject *obj,
mixin_cls->signatures[prop_id].type))
{
g_boxed_free (G_TYPE_VALUE, prop_val);
- error = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"incompatible value type for property "
"identifier %d", prop_id);
goto ERROR;
diff --git a/telepathy-glib/protocol.c b/telepathy-glib/protocol.c
index ed1f117fb..3621853f2 100644
--- a/telepathy-glib/protocol.c
+++ b/telepathy-glib/protocol.c
@@ -829,7 +829,7 @@ tp_protocol_init_known_interfaces (void)
tp_proxy_or_subclass_hook_on_interface_add (type,
tp_cli_protocol_add_signals);
tp_proxy_subclass_add_error_mapping (type,
- TP_ERROR_PREFIX, TP_ERRORS, TP_TYPE_ERROR);
+ TP_ERROR_PREFIX, TP_ERROR, TP_TYPE_ERROR);
g_once_init_leave (&once, 1);
}
diff --git a/telepathy-glib/stream-tube-channel.c b/telepathy-glib/stream-tube-channel.c
index 600856011..5ab000d93 100644
--- a/telepathy-glib/stream-tube-channel.c
+++ b/telepathy-glib/stream-tube-channel.c
@@ -833,7 +833,7 @@ tp_stream_tube_channel_accept_async (TpStreamTubeChannel *self,
if (self->priv->access_control_param != NULL)
{
g_simple_async_report_error_in_idle (G_OBJECT (self), callback, user_data,
- TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, "Tube has already be accepted");
+ TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Tube has already be accepted");
return;
}
diff --git a/telepathy-glib/text-channel.c b/telepathy-glib/text-channel.c
index e56664bbb..387bac17f 100644
--- a/telepathy-glib/text-channel.c
+++ b/telepathy-glib/text-channel.c
@@ -649,7 +649,7 @@ get_pending_messages_cb (TpProxy *proxy,
DEBUG ("PendingMessages property is of the wrong type");
g_simple_async_result_set_error (self->priv->pending_messages_result,
- TP_ERRORS, TP_ERROR_CONFUSED,
+ TP_ERROR, TP_ERROR_CONFUSED,
"PendingMessages property is of the wrong type");
g_simple_async_result_complete_in_idle (self->priv->pending_messages_result);
@@ -740,7 +740,7 @@ get_sms_channel_cb (TpProxy *proxy,
{
DEBUG ("SMSChannel property is of the wrong type");
- g_simple_async_result_set_error (result, TP_ERRORS, TP_ERROR_CONFUSED,
+ g_simple_async_result_set_error (result, TP_ERROR, TP_ERROR_CONFUSED,
"SMSChannel property is of the wrong type");
goto out;
}
@@ -1456,7 +1456,7 @@ tp_text_channel_ack_message_async (TpTextChannel *self,
if (!valid)
{
g_simple_async_report_error_in_idle (G_OBJECT (self), callback, user_data,
- TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Message doesn't have a pending-message-id");
return;
diff --git a/telepathy-glib/text-mixin.c b/telepathy-glib/text-mixin.c
index 89bd09fa2..7d6364f95 100644
--- a/telepathy-glib/text-mixin.c
+++ b/telepathy-glib/text-mixin.c
@@ -435,7 +435,7 @@ tp_text_mixin_acknowledge_pending_messages (GObject *obj,
{
DEBUG ("invalid message id %u", id);
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"invalid message id %u", id);
g_free (nodes);
diff --git a/telepathy-glib/util.c b/telepathy-glib/util.c
index 038ff6825..0ee31a3fe 100644
--- a/telepathy-glib/util.c
+++ b/telepathy-glib/util.c
@@ -1799,7 +1799,7 @@ _tp_determine_socket_address_type (GHashTable *supported_sockets,
}
/* This should never happen */
- g_set_error (error, TP_ERRORS,
+ g_set_error (error, TP_ERROR,
TP_ERROR_NOT_IMPLEMENTED, "No supported socket types");
return FALSE;
@@ -1880,7 +1880,7 @@ _tp_determine_access_control_type (GHashTable *supported_sockets,
/* This should never happen */
if (!support_localhost)
{
- g_set_error (error, TP_ERRORS,
+ g_set_error (error, TP_ERROR,
TP_ERROR_NOT_IMPLEMENTED, "No supported access control");
return FALSE;
}
diff --git a/tests/dbus/account-channel-request.c b/tests/dbus/account-channel-request.c
index fb77dae0f..9c9093628 100644
--- a/tests/dbus/account-channel-request.c
+++ b/tests/dbus/account-channel-request.c
@@ -253,7 +253,7 @@ test_handle_create_fail (Test *test,
g_object_unref (req);
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT);
g_assert (test->channel == NULL);
/* The request had the properties we wanted */
@@ -293,7 +293,7 @@ test_handle_proceed_fail (Test *test,
g_object_unref (req);
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT);
g_assert (test->channel == NULL);
/* The request had the properties we wanted */
@@ -328,7 +328,7 @@ test_handle_cr_failed (Test *test,
g_object_unref (req);
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT);
g_assert (test->channel == NULL);
/* The request had the properties we wanted */
@@ -375,7 +375,7 @@ test_ft_props (Test *test,
g_object_unref (req);
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT);
g_assert (test->channel == NULL);
/* The request had the properties we wanted */
@@ -462,7 +462,7 @@ test_handle_ensure_success (Test *test,
g_object_unref (req);
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_NOT_YOURS);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_NOT_YOURS);
g_object_unref (alice);
@@ -528,7 +528,7 @@ test_handle_cancel_after_create (Test *test,
g_object_unref (req);
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_CANCELLED);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_CANCELLED);
}
/* Test if re-handled is properly fired when a channel is
@@ -899,7 +899,7 @@ test_forget_create_fail (Test *test,
g_object_unref (req);
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT);
g_assert (test->channel == NULL);
}
@@ -925,7 +925,7 @@ test_forget_proceed_fail (Test *test,
g_object_unref (req);
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT);
g_assert (test->channel == NULL);
}
@@ -951,7 +951,7 @@ test_forget_cr_failed (Test *test,
g_object_unref (req);
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT);
g_assert (test->channel == NULL);
}
@@ -998,7 +998,7 @@ test_forget_cancel_after_create (Test *test,
g_object_unref (req);
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_CANCELLED);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_CANCELLED);
}
/* Request and observe tests */
@@ -1064,7 +1064,7 @@ test_observe_create_fail (Test *test,
g_object_unref (req);
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT);
g_assert (test->channel == NULL);
}
@@ -1090,7 +1090,7 @@ test_observe_proceed_fail (Test *test,
g_object_unref (req);
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT);
g_assert (test->channel == NULL);
}
@@ -1116,7 +1116,7 @@ test_observe_cr_failed (Test *test,
g_object_unref (req);
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT);
g_assert (test->channel == NULL);
}
@@ -1203,7 +1203,7 @@ test_observe_cancel_after_create (Test *test,
g_object_unref (req);
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_CANCELLED);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_CANCELLED);
}
/* Succeeded is fired but not SucceededWithChannel */
@@ -1224,7 +1224,7 @@ test_observe_no_channel (Test *test,
g_object_unref (req);
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_CONFUSED);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_CONFUSED);
}
int
diff --git a/tests/dbus/account-manager.c b/tests/dbus/account-manager.c
index ea8fc3a26..22de1c59d 100644
--- a/tests/dbus/account-manager.c
+++ b/tests/dbus/account-manager.c
@@ -100,7 +100,7 @@ test_timed_out (gpointer data)
test->prepared = FALSE;
/* Note that this is a completely bogus error, but it only gets returned if
* you comment out the g_assert_not_reached() above. */
- test->error = g_error_new_literal (TP_ERRORS, TP_DBUS_ERROR_INCONSISTENT,
+ test->error = g_error_new_literal (TP_ERROR, TP_DBUS_ERROR_INCONSISTENT,
"timeout");
g_print ("about to quit");
g_main_loop_quit (test->mainloop);
diff --git a/tests/dbus/base-client.c b/tests/dbus/base-client.c
index 4adea3bee..843391510 100644
--- a/tests/dbus/base-client.c
+++ b/tests/dbus/base-client.c
@@ -575,7 +575,7 @@ test_observer (Test *test,
test->wait++;
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT);
g_clear_error (&test->error);
/* The channel being observed is invalidated while preparing */
@@ -1353,7 +1353,7 @@ test_delegate_channels (Test *test,
g_assert_cmpuint (test->delegated->len, ==, 0);
g_assert_cmpuint (g_hash_table_size (test->not_delegated), ==, 1);
error = g_hash_table_lookup (test->not_delegated, test->text_chan_2);
- g_assert_error (error, TP_ERRORS, TP_ERROR_BUSY);
+ g_assert_error (error, TP_ERROR, TP_ERROR_BUSY);
/* Client is still handling the channel */
chans = tp_base_client_get_handled_channels (test->base_client);
diff --git a/tests/dbus/call-cancellation.c b/tests/dbus/call-cancellation.c
index 04e9d8956..d1f15f81c 100644
--- a/tests/dbus/call-cancellation.c
+++ b/tests/dbus/call-cancellation.c
@@ -170,7 +170,7 @@ main (int argc,
char **argv)
{
GObject *b_stub, *i_stub, *j_stub, *k_stub;
- GError err = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, "Because I said so" };
+ GError err = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Because I said so" };
TpProxyPendingCall *pc;
gpointer tmp_obj;
diff --git a/tests/dbus/call-channel.c b/tests/dbus/call-channel.c
index 90b77bc53..7310c0ff1 100644
--- a/tests/dbus/call-channel.c
+++ b/tests/dbus/call-channel.c
@@ -588,7 +588,7 @@ test_basics (Test *test,
/* Calling Accept again makes no sense, but mustn't crash */
tp_call_channel_accept_async (test->call_chan, accept_cb, test);
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_NOT_AVAILABLE);
g_clear_error (&test->error);
/* Wait for the remote contact to answer, if they haven't already */
@@ -597,7 +597,7 @@ test_basics (Test *test,
/* Calling Accept again makes no sense, but mustn't crash */
tp_call_channel_accept_async (test->call_chan, accept_cb, test);
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_NOT_AVAILABLE);
g_clear_error (&test->error);
/* Check the call state. */
diff --git a/tests/dbus/channel-dispatch-operation.c b/tests/dbus/channel-dispatch-operation.c
index ef20c2332..31410ca18 100644
--- a/tests/dbus/channel-dispatch-operation.c
+++ b/tests/dbus/channel-dispatch-operation.c
@@ -515,7 +515,7 @@ channe_lost_cb (TpChannelDispatchOperation *cdo,
tp_proxy_get_object_path (test->text_chan_2));
}
- g_assert_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE);
+ g_assert_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE);
g_error_free (error);
@@ -627,7 +627,7 @@ test_handle_with (Test *test,
"FAIL", handle_with_cb, test);
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT);
g_clear_error (&test->error);
}
diff --git a/tests/dbus/channel-introspect.c b/tests/dbus/channel-introspect.c
index 8c935c3a4..3b56218b7 100644
--- a/tests/dbus/channel-introspect.c
+++ b/tests/dbus/channel-introspect.c
@@ -130,7 +130,7 @@ main (int argc,
gchar *bad_chan_path;
TpHandle handle;
gboolean was_ready;
- GError invalidated_for_test = { TP_ERRORS, TP_ERROR_PERMISSION_DENIED,
+ GError invalidated_for_test = { TP_ERROR, TP_ERROR_PERMISSION_DENIED,
"No channel for you!" };
GHashTable *asv;
GAsyncResult *prepare_result;
@@ -770,7 +770,7 @@ main (int argc,
tp_channel_call_when_ready (chan, channel_ready, &was_ready);
g_assert (was_ready);
- g_assert_error (invalidated, TP_ERRORS, TP_ERROR_CANCELLED);
+ g_assert_error (invalidated, TP_ERROR, TP_ERROR_CANCELLED);
/* is_prepared becomes FALSE because the channel broke */
g_assert_cmpint (tp_proxy_is_prepared (chan, TP_CHANNEL_FEATURE_CORE), ==,
diff --git a/tests/dbus/channel-request.c b/tests/dbus/channel-request.c
index f5083315a..5afe9a633 100644
--- a/tests/dbus/channel-request.c
+++ b/tests/dbus/channel-request.c
@@ -300,7 +300,7 @@ test_failed (Test *test,
tp_tests_proxy_run_until_dbus_queue_processed (test->cr);
g_assert (tp_proxy_get_invalidated (test->cr) != NULL);
- g_assert (tp_proxy_get_invalidated (test->cr)->domain == TP_ERRORS);
+ g_assert (tp_proxy_get_invalidated (test->cr)->domain == TP_ERROR);
g_assert (tp_proxy_get_invalidated (test->cr)->code == TP_ERROR_NOT_YOURS);
g_assert_cmpstr (tp_proxy_get_invalidated (test->cr)->message, ==,
"lalala");
diff --git a/tests/dbus/channel.c b/tests/dbus/channel.c
index bb3235f88..0cec68374 100644
--- a/tests/dbus/channel.c
+++ b/tests/dbus/channel.c
@@ -531,7 +531,7 @@ test_password_provide (Test *test,
test->wait = 1;
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_AUTHENTICATION_FAILED);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_AUTHENTICATION_FAILED);
/* Try the right password */
tp_channel_provide_password_async (test->channel_room, "test",
diff --git a/tests/dbus/cli-group.c b/tests/dbus/cli-group.c
index f1311e967..82a138dac 100644
--- a/tests/dbus/cli-group.c
+++ b/tests/dbus/cli-group.c
@@ -320,8 +320,8 @@ check_invalidated_unknown_error_cb (TpProxy *proxy,
/* Because we didn't understand the D-Bus error string, the Telepathy error
* is derived from the Channel_Group_Change_Reason; since 0.11.5
- * it's remapped into the TP_ERRORS domain if possible */
- g_assert_error (error, TP_ERRORS, TP_ERROR_NO_ANSWER);
+ * it's remapped into the TP_ERROR domain if possible */
+ g_assert_error (error, TP_ERROR, TP_ERROR_NO_ANSWER);
MYASSERT (strstr (message, REMOVED_UNKNOWN_ERROR) != NULL, " (%s, %s)",
message, REMOVED_UNKNOWN_ERROR);
MYASSERT (strstr (message, REMOVED_MESSAGE) != NULL, " (%s, %s)", message,
@@ -411,7 +411,7 @@ check_invalidated_known_error_cb (TpProxy *proxy,
MYASSERT (!*invalidated, "");
*invalidated = TRUE;
- g_assert_error (error, TP_ERRORS, REMOVED_KNOWN_ERROR_CODE);
+ g_assert_error (error, TP_ERROR, REMOVED_KNOWN_ERROR_CODE);
MYASSERT (strstr (message, REMOVED_KNOWN_ERROR_STR) == NULL, " (%s, %s)",
message, REMOVED_KNOWN_ERROR_STR);
MYASSERT (strstr (message, REMOVED_MESSAGE) != NULL, " (%s, %s)", message,
diff --git a/tests/dbus/connection-aliasing.c b/tests/dbus/connection-aliasing.c
index cb158b1d1..3b5e6f89d 100644
--- a/tests/dbus/connection-aliasing.c
+++ b/tests/dbus/connection-aliasing.c
@@ -116,7 +116,7 @@ teardown (Test *test,
tp_tests_connection_assert_disconnect_succeeds (conn);
g_assert (!tp_connection_run_until_ready (conn, FALSE, &error, NULL));
- g_assert_error (error, TP_ERRORS, TP_ERROR_CANCELLED);
+ g_assert_error (error, TP_ERROR, TP_ERROR_CANCELLED);
g_clear_error (&error);
test->service_conn_as_base = NULL;
diff --git a/tests/dbus/connection-balance.c b/tests/dbus/connection-balance.c
index a21f248f7..3140e404f 100644
--- a/tests/dbus/connection-balance.c
+++ b/tests/dbus/connection-balance.c
@@ -262,7 +262,7 @@ teardown (Test *test,
tp_tests_connection_assert_disconnect_succeeds (conn);
g_assert (!tp_connection_run_until_ready (conn, FALSE, &error, NULL));
- g_assert_error (error, TP_ERRORS, TP_ERROR_CANCELLED);
+ g_assert_error (error, TP_ERROR, TP_ERROR_CANCELLED);
g_clear_error (&error);
test->service_conn_as_base = NULL;
diff --git a/tests/dbus/connection-bug-18845.c b/tests/dbus/connection-bug-18845.c
index eabad320c..88a308114 100644
--- a/tests/dbus/connection-bug-18845.c
+++ b/tests/dbus/connection-bug-18845.c
@@ -47,7 +47,7 @@ main (int argc,
tp_tests_abort_after (10);
g_type_init ();
- invalidated_for_test.domain = TP_ERRORS;
+ invalidated_for_test.domain = TP_ERROR;
tp_debug_set_flags ("all");
mainloop = g_main_loop_new (NULL, FALSE);
diff --git a/tests/dbus/connection-error.c b/tests/dbus/connection-error.c
index c60218375..1ade331a8 100644
--- a/tests/dbus/connection-error.c
+++ b/tests/dbus/connection-error.c
@@ -261,7 +261,7 @@ test_unregistered_error (Test *test,
/* Because we didn't understand net.example.WTF as a GError, TpConnection
* falls back to turning the Connection_Status_Reason into a GError. */
- g_assert_error (error, TP_ERRORS, TP_ERROR_NETWORK_ERROR);
+ g_assert_error (error, TP_ERROR, TP_ERROR_NETWORK_ERROR);
g_assert_cmpstr (tp_connection_get_detailed_error (test->conn, NULL), ==,
"net.example.WTF");
diff --git a/tests/dbus/connection-getinterfaces-failure.c b/tests/dbus/connection-getinterfaces-failure.c
index 35f181956..4d3494a07 100644
--- a/tests/dbus/connection-getinterfaces-failure.c
+++ b/tests/dbus/connection-getinterfaces-failure.c
@@ -45,7 +45,7 @@ static void
bug15306_get_interfaces (TpSvcConnection *iface,
DBusGMethodInvocation *context)
{
- GError e = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "testing fd.o #15306" };
+ GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE, "testing fd.o #15306" };
dbus_g_method_return_error (context, &e);
}
diff --git a/tests/dbus/connection-interests.c b/tests/dbus/connection-interests.c
index 7971692a9..c850e555c 100644
--- a/tests/dbus/connection-interests.c
+++ b/tests/dbus/connection-interests.c
@@ -238,7 +238,7 @@ teardown (Test *test,
tp_tests_connection_assert_disconnect_succeeds (conn);
g_assert (!tp_connection_run_until_ready (conn, FALSE, &error, NULL));
- g_assert_error (error, TP_ERRORS, TP_ERROR_CANCELLED);
+ g_assert_error (error, TP_ERROR, TP_ERROR_CANCELLED);
g_clear_error (&error);
test->service_conn_as_base = NULL;
diff --git a/tests/dbus/connection.c b/tests/dbus/connection.c
index 67396b147..fca25664c 100644
--- a/tests/dbus/connection.c
+++ b/tests/dbus/connection.c
@@ -55,7 +55,7 @@ setup (Test *test,
{
GError *error = NULL;
- invalidated_for_test.domain = TP_ERRORS;
+ invalidated_for_test.domain = TP_ERROR;
g_type_init ();
tp_debug_set_flags ("all");
@@ -101,7 +101,7 @@ teardown (Test *test,
tp_tests_connection_assert_disconnect_succeeds (conn);
g_assert (!tp_connection_run_until_ready (conn, FALSE, &error, NULL));
- g_assert_error (error, TP_ERRORS, TP_ERROR_CANCELLED);
+ g_assert_error (error, TP_ERROR, TP_ERROR_CANCELLED);
g_clear_error (&error);
test->service_conn_as_base = NULL;
@@ -297,7 +297,7 @@ test_fail_to_prepare (Test *test,
g_assert (!tp_proxy_prepare_finish (test->conn, test->prepare_result,
&error));
- g_assert_error (error, TP_ERRORS, TP_ERROR_PERMISSION_DENIED);
+ g_assert_error (error, TP_ERROR, TP_ERROR_PERMISSION_DENIED);
g_clear_error (&error);
g_object_unref (test->prepare_result);
test->prepare_result = NULL;
@@ -315,7 +315,7 @@ test_fail_to_prepare (Test *test,
g_assert (!tp_proxy_prepare_finish (test->conn, test->prepare_result,
&error));
- g_assert_error (error, TP_ERRORS, TP_ERROR_PERMISSION_DENIED);
+ g_assert_error (error, TP_ERROR, TP_ERROR_PERMISSION_DENIED);
g_clear_error (&error);
g_object_unref (test->prepare_result);
test->prepare_result = NULL;
diff --git a/tests/dbus/contact-lists.c b/tests/dbus/contact-lists.c
index f13351d4f..49eeb672b 100644
--- a/tests/dbus/contact-lists.c
+++ b/tests/dbus/contact-lists.c
@@ -477,7 +477,7 @@ teardown (Test *test,
g_assert_no_error (error);
tp_tests_connection_assert_disconnect_succeeds (conn);
g_assert (!tp_connection_run_until_ready (conn, FALSE, &error, NULL));
- g_assert_error (error, TP_ERRORS, TP_ERROR_CANCELLED);
+ g_assert_error (error, TP_ERROR, TP_ERROR_CANCELLED);
g_clear_error (&error);
tp_clear_pointer (&test->contact_attributes, g_hash_table_unref);
@@ -2087,7 +2087,7 @@ test_remove_group (Test *test,
{
/* The old API can't remove non-empty groups... */
tp_cli_channel_run_close (test->group, -1, &error, NULL);
- g_assert_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE);
+ g_assert_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE);
g_assert_cmpuint (test->log->len, ==, 0);
}
@@ -2334,7 +2334,7 @@ test_rename_group_overwrite (Test *test,
tp_cli_connection_interface_contact_groups_run_rename_group (test->conn,
-1, "Cambridge", "Montreal", &error, NULL);
- g_assert_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE);
+ g_assert_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE);
g_assert_cmpuint (test->log->len, ==, 0);
g_clear_error (&error);
}
@@ -2347,7 +2347,7 @@ test_rename_group_absent (Test *test,
tp_cli_connection_interface_contact_groups_run_rename_group (test->conn,
-1, "Badgers", "Mushrooms", &error, NULL);
- g_assert_error (error, TP_ERRORS, TP_ERROR_DOES_NOT_EXIST);
+ g_assert_error (error, TP_ERROR, TP_ERROR_DOES_NOT_EXIST);
g_assert_cmpuint (test->log->len, ==, 0);
g_clear_error (&error);
}
@@ -2584,7 +2584,7 @@ request_blocked_contacts_failed_cb (
gpointer user_data,
GObject *weak_object)
{
- g_assert_error (error, TP_ERRORS, TP_ERROR_DISCONNECTED);
+ g_assert_error (error, TP_ERROR, TP_ERROR_DISCONNECTED);
}
static void
@@ -2661,7 +2661,7 @@ download_contacts_cb (
const GError *error, gpointer user_data,
GObject *weak_object)
{
- g_assert_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED);
+ g_assert_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED);
}
static void
diff --git a/tests/dbus/disconnection.c b/tests/dbus/disconnection.c
index 9610bfe36..bfa55cb2b 100644
--- a/tests/dbus/disconnection.c
+++ b/tests/dbus/disconnection.c
@@ -158,7 +158,7 @@ main (int argc,
{
GObject *stub;
GError *error_out = NULL;
- GError err = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, "Because I said so" };
+ GError err = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Because I said so" };
TpProxySignalConnection *sc;
gpointer tmp_obj;
gboolean freed = FALSE;
diff --git a/tests/dbus/error-enum.c b/tests/dbus/error-enum.c
index 8ead3925a..ef4cd1d31 100644
--- a/tests/dbus/error-enum.c
+++ b/tests/dbus/error-enum.c
@@ -14,7 +14,7 @@ main (int argc,
{
g_test_init (&argc, &argv, NULL);
- g_test_add_func ("/test-error-enum/TP_ERRORS", test_tp_errors);
+ g_test_add_func ("/test-error-enum/TP_ERROR", test_tp_errors);
return g_test_run ();
}
diff --git a/tests/dbus/example-no-protocols.c b/tests/dbus/example-no-protocols.c
index 3eb2f2a7c..4a076f5e6 100644
--- a/tests/dbus/example-no-protocols.c
+++ b/tests/dbus/example-no-protocols.c
@@ -58,7 +58,7 @@ connection_manager_got_info (TpConnectionManager *cm,
"jabber", empty, &bus_name, &object_path, &error, NULL);
g_assert (error != NULL);
- g_assert (error->domain == TP_ERRORS);
+ g_assert (error->domain == TP_ERROR);
g_assert (error->code == TP_ERROR_NOT_IMPLEMENTED);
g_error_free (error);
diff --git a/tests/dbus/finalized-in-invalidated-handler.c b/tests/dbus/finalized-in-invalidated-handler.c
index ef472852b..03f7d6635 100644
--- a/tests/dbus/finalized-in-invalidated-handler.c
+++ b/tests/dbus/finalized-in-invalidated-handler.c
@@ -34,7 +34,7 @@ on_invalidated (TpChannel *chan,
{
TpChannel **client = user_data;
- MYASSERT (domain == TP_ERRORS, ": domain \"%s\"",
+ MYASSERT (domain == TP_ERROR, ": domain \"%s\"",
g_quark_to_string (domain));
MYASSERT (code == TP_ERROR_CANCELLED, ": code %u", code);
diff --git a/tests/dbus/get-interface-after-invalidate.c b/tests/dbus/get-interface-after-invalidate.c
index a9f8233f9..08adf6b7c 100644
--- a/tests/dbus/get-interface-after-invalidate.c
+++ b/tests/dbus/get-interface-after-invalidate.c
@@ -12,7 +12,7 @@ test_get_interface_after_invalidate (void)
{
TpDBusDaemon *bus_daemon;
DBusGProxy *props;
- GError invalidation_reason = { TP_ERRORS, TP_ERROR_NOT_YOURS, "bees!" };
+ GError invalidation_reason = { TP_ERROR, TP_ERROR_NOT_YOURS, "bees!" };
GError *error = NULL;
bus_daemon = tp_tests_dbus_daemon_dup_or_die ();
diff --git a/tests/dbus/message-mixin.c b/tests/dbus/message-mixin.c
index a96f0b697..22bc33d40 100644
--- a/tests/dbus/message-mixin.c
+++ b/tests/dbus/message-mixin.c
@@ -973,7 +973,7 @@ main (int argc,
ids, &error, NULL),
"");
MYASSERT (error != NULL, "");
- MYASSERT (error->domain == TP_ERRORS, "%s",
+ MYASSERT (error->domain == TP_ERROR, "%s",
g_quark_to_string (error->domain));
MYASSERT (error->code == TP_ERROR_INVALID_ARGUMENT, "%u", error->code);
g_error_free (error);
diff --git a/tests/dbus/room-list.c b/tests/dbus/room-list.c
index 52e466d1f..0b1be2232 100644
--- a/tests/dbus/room-list.c
+++ b/tests/dbus/room-list.c
@@ -261,7 +261,7 @@ test_list_room_fails (Test *test,
test->wait = 1;
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_SERVICE_CONFUSED);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_SERVICE_CONFUSED);
/* We don't want the 'failed' cb be called when disconnecting the
* connection */
diff --git a/tests/dbus/self-presence.c b/tests/dbus/self-presence.c
index fbe9d306e..c9ed4730a 100644
--- a/tests/dbus/self-presence.c
+++ b/tests/dbus/self-presence.c
@@ -86,7 +86,7 @@ test_simple_presence (TpTestsContactsConnection *service_conn,
MYASSERT (!tp_cli_connection_interface_simple_presence_run_set_presence (
client_conn, -1, "offline", "", &error, NULL), "");
g_assert_cmpstr (g_quark_to_string (error->domain), ==,
- g_quark_to_string (TP_ERRORS));
+ g_quark_to_string (TP_ERROR));
g_error_free (error);
error = NULL;
@@ -200,7 +200,7 @@ test_complex_presence (TpTestsContactsConnection *service_conn,
MYASSERT (!tp_cli_connection_interface_presence_run_set_status (
client_conn, -1, monster, &error, NULL), "");
g_assert_cmpstr (g_quark_to_string (error->domain), ==,
- g_quark_to_string (TP_ERRORS));
+ g_quark_to_string (TP_ERROR));
g_error_free (error);
error = NULL;
diff --git a/tests/dbus/simple-approver.c b/tests/dbus/simple-approver.c
index e3025936c..62d50f565 100644
--- a/tests/dbus/simple-approver.c
+++ b/tests/dbus/simple-approver.c
@@ -461,7 +461,7 @@ add_dispatch_fail (
TpAddDispatchOperationContext *context,
gpointer user_data)
{
- GError error = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError error = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"No AddDispatchOperation for you!" };
tp_add_dispatch_operation_context_fail (context, &error);
@@ -480,7 +480,7 @@ test_fail (Test *test,
g_assert_no_error (test->error);
call_add_dispatch (test);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_NOT_AVAILABLE);
}
int
diff --git a/tests/dbus/simple-handler.c b/tests/dbus/simple-handler.c
index 5b694947c..69a69baf5 100644
--- a/tests/dbus/simple-handler.c
+++ b/tests/dbus/simple-handler.c
@@ -477,7 +477,7 @@ handle_channels_fail (
TpHandleChannelsContext *context,
gpointer user_data)
{
- GError error = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError error = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"No HandleChannels for you!" };
tp_handle_channels_context_fail (context, &error);
@@ -496,7 +496,7 @@ test_fail (Test *test,
g_assert_no_error (test->error);
call_handle_channels (test);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_NOT_AVAILABLE);
}
int
diff --git a/tests/dbus/simple-observer.c b/tests/dbus/simple-observer.c
index 8e9939e26..522667603 100644
--- a/tests/dbus/simple-observer.c
+++ b/tests/dbus/simple-observer.c
@@ -443,7 +443,7 @@ observe_channels_fail (
TpObserveChannelsContext *context,
gpointer user_data)
{
- GError error = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError error = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"No ObserveChannels for you!" };
tp_observe_channels_context_fail (context, &error);
@@ -462,7 +462,7 @@ test_fail (Test *test,
g_assert_no_error (test->error);
call_observe_channels (test);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_NOT_AVAILABLE);
}
int
diff --git a/tests/dbus/stream-tube.c b/tests/dbus/stream-tube.c
index df758188c..f5b46b915 100644
--- a/tests/dbus/stream-tube.c
+++ b/tests/dbus/stream-tube.c
@@ -644,7 +644,7 @@ test_accept_twice (Test *test,
tp_stream_tube_channel_accept_async (test->tube, tube_accept_cb, test);
test->wait = 1;
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT);
}
static void
@@ -659,7 +659,7 @@ test_accept_outgoing (Test *test,
test->wait = 1;
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT);
}
typedef void (*TestFunc) (Test *, gconstpointer);
diff --git a/tests/dbus/text-mixin.c b/tests/dbus/text-mixin.c
index 9d6d4c529..b4f494e10 100644
--- a/tests/dbus/text-mixin.c
+++ b/tests/dbus/text-mixin.c
@@ -246,7 +246,7 @@ main (int argc,
ids, &error, NULL),
"");
MYASSERT (error != NULL, "");
- MYASSERT (error->domain == TP_ERRORS, "%s",
+ MYASSERT (error->domain == TP_ERROR, "%s",
g_quark_to_string (error->domain));
MYASSERT (error->code == TP_ERROR_INVALID_ARGUMENT, "%u", error->code);
g_error_free (error);
diff --git a/tests/dbus/unsupported-interface.c b/tests/dbus/unsupported-interface.c
index 56a2d3068..e459e6206 100644
--- a/tests/dbus/unsupported-interface.c
+++ b/tests/dbus/unsupported-interface.c
@@ -232,7 +232,7 @@ teardown (Fixture *f,
tp_tests_connection_assert_disconnect_succeeds (conn);
tp_tests_proxy_run_until_prepared_or_failed (conn, NULL, &f->error);
- g_assert_error (f->error, TP_ERRORS, TP_ERROR_CANCELLED);
+ g_assert_error (f->error, TP_ERROR, TP_ERROR_CANCELLED);
g_clear_error (&f->error);
g_object_unref (conn);
diff --git a/tests/lib/echo-conn.c b/tests/lib/echo-conn.c
index d9a01dc71..963363e02 100644
--- a/tests/lib/echo-conn.c
+++ b/tests/lib/echo-conn.c
@@ -113,7 +113,7 @@ tp_tests_echo_normalize_contact (TpHandleRepoIface *repo,
if (id[0] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"ID must not be empty");
return NULL;
}
diff --git a/tests/lib/echo-im-manager.c b/tests/lib/echo-im-manager.c
index 437eb628e..1810f9264 100644
--- a/tests/lib/echo-im-manager.c
+++ b/tests/lib/echo-im-manager.c
@@ -327,7 +327,7 @@ tp_tests_echo_im_manager_request (TpTestsEchoImManager *self,
}
else if (require_new)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"An echo channel to contact #%u already exists", handle);
goto error;
}
diff --git a/tests/lib/file-transfer-chan.c b/tests/lib/file-transfer-chan.c
index aff2dab9d..36c10ddfd 100644
--- a/tests/lib/file-transfer-chan.c
+++ b/tests/lib/file-transfer-chan.c
@@ -443,7 +443,7 @@ file_transfer_provide_file (TpSvcChannelTypeFileTransfer *iface,
if (tp_base_channel_is_requested (base_chan) != TRUE)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"File transfer is not outgoing. Cannot offer file");
goto fail;
}
@@ -451,21 +451,21 @@ file_transfer_provide_file (TpSvcChannelTypeFileTransfer *iface,
if (self->priv->state != TP_FILE_TRANSFER_STATE_PENDING &&
self->priv->state != TP_FILE_TRANSFER_STATE_ACCEPTED)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"File transfer is not pending or accepted. Cannot offer file");
goto fail;
}
if (self->priv->address != 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");
goto fail;
}
if (!check_address_type (self, address_type, access_control))
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Address type %i is not supported with access control %i",
address_type, access_control);
goto fail;
@@ -476,7 +476,7 @@ file_transfer_provide_file (TpSvcChannelTypeFileTransfer *iface,
if (self->priv->address == NULL)
{
- 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");
goto fail;
}
@@ -517,21 +517,21 @@ file_transfer_accept_file (TpSvcChannelTypeFileTransfer *iface,
if (tp_base_channel_is_requested (base_chan) == TRUE)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"File transfer is not incoming. Cannot accept file");
goto fail;
}
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,
"File transfer is not in the pending state");
goto fail;
}
if (!check_address_type (self, address_type, access_control))
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Address type %i is not supported with access control %i",
address_type, access_control);
goto fail;
diff --git a/tests/lib/my-conn-proxy.c b/tests/lib/my-conn-proxy.c
index d7748f355..688ac14d7 100644
--- a/tests/lib/my-conn-proxy.c
+++ b/tests/lib/my-conn-proxy.c
@@ -110,7 +110,7 @@ prepare_fail_async (TpProxy *proxy,
g_assert (tp_proxy_is_prepared (proxy, TP_TESTS_MY_CONN_PROXY_FEATURE_CORE));
result = g_simple_async_result_new_error ((GObject *) proxy, callback,
- user_data, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ user_data, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"No feature for you!");
g_simple_async_result_complete_in_idle (result);
@@ -132,7 +132,7 @@ prepare_retry_async (TpProxy *proxy,
if (!self->retry_feature_success)
{
/* Fail the first time we try to prepare the feature */
- g_simple_async_result_set_error (result, TP_ERRORS,
+ g_simple_async_result_set_error (result, TP_ERROR,
TP_ERROR_NOT_YET, "Nah");
}
diff --git a/tests/lib/params-cm.c b/tests/lib/params-cm.c
index bff214c72..42b49b787 100644
--- a/tests/lib/params-cm.c
+++ b/tests/lib/params-cm.c
@@ -78,7 +78,7 @@ filter_string_ascii_case (const TpCMParamSpec *param_spec,
if (c < 0 || c > 127) /* char might be signed or unsigned */
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"%s must be ASCII", param_spec->name);
return FALSE;
}
@@ -162,7 +162,7 @@ new_connection (TpBaseConnectionManager *self,
gpointer parsed_params,
GError **error)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"No connection for you");
return NULL;
}
diff --git a/tests/lib/room-list-chan.c b/tests/lib/room-list-chan.c
index 2b3a303f1..49ed291ab 100644
--- a/tests/lib/room-list-chan.c
+++ b/tests/lib/room-list-chan.c
@@ -216,7 +216,7 @@ room_list_list_rooms (TpSvcChannelTypeRoomList *chan,
if (self->priv->listing)
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Already listing" };
dbus_g_method_return_error (context, &error);
@@ -225,7 +225,7 @@ room_list_list_rooms (TpSvcChannelTypeRoomList *chan,
if (!tp_strdiff (self->priv->server, "ListRoomsFail"))
{
- GError error = { TP_ERRORS, TP_ERROR_SERVICE_CONFUSED,
+ GError error = { TP_ERROR, TP_ERROR_SERVICE_CONFUSED,
"Computer says no" };
dbus_g_method_return_error (context, &error);
diff --git a/tests/lib/simple-channel-dispatch-operation.c b/tests/lib/simple-channel-dispatch-operation.c
index de29c88d9..df7f491b4 100644
--- a/tests/lib/simple-channel-dispatch-operation.c
+++ b/tests/lib/simple-channel-dispatch-operation.c
@@ -66,7 +66,7 @@ tp_tests_simple_channel_dispatch_operation_handle_with (
{
if (!tp_strdiff (handler, "FAIL"))
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, "Nope" };
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Nope" };
dbus_g_method_return_error (context, &error);
return;
diff --git a/tests/lib/simple-channel-dispatcher.c b/tests/lib/simple-channel-dispatcher.c
index ca4ac83c8..116df9a02 100644
--- a/tests/lib/simple-channel-dispatcher.c
+++ b/tests/lib/simple-channel-dispatcher.c
@@ -137,7 +137,7 @@ create_channel (TpTestsSimpleChannelDispatcher *self,
if (tp_asv_get_boolean (request, "CreateChannelFail", NULL))
{
/* Fail to create the channel */
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Computer says no" };
dbus_g_method_return_error (context, &error);
diff --git a/tests/lib/simple-channel-request.c b/tests/lib/simple-channel-request.c
index 8bf418c54..0f587a528 100644
--- a/tests/lib/simple-channel-request.c
+++ b/tests/lib/simple-channel-request.c
@@ -172,7 +172,7 @@ tp_tests_simple_channel_request_proceed (TpSvcChannelRequest *request,
if (tp_asv_get_boolean (req, "ProceedFail", NULL))
{
/* We have been asked to fail */
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Computer says no" };
dbus_g_method_return_error (context, &error);
diff --git a/tests/lib/simple-client.c b/tests/lib/simple-client.c
index 8d3778bb3..15da26bb1 100644
--- a/tests/lib/simple-client.c
+++ b/tests/lib/simple-client.c
@@ -55,7 +55,7 @@ simple_observe_channels (
if (fail)
{
- GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError error = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"No observation for you!" };
tp_observe_channels_context_fail (context, &error);
diff --git a/tests/lib/simple-conn.c b/tests/lib/simple-conn.c
index 5478a17cf..8874654c0 100644
--- a/tests/lib/simple-conn.c
+++ b/tests/lib/simple-conn.c
@@ -181,14 +181,14 @@ tp_tests_simple_normalize_contact (TpHandleRepoIface *repo,
{
if (id[0] == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"ID must not be empty");
return NULL;
}
if (strchr (id, ' ') != NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"ID must not contain spaces");
return NULL;
}
diff --git a/tests/lib/stream-tube-chan.c b/tests/lib/stream-tube-chan.c
index a965eaec5..95388d013 100644
--- a/tests/lib/stream-tube-chan.c
+++ b/tests/lib/stream-tube-chan.c
@@ -378,14 +378,14 @@ stream_tube_offer (TpSvcChannelTypeStreamTube *iface,
if (self->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");
goto fail;
}
if (!check_address_type (self, address_type, access_control))
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Address type not supported with this access control");
goto fail;
}
@@ -469,14 +469,14 @@ stream_tube_accept (TpSvcChannelTypeStreamTube *iface,
if (self->priv->state != TP_TUBE_CHANNEL_STATE_LOCAL_PENDING)
{
- 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 local pending state");
goto fail;
}
if (!check_address_type (self, address_type, access_control))
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Address type not supported with this access control");
goto fail;
}