2
Interacting with Banshee over DBus/GLib.
4
We need to create a marshalling function so we can receive correct data types from DBus/Banshee.
5
This marshalling function in used in banshee_connect_dbus_signals().
9
Step 0) Create a marshal.list file with correct data types (we receive these data types from Banshee/DBus).
11
$ echo "VOID:STRING,STRING,DOUBLE" > marshal.list
14
Step 1) Generate both banshee_body.c and banshee_body.h from the marshal.list.
16
$ glib-genmarshal --prefix=marshal marshal.list --header > banshee-body.h
17
$ glib-genmarshal --prefix=marshal marshal.list --body > banshee-body.c
22
Copy & paste necessary parts of banshee-body.[ch] to our project (dbus-banshee.c)
23
We need the marshal_VOID__STRING_STRING_DOUBLE() function plus
24
some support functions which we write to dbus-marshall.h.
31
Step 3) Register the notification methods and signals.
34
banshee_connect_dbus_signals() in src/dbus-banshee.c.
37
dbus_g_object_register_marshaller(marshal_VOID__STRING_STRING_DOUBLE, G_TYPE_NONE, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_DOUBLE, G_TYPE_INVALID);