summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2014-03-18 18:15:25 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2014-03-24 18:07:06 +0000
commitcacfee38ef48a817de1dd366790b6c85a63bfc8f (patch)
tree2c6402ba6d8b8c7fbac5b8c17c9835effec484ee
parent679703dcac7bad0d5a34de9215f922de191de12e (diff)
Replace dbus_g_method_return_error with g_dbus_method_invocation_return_gerror
Excluding glib-ginterface-gen.py. Automated: git grep -lz dbus_g_method_return_error | xargs -0 perl -pi -e 's/\bdbus_g_method_return_error\b/g_dbus_method_invocation_return_gerror/g'
-rw-r--r--src/connection-contact-info.c4
-rw-r--r--src/connection.c24
-rw-r--r--src/file-transfer-channel.c16
-rw-r--r--src/tube-dbus.c8
-rw-r--r--src/tube-stream.c14
5 files changed, 33 insertions, 33 deletions
diff --git a/src/connection-contact-info.c b/src/connection-contact-info.c
index f8a53b23..883bdd80 100644
--- a/src/connection-contact-info.c
+++ b/src/connection-contact-info.c
@@ -260,7 +260,7 @@ salut_conn_contact_info_request_contact_info (
if (!tp_handle_is_valid (contacts_repo, handle, &error))
{
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
}
else
@@ -285,7 +285,7 @@ salut_conn_contact_info_request_contact_info (
error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"No information available for '%s'",
tp_handle_inspect (contacts_repo, handle));
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
}
}
diff --git a/src/connection.c b/src/connection.c
index 95812858..91a11743 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -1217,7 +1217,7 @@ salut_connection_request_aliases (TpSvcConnectionInterfaceAliasing1 *iface,
if (!tp_handles_are_valid (contact_handles, contacts, FALSE, &error))
{
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
return;
}
@@ -1358,7 +1358,7 @@ salut_connection_set_aliases (TpSvcConnectionInterfaceAliasing1 *iface,
GError e = { TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"In Salut you can only set your own alias" };
- dbus_g_method_return_error (context, &e);
+ g_dbus_method_invocation_return_gerror (context, &e);
return;
}
@@ -1366,7 +1366,7 @@ salut_connection_set_aliases (TpSvcConnectionInterfaceAliasing1 *iface,
if (!salut_self_set_alias (priv->self, alias, &error))
{
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
return;
}
@@ -1426,7 +1426,7 @@ salut_connection_clear_avatar (TpSvcConnectionInterfaceAvatars1 *iface,
if (!salut_self_set_avatar (priv->self, NULL, 0, &error))
{
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
return;
}
@@ -1449,7 +1449,7 @@ salut_connection_set_avatar (TpSvcConnectionInterfaceAvatars1 *iface,
if (!salut_self_set_avatar (priv->self, (guint8 *) avatar->data,
avatar->len, &error))
{
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
return;
}
@@ -1483,7 +1483,7 @@ salut_connection_get_known_avatar_tokens (
if (!tp_handles_are_valid (handle_repo, contacts, FALSE, &err))
{
- dbus_g_method_return_error (context, err);
+ g_dbus_method_invocation_return_gerror (context, err);
g_error_free (err);
return;
}
@@ -1615,7 +1615,7 @@ salut_connection_request_avatars (
if (!tp_handles_are_valid (handle_repo, contacts, FALSE, &err))
{
- dbus_g_method_return_error (context, err);
+ g_dbus_method_invocation_return_gerror (context, err);
g_error_free (err);
return;
}
@@ -1894,7 +1894,7 @@ salut_connection_update_capabilities (
if (!announce_self_caps (self, &error))
{
gabble_capability_set_free (before);
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
return;
}
@@ -2333,7 +2333,7 @@ create_sidecar_cb (
}
else
{
- g_list_foreach (contexts, (GFunc) dbus_g_method_return_error, error);
+ g_list_foreach (contexts, (GFunc) g_dbus_method_invocation_return_gerror, error);
}
g_hash_table_remove (ctx->conn->priv->pending_sidecars, ctx->sidecar_iface);
@@ -2364,7 +2364,7 @@ salut_connection_ensure_sidecar (
"This connection has already disconnected" };
DEBUG ("already disconnected, declining request for %s", sidecar_iface);
- dbus_g_method_return_error (context, &e);
+ g_dbus_method_invocation_return_gerror (context, &e);
return;
}
@@ -2373,7 +2373,7 @@ salut_connection_ensure_sidecar (
error->domain = TP_ERROR;
error->code = TP_ERROR_INVALID_ARGUMENT;
DEBUG ("%s is malformed: %s", sidecar_iface, error->message);
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_clear_error (&error);
return;
}
@@ -2462,7 +2462,7 @@ sidecars_conn_status_changed_cb (
DEBUG ("failing all %u requests for %s", g_list_length (contexts),
sidecar_iface);
- g_list_foreach (contexts, (GFunc) dbus_g_method_return_error, error);
+ g_list_foreach (contexts, (GFunc) g_dbus_method_invocation_return_gerror, error);
g_error_free (error);
}
diff --git a/src/file-transfer-channel.c b/src/file-transfer-channel.c
index 775552ee..a21a312f 100644
--- a/src/file-transfer-channel.c
+++ b/src/file-transfer-channel.c
@@ -1207,7 +1207,7 @@ salut_file_transfer_channel_accept_file (TpSvcChannelTypeFileTransfer1 *iface,
ft = self->priv->ft;
if (ft == NULL)
{
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
}
@@ -1215,14 +1215,14 @@ salut_file_transfer_channel_accept_file (TpSvcChannelTypeFileTransfer1 *iface,
{
g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"State is not pending; cannot accept file");
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
return;
}
if (!check_address_and_access_control (self, address_type, access_control,
access_control_param, &error))
{
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
return;
}
@@ -1237,7 +1237,7 @@ salut_file_transfer_channel_accept_file (TpSvcChannelTypeFileTransfer1 *iface,
DEBUG ("Could not set up local socket");
g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Could not set up local socket");
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
}
salut_file_transfer_channel_set_state (iface,
@@ -1284,7 +1284,7 @@ salut_file_transfer_channel_provide_file (
{
g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Channel is not an outgoing transfer");
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
return;
}
@@ -1292,14 +1292,14 @@ salut_file_transfer_channel_provide_file (
{
g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"ProvideFile has already been called for this channel");
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
return;
}
if (!check_address_and_access_control (self, address_type, access_control,
access_control_param, &error))
{
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
return;
}
@@ -1309,7 +1309,7 @@ salut_file_transfer_channel_provide_file (
DEBUG ("Could not set up local socket");
g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Could not set up local socket");
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
}
if (self->priv->remote_accepted)
diff --git a/src/tube-dbus.c b/src/tube-dbus.c
index f894d2a5..b7db3bce 100644
--- a/src/tube-dbus.c
+++ b/src/tube-dbus.c
@@ -1550,7 +1550,7 @@ salut_tube_dbus_offer_async (TpSvcChannelTypeDBusTube1 *self,
if (!salut_tube_dbus_check_access_control (tube, access_control, &error))
{
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
return;
}
@@ -1567,7 +1567,7 @@ salut_tube_dbus_offer_async (TpSvcChannelTypeDBusTube1 *self,
else
{
g_assert (error != NULL);
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
}
}
@@ -1589,7 +1589,7 @@ salut_tube_dbus_accept_async (TpSvcChannelTypeDBusTube1 *self,
if (!salut_tube_dbus_check_access_control (tube, access_control, &error))
{
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
return;
}
@@ -1602,7 +1602,7 @@ salut_tube_dbus_accept_async (TpSvcChannelTypeDBusTube1 *self,
else
{
g_assert (error != NULL);
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
}
}
diff --git a/src/tube-stream.c b/src/tube-stream.c
index 3604c3a6..3ce3aa78 100644
--- a/src/tube-stream.c
+++ b/src/tube-stream.c
@@ -2071,7 +2071,7 @@ salut_tube_stream_offer_async (TpSvcChannelTypeStreamTube1 *iface,
{
g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Tube is not in the not offered state");
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
return;
}
@@ -2079,7 +2079,7 @@ salut_tube_stream_offer_async (TpSvcChannelTypeStreamTube1 *iface,
if (!salut_tube_stream_check_params (address_type, address,
access_control, NULL, &error))
{
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
return;
}
@@ -2098,7 +2098,7 @@ salut_tube_stream_offer_async (TpSvcChannelTypeStreamTube1 *iface,
if (!salut_tube_stream_offer (self, &error))
{
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
return;
}
@@ -2128,7 +2128,7 @@ salut_tube_stream_accept_async (TpSvcChannelTypeStreamTube1 *iface,
GError e = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Tube is not in the local pending state" };
- dbus_g_method_return_error (context, &e);
+ g_dbus_method_invocation_return_gerror (context, &e);
return;
}
@@ -2139,7 +2139,7 @@ salut_tube_stream_accept_async (TpSvcChannelTypeStreamTube1 *iface,
error = g_error_new (TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Address type %d not implemented", address_type);
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
return;
}
@@ -2149,7 +2149,7 @@ salut_tube_stream_accept_async (TpSvcChannelTypeStreamTube1 *iface,
GError e = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Unix sockets only support localhost control access" };
- dbus_g_method_return_error (context, &e);
+ g_dbus_method_invocation_return_gerror (context, &e);
return;
}
@@ -2161,7 +2161,7 @@ salut_tube_stream_accept_async (TpSvcChannelTypeStreamTube1 *iface,
if (!salut_tube_stream_accept (SALUT_TUBE_IFACE (self), &error))
{
- dbus_g_method_return_error (context, error);
+ g_dbus_method_invocation_return_gerror (context, error);
g_error_free (error);
return;
}