summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-06-27 16:05:24 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-08-06 19:33:43 +0100
commite6fce7fde902d3f9237c724d735a4a93dab1468d (patch)
tree68f3e16526599e20443ae97353c822121ae8bd14
parentfaca647862a9657ae818ac2f38283892140e05f0 (diff)
Avoid TP_ERRORS
Reviewed-by: Olli Salli <olli.salli@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=53160
-rw-r--r--gabble/message-channel.c22
-rw-r--r--gabble/status.c4
-rw-r--r--mission-control/mcp-account-manager-ytstenut.c2
-rw-r--r--plugin-base/channel-manager.c6
-rw-r--r--plugin-base/ytstenut.c2
-rw-r--r--salut/message-channel.c22
-rw-r--r--salut/status.c4
7 files changed, 31 insertions, 31 deletions
diff --git a/gabble/message-channel.c b/gabble/message-channel.c
index b20ce2b..1133969 100644
--- a/gabble/message-channel.c
+++ b/gabble/message-channel.c
@@ -576,14 +576,14 @@ ytst_message_channel_request (TpYtsSvcChannel *channel,
/* Can't call this method from this side */
if (!tp_base_channel_is_requested (TP_BASE_CHANNEL (channel)))
{
- g_set_error_literal (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error_literal (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Request() may not be called on the reply side of a channel");
goto done;
}
if (priv->requested)
{
- g_set_error_literal (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error_literal (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Request() has already been called");
dbus_g_method_return_error (context, error);
g_clear_error (&error);
@@ -629,7 +629,7 @@ ytst_message_channel_reply (TpYtsSvcChannel *channel,
/* Can't call this method from this side */
if (tp_base_channel_is_requested (TP_BASE_CHANNEL (channel)))
{
- g_set_error_literal (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error_literal (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Reply() may not be called on the request side of a channel");
goto done;
}
@@ -698,7 +698,7 @@ ytst_message_channel_fail (TpYtsSvcChannel *channel,
/* Can't call this method from this side */
if (tp_base_channel_is_requested (TP_BASE_CHANNEL (channel)))
{
- g_set_error_literal (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error_literal (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Fail() may not be called on the request side of a channel");
goto done;
}
@@ -706,7 +706,7 @@ ytst_message_channel_fail (TpYtsSvcChannel *channel,
/* Can't call this after a successful call */
if (priv->replied)
{
- g_set_error_literal (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error_literal (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Fail() or Reply() has already been called");
goto done;
}
@@ -716,7 +716,7 @@ ytst_message_channel_fail (TpYtsSvcChannel *channel,
ytst_message_error_type_to_wocky (error_type));
if (type == NULL)
{
- g_set_error_literal (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error_literal (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"ErrorType is set to an invalid value.");
goto done;
}
@@ -821,7 +821,7 @@ ytst_message_channel_build_request (GHashTable *request_props,
sub_type = WOCKY_STANZA_SUB_TYPE_SET;
break;
default:
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The RequestType property is invalid.");
return NULL;
}
@@ -830,14 +830,14 @@ ytst_message_channel_build_request (GHashTable *request_props,
TP_YTS_IFACE_CHANNEL ".TargetService");
if (target_service == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The TargetService property must be set.");
return NULL;
}
else if (!tp_dbus_check_valid_bus_name (target_service,
TP_DBUS_NAME_TYPE_WELL_KNOWN, NULL))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The TargetService property has an invalid syntax.");
return NULL;
}
@@ -846,7 +846,7 @@ ytst_message_channel_build_request (GHashTable *request_props,
TP_YTS_IFACE_CHANNEL ".InitiatorService");
if (initiator_service == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The InitiatorService property must be set.");
return NULL;
}
@@ -864,7 +864,7 @@ ytst_message_channel_build_request (GHashTable *request_props,
if (!attributes && tp_asv_lookup (request_props,
TP_YTS_IFACE_CHANNEL ".RequestAttributes"))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The RequestAttributes property is invalid.");
return NULL;
}
diff --git a/gabble/status.c b/gabble/status.c
index a0e445f..8b254f6 100644
--- a/gabble/status.c
+++ b/gabble/status.c
@@ -697,14 +697,14 @@ ytst_status_advertise_status (TpYtsSvcStatus *svc,
if (tp_str_empty (capability))
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Capability argument must be set");
goto out;
}
if (tp_str_empty (service_name))
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Service name argument must be set");
goto out;
}
diff --git a/mission-control/mcp-account-manager-ytstenut.c b/mission-control/mcp-account-manager-ytstenut.c
index 1e8a335..188f934 100644
--- a/mission-control/mcp-account-manager-ytstenut.c
+++ b/mission-control/mcp-account-manager-ytstenut.c
@@ -579,7 +579,7 @@ mcp_account_manager_ytstenut_release (TpYtsSvcAccountManager *manager,
else
{
DEBUG ("Caller called Release() without Hold()");
- error = g_error_new_literal (TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ error = g_error_new_literal (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"The Hold() method must be called successfully by this caller before "
"calling Release().");
dbus_g_method_return_error (context, error);
diff --git a/plugin-base/channel-manager.c b/plugin-base/channel-manager.c
index e92441b..a02b578 100644
--- a/plugin-base/channel-manager.c
+++ b/plugin-base/channel-manager.c
@@ -481,7 +481,7 @@ ytst_channel_manager_create_channel (TpChannelManager *manager,
contact = wocky_contact_factory_lookup_ll_contact (factory, name);
if (contact == NULL)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"%s is not online", name);
goto error;
}
@@ -489,7 +489,7 @@ ytst_channel_manager_create_channel (TpChannelManager *manager,
if (tp_asv_get_string (request_properties,
TP_YTS_IFACE_CHANNEL ".TargetService") == NULL)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The TargetService property must be set.");
goto error;
}
@@ -504,7 +504,7 @@ ytst_channel_manager_create_channel (TpChannelManager *manager,
if (resource == NULL)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Cannot find appropriate resource for contact.");
goto error;
}
diff --git a/plugin-base/ytstenut.c b/plugin-base/ytstenut.c
index 1b75e11..c792574 100644
--- a/plugin-base/ytstenut.c
+++ b/plugin-base/ytstenut.c
@@ -108,7 +108,7 @@ ytstenut_plugin_create_sidecar_async (
}
else
{
- g_simple_async_result_set_error (result, TP_ERRORS,
+ g_simple_async_result_set_error (result, TP_ERROR,
TP_ERROR_NOT_IMPLEMENTED, "'%s' not implemented", sidecar_interface);
}
diff --git a/salut/message-channel.c b/salut/message-channel.c
index 8313bda..31a9bcc 100644
--- a/salut/message-channel.c
+++ b/salut/message-channel.c
@@ -573,14 +573,14 @@ ytst_message_channel_request (TpYtsSvcChannel *channel,
/* Can't call this method from this side */
if (!tp_base_channel_is_requested (TP_BASE_CHANNEL (channel)))
{
- g_set_error_literal (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error_literal (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Request() may not be called on the reply side of a channel");
goto done;
}
if (priv->requested)
{
- g_set_error_literal (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error_literal (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Request() has already been called");
dbus_g_method_return_error (context, error);
g_clear_error (&error);
@@ -626,7 +626,7 @@ ytst_message_channel_reply (TpYtsSvcChannel *channel,
/* Can't call this method from this side */
if (tp_base_channel_is_requested (TP_BASE_CHANNEL (channel)))
{
- g_set_error_literal (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error_literal (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Reply() may not be called on the request side of a channel");
goto done;
}
@@ -695,7 +695,7 @@ ytst_message_channel_fail (TpYtsSvcChannel *channel,
/* Can't call this method from this side */
if (tp_base_channel_is_requested (TP_BASE_CHANNEL (channel)))
{
- g_set_error_literal (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error_literal (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Fail() may not be called on the request side of a channel");
goto done;
}
@@ -703,7 +703,7 @@ ytst_message_channel_fail (TpYtsSvcChannel *channel,
/* Can't call this after a successful call */
if (priv->replied)
{
- g_set_error_literal (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error_literal (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Fail() or Reply() has already been called");
goto done;
}
@@ -713,7 +713,7 @@ ytst_message_channel_fail (TpYtsSvcChannel *channel,
ytst_message_error_type_to_wocky (error_type));
if (type == NULL)
{
- g_set_error_literal (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error_literal (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"ErrorType is set to an invalid value.");
goto done;
}
@@ -818,7 +818,7 @@ ytst_message_channel_build_request (GHashTable *request_props,
sub_type = WOCKY_STANZA_SUB_TYPE_SET;
break;
default:
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The RequestType property is invalid.");
return NULL;
}
@@ -827,14 +827,14 @@ ytst_message_channel_build_request (GHashTable *request_props,
TP_YTS_IFACE_CHANNEL ".TargetService");
if (target_service == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The TargetService property must be set.");
return NULL;
}
else if (!tp_dbus_check_valid_bus_name (target_service,
TP_DBUS_NAME_TYPE_WELL_KNOWN, NULL))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The TargetService property has an invalid syntax.");
return NULL;
}
@@ -843,7 +843,7 @@ ytst_message_channel_build_request (GHashTable *request_props,
TP_YTS_IFACE_CHANNEL ".InitiatorService");
if (initiator_service == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The InitiatorService property must be set.");
return NULL;
}
@@ -861,7 +861,7 @@ ytst_message_channel_build_request (GHashTable *request_props,
if (!attributes && tp_asv_lookup (request_props,
TP_YTS_IFACE_CHANNEL ".RequestAttributes"))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The RequestAttributes property is invalid.");
return NULL;
}
diff --git a/salut/status.c b/salut/status.c
index 5379685..d628308 100644
--- a/salut/status.c
+++ b/salut/status.c
@@ -664,14 +664,14 @@ ytst_status_advertise_status (TpYtsSvcStatus *svc,
if (tp_str_empty (capability))
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Capability argument must be set");
goto out;
}
if (tp_str_empty (service_name))
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Service name argument must be set");
goto out;
}