~audio-recorder/audio-recorder/trunk

« back to all changes in this revision

Viewing changes to dev-info/banshee_readme.txt

  • Committer: Osmo Antero Maatta
  • Date: 2011-01-17 08:09:50 UTC
  • Revision ID: osmoma@gmail.com-20110117080950-4cbm2fnnsr0332jw
InitialĀ importĀ 17.jan.2011

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
To developers.
 
2
Interacting with Banshee over DBus/GLib.
 
3
 
 
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().
 
6
 
 
7
Study: dbus-banshee.c
 
8
 
 
9
Step 0) Create a marshal.list file with correct data types (we receive these data types from Banshee/DBus).
 
10
 
 
11
$ echo "VOID:STRING,STRING,DOUBLE" > marshal.list
 
12
----
 
13
 
 
14
Step 1) Generate both banshee_body.c and banshee_body.h from the marshal.list.
 
15
 
 
16
$ glib-genmarshal --prefix=marshal marshal.list --header > banshee-body.h
 
17
$ glib-genmarshal --prefix=marshal marshal.list --body > banshee-body.c
 
18
----
 
19
 
 
20
Step 2) 
 
21
 
 
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.
 
25
 
 
26
Study: 
 
27
src/dbus-marshall.h
 
28
src/dbus-banshee.c
 
29
----
 
30
 
 
31
Step 3) Register the notification methods and signals. 
 
32
 
 
33
Study: 
 
34
banshee_connect_dbus_signals() in src/dbus-banshee.c.
 
35
 
 
36
Call
 
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);
 
38
----
 
39
 
 
40