aboutsummaryrefslogtreecommitdiffstats
path: root/extensions/extensions-cli.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-04-11 21:11:27 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-04-11 21:11:27 +0800
commitc99bbf0fdfd30fd2e71125cb105d2c1339cffe4d (patch)
tree6b36ebb77e687db815cefbe5f5740fb674e7f30d /extensions/extensions-cli.c
parent2731ff1f3340825867b00543c2ef0bf6c851cb85 (diff)
downloadgsoc2013-empathy-c99bbf0fdfd30fd2e71125cb105d2c1339cffe4d.tar
gsoc2013-empathy-c99bbf0fdfd30fd2e71125cb105d2c1339cffe4d.tar.gz
gsoc2013-empathy-c99bbf0fdfd30fd2e71125cb105d2c1339cffe4d.tar.bz2
gsoc2013-empathy-c99bbf0fdfd30fd2e71125cb105d2c1339cffe4d.tar.lz
gsoc2013-empathy-c99bbf0fdfd30fd2e71125cb105d2c1339cffe4d.tar.xz
gsoc2013-empathy-c99bbf0fdfd30fd2e71125cb105d2c1339cffe4d.tar.zst
gsoc2013-empathy-c99bbf0fdfd30fd2e71125cb105d2c1339cffe4d.zip
Update extensions dir based on the example in tp-glib
svn path=/trunk/; revision=917
Diffstat (limited to 'extensions/extensions-cli.c')
-rw-r--r--extensions/extensions-cli.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/extensions/extensions-cli.c b/extensions/extensions-cli.c
index 354f4c6dd..9a72da148 100644
--- a/extensions/extensions-cli.c
+++ b/extensions/extensions-cli.c
@@ -9,17 +9,23 @@ static void _emp_ext_register_dbus_glib_marshallers (void);
#include "_gen/cli-misc-body.h"
#include "_gen/register-dbus-glib-marshallers-body.h"
+static gpointer
+emp_cli_once (gpointer data)
+{
+ _emp_ext_register_dbus_glib_marshallers ();
+
+ tp_proxy_init_known_interfaces ();
+
+ tp_proxy_or_subclass_hook_on_interface_add (TP_TYPE_PROXY,
+ emp_cli_misc_add_signals);
+
+ return NULL;
+}
+
void
emp_cli_init (void)
{
- static gboolean initialized = FALSE;
-
- if (!initialized)
- {
- _emp_ext_register_dbus_glib_marshallers ();
+ static GOnce once = G_ONCE_INIT;
- tp_proxy_or_subclass_hook_on_interface_add (TP_TYPE_PROXY,
- emp_cli_misc_add_signals);
- initialized = TRUE;
- }
+ g_once (&once, emp_cli_once, NULL);
}