summaryrefslogtreecommitdiff
path: root/TelepathyQt4Yell
diff options
context:
space:
mode:
authorMateu Batle <mateu.batle@collabora.co.uk>2011-01-31 09:48:31 -0500
committerMateu Batle <mateu.batle@collabora.co.uk>2011-02-11 16:51:37 -0500
commit90d760e180b0a96303b1906fb983a16895e80d8d (patch)
tree94af8be7c3336f439876809bf2219a1403c83753 /TelepathyQt4Yell
parent8a76613920661f72ba55eda655689e518b2c1669 (diff)
Completed the async result callback function
Diffstat (limited to 'TelepathyQt4Yell')
-rw-r--r--TelepathyQt4Yell/Farsight/channel.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/TelepathyQt4Yell/Farsight/channel.cpp b/TelepathyQt4Yell/Farsight/channel.cpp
index 3b0ac15..8b99109 100644
--- a/TelepathyQt4Yell/Farsight/channel.cpp
+++ b/TelepathyQt4Yell/Farsight/channel.cpp
@@ -96,9 +96,21 @@ void FarsightChannel::on_tf_channel_new_finish (GObject *source_object, GAsyncRe
qDebug() << " source_object=" << source_object;
qDebug() << " result=" << res;
- // TfChannel *ret =
- //g_object_unref(gchannel);
- //gchannel = 0;
+ FarsightChannel * self = reinterpret_cast<FarsightChannel *> (user_data);
+
+ GError *error = NULL;
+ TfChannel *ret = (TfChannel *) TF_CHANNEL (g_async_initable_new_finish ( G_ASYNC_INITABLE (source_object), res, &error));
+ self->mTfChannel = ret;
+
+ if (error) {
+ qDebug() << "FarsightChannel::on_tf_channel_new_finish: error " << error->message;
+ g_clear_error (&error);
+ Q_EMIT self->farsightChannelCreated(true);
+ } else {
+ Q_EMIT self->farsightChannelCreated(false);
+ }
+
+ g_object_unref(source_object);
}
TfChannel *FarsightChannel::farsightChannel()