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

Osmo Maatta osmoma at gmail.com
Thu Sep 23 07:46:05 PDT 2010


Re-hello,
and thank you very much.

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.

Learned something new today ;-)

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

Thanks,
  Osmo Antero M (Moma)


On 09/23/2010 03:57 PM, Faheem Pervez wrote:
> On 23 September 2010 13:48, Osmo Maatta <osmoma at gmail.com> 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
>>
>> Kindly
>>  Osmo Antero M (Moma)


More information about the dbus mailing list