summaryrefslogtreecommitdiff
path: root/telepathy-glib/account-channel-request.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-12-21 09:48:51 +0100
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-02-22 16:29:49 +0100
commitea6221c930295fab7b2368b9c23d46d6b4ceac6c (patch)
tree1c87c8a0aa2a67970c9f4a45bbdfbbe365c021d9 /telepathy-glib/account-channel-request.c
parente8884ab5dc5b094ac9c92931f3549f68a1662602 (diff)
downloadtelepathy-glib-ea6221c930295fab7b2368b9c23d46d6b4ceac6c.tar.gz
use _tp_implement_finish_return_copy_pointer instead of request_and_observe_channel_finish
Diffstat (limited to 'telepathy-glib/account-channel-request.c')
-rw-r--r--telepathy-glib/account-channel-request.c37
1 files changed, 10 insertions, 27 deletions
diff --git a/telepathy-glib/account-channel-request.c b/telepathy-glib/account-channel-request.c
index a60fb991e..3bd33278c 100644
--- a/telepathy-glib/account-channel-request.c
+++ b/telepathy-glib/account-channel-request.c
@@ -65,6 +65,7 @@
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/simple-handler.h>
#include <telepathy-glib/util.h>
+#include <telepathy-glib/util-internal.h>
#define DEBUG_FLAG TP_DEBUG_CLIENT
#include "telepathy-glib/debug-internal.h"
@@ -610,6 +611,9 @@ channel_prepare_cb (GObject *source,
g_error_free (error);
}
+ g_simple_async_result_set_op_res_gpointer (self->priv->result,
+ g_object_ref (source), g_object_unref);
+
complete_result (self);
}
@@ -1452,29 +1456,6 @@ tp_account_channel_request_create_and_observe_channel_async (
callback, user_data, FALSE);
}
-static TpChannel *
-request_and_observe_channel_finish (TpAccountChannelRequest *self,
- GAsyncResult *result,
- gpointer source_tag,
- GError **error)
-{
- GSimpleAsyncResult *simple;
-
- g_return_val_if_fail (TP_IS_ACCOUNT_CHANNEL_REQUEST (self), NULL);
- g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (result), NULL);
-
- simple = G_SIMPLE_ASYNC_RESULT (result);
-
- if (g_simple_async_result_propagate_error (simple, error))
- return FALSE;
-
- g_return_val_if_fail (g_simple_async_result_is_valid (result,
- G_OBJECT (self), source_tag),
- NULL);
-
- return g_object_ref (self->priv->channel);
-}
-
/**
* tp_account_channel_request_create_and_observe_channel_finish:
* @self: a #TpAccountChannelRequest
@@ -1495,8 +1476,9 @@ tp_account_channel_request_create_and_observe_channel_finish (
GAsyncResult *result,
GError **error)
{
- return request_and_observe_channel_finish (self, result,
- tp_account_channel_request_create_and_observe_channel_async, error);
+ _tp_implement_finish_return_copy_pointer (self,
+ tp_account_channel_request_create_and_observe_channel_async,
+ g_object_ref);
}
/**
@@ -1560,8 +1542,9 @@ tp_account_channel_request_ensure_and_observe_channel_finish (
GAsyncResult *result,
GError **error)
{
- return request_and_observe_channel_finish (self, result,
- tp_account_channel_request_ensure_and_observe_channel_async, error);
+ _tp_implement_finish_return_copy_pointer (self,
+ tp_account_channel_request_ensure_and_observe_channel_async,
+ g_object_ref);
}
/**