aboutsummaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/Makefile.am22
-rw-r--r--extensions/all.xml10
-rw-r--r--extensions/extensions-cli.c24
-rw-r--r--extensions/misc.xml2
4 files changed, 39 insertions, 19 deletions
diff --git a/extensions/Makefile.am b/extensions/Makefile.am
index 356211e71..1e765b888 100644
--- a/extensions/Makefile.am
+++ b/extensions/Makefile.am
@@ -15,7 +15,7 @@ EXTRA_DIST = \
noinst_LTLIBRARIES = libemp-extensions.la
libemp_extensions_la_LIBADD = \
- $(TELEPATHY_GLIB_LIBS)
+ $(TP_GLIB_LIBS)
# The client-specific parts are built into a separate .o file, so the linker
# can discard them when linking services. The service-specific parts are
@@ -52,7 +52,7 @@ XSLTPROCFLAGS = --nonet --novalid
# Generated files which can be generated for all categories simultaneously
-_gen/%.xml: %.xml $(wildcard *.xml)
+_gen/all.xml: all.xml $(wildcard *.xml)
$(mkdir_p) _gen
$(XSLTPROC) $(XSLTPROCFLAGS) --xinclude $(tools_dir)/identity.xsl \
$< > $@
@@ -71,14 +71,12 @@ _gen/signals-marshal.list: _gen/all.xml \
$(tools_dir)/glib-signals-marshal-gen.py
$(PYTHON) $(tools_dir)/glib-signals-marshal-gen.py $< > $@
-_gen/signals-marshal.h: _gen/signals-marshal.list
+_gen/signals-marshal.h: _gen/signals-marshal.list Makefile.am
$(GLIB_GENMARSHAL) --header --prefix=_emp_ext_marshal $< > $@
-_gen/signals-marshal.c: _gen/signals-marshal.list
- ( \
- echo '#include "signals-marshal.h"' && \
- $(GLIB_GENMARSHAL) --body --prefix=_emp_ext_marshal $< \
- ) > $@
+_gen/signals-marshal.c: _gen/signals-marshal.list Makefile.am
+ { echo '#include "_gen/signals-marshal.h"' && \
+ $(GLIB_GENMARSHAL) --body --prefix=_emp_ext_marshal $< ; } > $@
_gen/register-dbus-glib-marshallers-body.h: _gen/all.xml \
$(tools_dir)/glib-client-marshaller-gen.py
@@ -111,11 +109,19 @@ _gen/interfaces-body.h: _gen/all.xml \
# subclass you want to use with --subclass will need to have its own category,
# although you can subdivide further if you want.
+_gen/misc.xml: misc.xml $(wildcard *.xml)
+ $(mkdir_p) _gen
+ $(XSLTPROC) $(XSLTPROCFLAGS) --xinclude $(tools_dir)/identity.xsl \
+ $< > $@
+
_gen/cli-misc-body.h _gen/cli-misc.h: _gen/misc.xml \
$(tools_dir)/glib-client-gen.py
$(PYTHON) $(tools_dir)/glib-client-gen.py \
--group=misc \
+ --subclass=TpProxy \
+ --subclass-assert=TP_IS_PROXY \
--iface-quark-prefix=EMP_IFACE_QUARK \
+ --tp-proxy-api=0.7.6 \
$< Emp_Cli _gen/cli-misc
_gen/svc-misc.c _gen/svc-misc.h: _gen/misc.xml \
diff --git a/extensions/all.xml b/extensions/all.xml
index 2a0e109e8..d4986ff08 100644
--- a/extensions/all.xml
+++ b/extensions/all.xml
@@ -2,13 +2,21 @@
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
xmlns:xi="http://www.w3.org/2001/XInclude">
-<tp:title>Extensions for Empathy</tp:title>
+<tp:title>Extensions for empathy</tp:title>
<xi:include href="misc.xml"/>
<tp:generic-types>
<tp:external-type name="Contact_Handle" type="u"
from="Telepathy specification"/>
+ <tp:external-type name="DBus_Bus_Name" type="s"
+ from="Telepathy specification"/>
+ <tp:external-type name="DBus_Interface" type="s"
+ from="Telepathy specification"/>
+ <tp:external-type name="Handle_Type" type="u"
+ from="Telepathy specification"/>
+ <tp:external-type name="Handle" type="u"
+ from="Telepathy specification"/>
</tp:generic-types>
</tp:spec>
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);
}
diff --git a/extensions/misc.xml b/extensions/misc.xml
index 070ae85c3..2bca333bf 100644
--- a/extensions/misc.xml
+++ b/extensions/misc.xml
@@ -2,7 +2,7 @@
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
xmlns:xi="http://www.w3.org/2001/XInclude">
-<tp:title>Channel extensions for Empathy</tp:title>
+<tp:title>Misc extensions for Empathy</tp:title>
<xi:include href="Stream_Engine.xml"/>
<xi:include href="Channel_Handler.xml"/>