diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-06-29 16:23:42 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-06-29 17:36:09 +0800 |
commit | 9694c8d334037461fc11537920d0a01520a032e5 (patch) | |
tree | d98355f83c1b06dded02eaac3eef1d64fb017e08 | |
parent | 70821f0c74f2d441bc889110e56bbfa602863559 (diff) | |
download | gsoc2013-empathy-9694c8d334037461fc11537920d0a01520a032e5.tar gsoc2013-empathy-9694c8d334037461fc11537920d0a01520a032e5.tar.gz gsoc2013-empathy-9694c8d334037461fc11537920d0a01520a032e5.tar.bz2 gsoc2013-empathy-9694c8d334037461fc11537920d0a01520a032e5.tar.lz gsoc2013-empathy-9694c8d334037461fc11537920d0a01520a032e5.tar.xz gsoc2013-empathy-9694c8d334037461fc11537920d0a01520a032e5.tar.zst gsoc2013-empathy-9694c8d334037461fc11537920d0a01520a032e5.zip |
add empathy_call_factory_register
So we can connect signal before registering the Handler.
-rw-r--r-- | libempathy/empathy-call-factory.c | 15 | ||||
-rw-r--r-- | libempathy/empathy-call-factory.h | 3 | ||||
-rw-r--r-- | src/empathy-av.c | 8 |
3 files changed, 20 insertions, 6 deletions
diff --git a/libempathy/empathy-call-factory.c b/libempathy/empathy-call-factory.c index ab32d06ad..54377ad7a 100644 --- a/libempathy/empathy-call-factory.c +++ b/libempathy/empathy-call-factory.c @@ -107,12 +107,6 @@ empathy_call_factory_init (EmpathyCallFactory *obj) "org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/gtalk-p2p", NULL); - if (!tp_base_client_register (priv->handler, &error)) - { - g_warning ("Failed to register Handler: %s", error->message); - g_error_free (error); - } - g_object_unref (dbus); } @@ -306,3 +300,12 @@ handle_channels_cb (TpSimpleHandler *handler, tp_handle_channels_context_accept (context); } + +gboolean +empathy_call_factory_register (EmpathyCallFactory *self, + GError **error) +{ + EmpathyCallFactoryPriv *priv = GET_PRIV (self); + + return tp_base_client_register (priv->handler, error); +} diff --git a/libempathy/empathy-call-factory.h b/libempathy/empathy-call-factory.h index 56d430ed4..abd8c92dc 100644 --- a/libempathy/empathy-call-factory.h +++ b/libempathy/empathy-call-factory.h @@ -72,6 +72,9 @@ void empathy_call_factory_new_call_with_streams (EmpathyContact *contact, EmpathyDispatcherRequestCb callback, gpointer user_data); +gboolean empathy_call_factory_register (EmpathyCallFactory *self, + GError **error); + G_END_DECLS #endif /* #ifndef __EMPATHY_CALL_FACTORY_H__*/ diff --git a/src/empathy-av.c b/src/empathy-av.c index b83d3525c..f86999cba 100644 --- a/src/empathy-av.c +++ b/src/empathy-av.c @@ -62,6 +62,7 @@ main (int argc, TpDebugSender *debug_sender; #endif EmpathyCallFactory *call_factory; + GError *error = NULL; /* Init */ g_thread_init (NULL); @@ -99,6 +100,13 @@ main (int argc, g_signal_connect (G_OBJECT (call_factory), "new-call-handler", G_CALLBACK (new_call_handler_cb), NULL); + if (!empathy_call_factory_register (call_factory, &error)) + { + g_critical ("Failed to register Handler: %s", error->message); + g_error_free (error); + return EXIT_FAILURE; + } + gtk_main (); g_object_unref (call_factory); |