View Single Post
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#125
Originally Posted by No!No!No!Yes! View Post
Idea absolutely integrated ... got one more issue, though;

xml changed as I need QBW Instance ID which issued signal:
Code:
	<signal name="sig_content_updated">
	  <arg type="s"/>
	  <arg type="i"/>
	</signal>
now:
Code:
g_cclosure_marshal_VOID__INT
doesn't seem to be adequate any more but dunno how to create new marshaller in queen-beecon-service.h:
Code:
g_cclosure_marshal_VOID__STRING__INT
I tried
Code:
	queen_beecon_signals[SIG_CONTENT_UPDATED] = g_signal_new("sig_content_updated",
									QUEEN_BEECON_TYPE,
									G_SIGNAL_RUN_LAST,
									G_STRUCT_OFFSET (QueenBeeconClass, queen_beecon_dbus_sig_content_updated),
									NULL, NULL,
									dbus_glib_marshal_queen_beecon_BOOLEAN__STRING_INT_POINTER, //g_cclosure_marshal_VOID__INT,
									G_TYPE_NONE, 2,
									G_TYPE_STRING,
									G_TYPE_INT);
but I still keep not receiving any signal on the bus.
I believe you need to generate the marshaller yourself. This is how I do it in headset-control:

Originally Posted by configure.ac
AC_PATH_PROG([GLIBGENMARSHAL], [`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`])
AC_SUBST([GLIBGENMARSHAL])
Originally Posted by src/Makefile.am
INCLUDES = -DG_LOG_DOMAIN=\"@PACKAGE@\"

BUILT_SOURCES = hal-marshal.h hal-marshal.c headset-control-service.h
noinst_HEADERS = $(BUILT_SOURCES)

EXTRA_DIST = hal-marshal.list headset-control-service.xml
CLEANFILES = $(BUILT_SOURCES)

hal-marshal.h: hal-marshal.list
$(GLIBGENMARSHAL) --prefix=hal_marshal $< --header > $@


hal-marshal.c: hal-marshal.list hal-marshal.h
echo '#include "hal-marshal.h"' > $@
$(GLIBGENMARSHAL) --prefix=hal_marshal $< --body >> $@


headset-control-service.h: headset-control-service.xml
$(DBUSBINDINGTOOL) --mode=glib-server --prefix=headset_control $< --output=$@

bin_PROGRAMS = headset-control

headset_control_CFLAGS = $(HEADSET_CONTROL_CFLAGS)
headset_control_LDADD = $(HEADSET_CONTROL_LIBS)

headset_control_SOURCES = hal-marshal.h hal-marshal.c headset-control-obj.h headset-control-obj.c headset-controld.c
Originally Posted by hal-marshal.list
VOID:STRING,STRING
 

The Following User Says Thank You to qwerty12 For This Useful Post: