diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2012-03-06 17:05:38 -0500 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2012-03-06 17:32:38 -0500 |
commit | e18101902af6cee9c2dfe6a791860a893fd21c45 (patch) | |
tree | 011ad5fb74041fd1b9b19f019d77dd63f79a7486 /telepathy-farstream | |
parent | 0d61b094caa77c83f3826dbb1adddbcfe55f5016 (diff) |
Add finish function to the async new
Diffstat (limited to 'telepathy-farstream')
-rw-r--r-- | telepathy-farstream/channel.c | 23 | ||||
-rw-r--r-- | telepathy-farstream/channel.h | 4 |
2 files changed, 26 insertions, 1 deletions
diff --git a/telepathy-farstream/channel.c b/telepathy-farstream/channel.c index ac903c1..fb429fb 100644 --- a/telepathy-farstream/channel.c +++ b/telepathy-farstream/channel.c @@ -618,7 +618,7 @@ channel_invalidated (TpChannel *channel_proxy, * Creates a new #TfChannel from an existing channel proxy, the new * TfChannel object will be return in the async callback. * - * The user must call g_async_initable_new_finish() in the callback + * The user must call tf_channel_new_finish() in the callback * to get the finished object. */ @@ -693,3 +693,24 @@ content_removed (GObject *proxy, TfContent *content, TfChannel *self) { g_signal_emit (self, signals[SIGNAL_CONTENT_REMOVED], 0, content); } + +/** + * tf_channel_new_finish: + * @object: The #GObject + * @result: a #GAsyncResult + * @error: the location of a #GError or %NULL to ignore it + * + * Completes the construction of a TfChannel. + * + * Returns: a #TfChannel or %NULL if there was an error + * Since: 0.2.2 + */ + +TfChannel * +tf_channel_new_finish (GObject *object, + GAsyncResult *result, + GError **error) +{ + return (TfChannel *) g_async_initable_new_finish (G_ASYNC_INITABLE (object), + result, error); +} diff --git a/telepathy-farstream/channel.h b/telepathy-farstream/channel.h index 55533bd..e66742c 100644 --- a/telepathy-farstream/channel.h +++ b/telepathy-farstream/channel.h @@ -53,6 +53,10 @@ void tf_channel_new_async (TpChannel *channel_proxy, GAsyncReadyCallback callback, gpointer user_data); +TfChannel *tf_channel_new_finish (GObject *object, + GAsyncResult *result, + GError **error); + gboolean tf_channel_bus_message (TfChannel *channel, GstMessage *message); |