Re: [Banshee-List] [SOLVED] Getting values from Banshee-player's "EventChanged" signal.



Re-hello,
I got a solution from DBus' mailing list.

I did exactly as instructed and the code works now very well.

$ echo "VOID:STRING,STRING,DOUBLE" > marshal.list

$ glib-genmarshal --prefix=marshal marshal.list --header > sample1.h
$ glib-genmarshal --prefix=marshal marshal.list --body > sample1.c

Then copied/pasted the relevant parts from sample1.[ch] to my code.
Complete test code: http://www.futuredesktop.com/tmp/banshee_test.c

ps. I will now improve and bake the new code to
https://launchpad.net/~osmoma/+archive/rec-applet so it can be
controlled by media-players.
---

>On 09/23/2010 03:57 PM, Faheem Pervez wrote:
>It outputs this at start:
** (banshee_test:22386): WARNING **: No marshaller for signature of
signal 'EventChanged'
>
>I believe this is your problem. Looking at Closures[1], GLib does not
ship with a marshaller that "understands" that signal's signature.
>
> The add-signal setting for "EventChanged" should be this, but it fails:
> dbus_g_proxy_add_signal(proxy, "EventChanged", G_TYPE_STRING,
> G_TYPE_STRING, G_TYPE_DOUBLE, G_TYPE_INVALID);
>
> Run glib-genmarshal[2] and use "VOID: STRING, STRING, DOUBLE" as the
> marshaller specification. Remember to call
> dbus_g_object_register_marshaller[3] (I believe it should be done
> before calling dbus_g_proxy_add_signal).
>
> The section "GLIB with C examples" of
>
http://web.archive.org/web/20080501043040/http://wiki.bluez.org/wiki/HOWTO/DiscoveringDevices
> may also be of help.
>
> Best regards,
> Faheem
>
> [1]
http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#g-cclosure-marshal-VOID--VOID
> [2] http://library.gnome.org/devel/gobject/unstable/glib-genmarshal.html
> [3]
http://dbus.freedesktop.org/doc/dbus-glib/dbus-glib-DBus-GObject-related-functions.html#dbus-g-object-register-marshaller


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]