Mercurial > projects > dbus-d
annotate README.txt @ 12:198c379caaa7 default tip
remove explicit tango import path
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 18 Nov 2007 18:16:28 +0100 |
parents | 19117ffaee67 |
children |
rev | line source |
---|---|
2
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
1 |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
2 With dbus-d, an interface is defined with a XML file that follows the DBus introspection data. |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
3 The tool CreateInterfaces is used to read this file and generate a D module with all |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
4 the interfaces from the XML file and with the needed supporting code. |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
5 |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
6 1. Build the "createinterface" tool. |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
7 in the dbus-d directory: |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
8 |
6
963d271f7c25
disabled event stuff, to have working example
Frank Benoit <benoit@tionex.de>
parents:
5
diff
changeset
|
9 $ cd dbus-d/dsrc |
963d271f7c25
disabled event stuff, to have working example
Frank Benoit <benoit@tionex.de>
parents:
5
diff
changeset
|
10 $ dsss build org/freedesktop/dbus/tool/CreateInterface.d |
963d271f7c25
disabled event stuff, to have working example
Frank Benoit <benoit@tionex.de>
parents:
5
diff
changeset
|
11 |
963d271f7c25
disabled event stuff, to have working example
Frank Benoit <benoit@tionex.de>
parents:
5
diff
changeset
|
12 On success, this creates the CreateInterface tool in ../.. |
2
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
13 |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
14 2. Goto the directory of your applications source code ,call the CreateInterface tool |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
15 and pipe the output to a file matching your module name. |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
16 |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
17 $ cd ../dbus-d-javatests/dsrc |
6
963d271f7c25
disabled event stuff, to have working example
Frank Benoit <benoit@tionex.de>
parents:
5
diff
changeset
|
18 $ ../../CreateInterface ../dbustest.xml DBusTestingGen > DBusTestingGen.d |
2
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
19 |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
20 3. Implement interfaces in D. If the introspection.xml has an interface called "a.b.C" |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
21 you need to implement the interface "DBusInterface.a.b.C" which is part of the generated |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
22 module. |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
23 |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
24 To make an object accessible, you need to either export it or return it from another |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
25 another method call. |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
26 |
5 | 27 4. Create the Java code |
28 Call the CreateInterface tool from dbus-java. | |
2
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
29 |
5 | 30 in Eclipse run CreateInterface. Set the working directory to "dbus-d-javatests/jsrc" |
31 or in the run dialog ${workspace_loc:dbus-javatests/jsrc} | |
32 give the arguments "--create-files ../dbustest.xml" | |
2
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
33 |
5 | 34 the program shall run without any output. After completion the file should be created. |
35 The repitory already contains those files, so no change may be noteable. | |
36 | |
37 5. Implement the Java code. See dbustest.DBusTester | |
2
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
38 |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
39 |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
40 |
10 | 41 The jface examples (filetree) are currently not runnable... |
2
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
42 |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
43 |
5fb77a7e7d64
building CreateInterface and add bustest.xml
Frank Benoit <benoit@tionex.de>
parents:
0
diff
changeset
|
44 |