aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-dispatch-operation.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2009-03-04 18:41:28 +0800
committerXavier Claessens <xclaesse@gmail.com>2009-04-22 18:21:13 +0800
commit9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5 (patch)
tree78925c31878880bc82163cb02e9e38e7fe0679cf /libempathy/empathy-dispatch-operation.c
parentdcd115814f40de200c3cf4da6693de84489592ac (diff)
downloadgsoc2013-empathy-9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5.tar
gsoc2013-empathy-9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5.tar.gz
gsoc2013-empathy-9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5.tar.bz2
gsoc2013-empathy-9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5.tar.lz
gsoc2013-empathy-9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5.tar.xz
gsoc2013-empathy-9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5.tar.zst
gsoc2013-empathy-9b9fcd3ce3b9c7fdc62836821d83377bec58d0a5.zip
Change EmpathyTpContactFactory API to look more like TpConnection. Add function to get only one contact from
id/handle.
Diffstat (limited to 'libempathy/empathy-dispatch-operation.c')
-rw-r--r--libempathy/empathy-dispatch-operation.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/libempathy/empathy-dispatch-operation.c b/libempathy/empathy-dispatch-operation.c
index 80bb3dfb6..8f6fffe4e 100644
--- a/libempathy/empathy-dispatch-operation.c
+++ b/libempathy/empathy-dispatch-operation.c
@@ -175,15 +175,23 @@ empathy_dispatch_operation_invalidated (TpProxy *proxy, guint domain,
static void
dispatcher_operation_got_contact_cb (EmpathyTpContactFactory *factory,
- GList *contacts,
+ EmpathyContact *contact,
+ const GError *error,
gpointer user_data,
GObject *self)
{
EmpathyDispatchOperationPriv *priv = GET_PRIV (self);
+ if (error)
+ {
+ /* FIXME: We should cancel the operation */
+ DEBUG ("Error: %s", error->message);
+ return;
+ }
+
if (priv->contact != NULL)
g_object_unref (priv->contact);
- priv->contact = g_object_ref (contacts->data);
+ priv->contact = g_object_ref (contact);
g_object_notify (G_OBJECT (self), "contact");
tp_channel_call_when_ready (priv->channel,
@@ -212,7 +220,7 @@ empathy_dispatch_operation_constructed (GObject *object)
EmpathyTpContactFactory *factory;
factory = empathy_tp_contact_factory_dup_singleton (priv->connection);
- empathy_tp_contact_factory_get_from_handles (factory, 1, &handle,
+ empathy_tp_contact_factory_get_from_handle (factory, handle,
dispatcher_operation_got_contact_cb, NULL, NULL, object);
g_object_unref (factory);
return;