# HG changeset patch # User Frank Benoit # Date 1192970942 -7200 # Node ID 427c0332a111f7d8b077076b75d2464d11349e4e # Parent c8f7d77e4d4a8847997e2ccd369abfd470f27ea7 work on DBusTesting diff -r c8f7d77e4d4a -r 427c0332a111 .hgignore --- a/.hgignore Sat Oct 20 19:41:51 2007 +0200 +++ b/.hgignore Sun Oct 21 14:49:02 2007 +0200 @@ -10,4 +10,4 @@ ^dbus-d-javatests/dsrc/dsss_objs ^dbus-d-javatests/dsrc/dsss.last ^dbus-d-javatests/dsrc/DHelper - +^dbus-d-javatests/dsrc/DBusTesting diff -r c8f7d77e4d4a -r 427c0332a111 dbus-d-javatests/dbustest.xml --- a/dbus-d-javatests/dbustest.xml Sat Oct 20 19:41:51 2007 +0200 +++ b/dbus-d-javatests/dbustest.xml Sun Oct 21 14:49:02 2007 +0200 @@ -8,15 +8,18 @@ - - - + + + + + + - + @@ -27,7 +30,7 @@ - + @@ -40,7 +43,7 @@ - + diff -r c8f7d77e4d4a -r 427c0332a111 dbus-d-javatests/dsrc/DBusTesting.d --- a/dbus-d-javatests/dsrc/DBusTesting.d Sat Oct 20 19:41:51 2007 +0200 +++ b/dbus-d-javatests/dsrc/DBusTesting.d Sun Oct 21 14:49:02 2007 +0200 @@ -2,10 +2,31 @@ module DBusTesting; import tango.sys.Environment; +import tango.io.Stdout; +import tango.core.Exception; + +import org.freedesktop.dbus.DBus; import DBusTestingGen; +bool exceptionsActive = false; +char[][] called; +void checkCall( char[] name ){ + called ~= name.dup; + if( exceptionsActive ){ + throw new TracedException( "Test Exception thrown" ); + } +} +class Dimpl : DBusInterface.dbustest.DImpl { + public void testV_V(){ + checkCall( "testV_V" ); + } + public int testI_I( in int arg1 ){ + checkCall( "testI_I" ); + return arg1 + 1234; + } +} @@ -13,16 +34,16 @@ char[] address = Environment.get( "DBUS_ADDRESS" ); if( ! address ){ - Cout( "Environment variable DBUS_ADDRESS not set" ).newline; + Stdout.formatln( "Environment variable DBUS_ADDRESS not set" ); return 1; } - Cout( "D-App started").newline; - DBus.DirectConnection dc = new DBus.DirectConnection( args[1] ); - Cout("D-App connected").newline; + Stdout.formatln( "D-App started"); + DirectConnection dc = new DirectConnection( args[1] ); + Stdout.formatln("D-App connected"); // auto o = new MyDataFileSystem(); // o.registerDBusObject( dc.conn ); // Cout("Export obj : ")( o.getDBusInstanceName() ).newline; dc.mainLoop(); - Cout("D-App disconnected").newline; + Stdout.formatln("D-App disconnected"); return 0; } diff -r c8f7d77e4d4a -r 427c0332a111 dbus-d-javatests/dsrc/DBusTestingGen.d --- a/dbus-d-javatests/dsrc/DBusTestingGen.d Sat Oct 20 19:41:51 2007 +0200 +++ b/dbus-d-javatests/dsrc/DBusTestingGen.d Sun Oct 21 14:49:02 2007 +0200 @@ -89,7 +89,7 @@ " \\n" " \\n" " \\n" - " \\n" + " \\n" " \\n" " \\n" "\\n"); @@ -97,7 +97,7 @@ DBusInterface.org.freedesktop.DBus.Introspectable.classinfo, "\\n" " \\n" - " \\n" + " \\n" " \\n" " \\n" "\\n"); @@ -105,7 +105,7 @@ DBusInterface.org.freedesktop.DBus.Properties.classinfo, "\\n" " \\n" - " \\n" + " \\n" " \\n" " \\n" " \\n" @@ -116,7 +116,7 @@ " \\n" " \\n" " \\n" - " \\n" + " \\n" " \\n" " \\n" " \\n" @@ -132,7 +132,7 @@ DBusInterface.dbustest.TestControl.classinfo, "\\n" " \\n" - " \\n" + " \\n" " \\n" " \\n" "\\n"); @@ -140,7 +140,7 @@ DBusInterface.dbustest.TestListener.classinfo, "\\n" " \\n" - " \\n" + " \\n" " \\n" " \\n" "\\n"); @@ -150,7 +150,7 @@ " \\n" " \\n" " \\n" - " \\n" + " \\n" " \\n" " \\n" " \\n" @@ -161,7 +161,7 @@ " \\n" " \\n" " \\n" - " \\n" + " \\n" " \\n" " \\n" " \\n" diff -r c8f7d77e4d4a -r 427c0332a111 dbus-d-javatests/dsrc/dsss.conf --- a/dbus-d-javatests/dsrc/dsss.conf Sat Oct 20 19:41:51 2007 +0200 +++ b/dbus-d-javatests/dsrc/dsss.conf Sun Oct 21 14:49:02 2007 +0200 @@ -16,6 +16,21 @@ target=DBusTests version(linux){ buildflags+=/Dater/ext/flectioned/flectioned.d + buildflags+=$LIB_PREFIX/libSDD-tango-*.a + buildflags+=-I../../dbus-d/dsrc + buildflags+=-L-ldbus-1 +} +version(Windows){ + buildflags+=-S..\libs + buildflags+=-ll"libdbus-1" + buildflags+=-L/SUBSYSTEM:console:5 +} + +[DBusTesting.d] +target=DBusTesting +version(linux){ + buildflags+=$INCLUDE_PREFIX/cn/kuehne/flectioned.d + buildflags+=$LIB_PREFIX/libSDD-tango-*.a buildflags+=-I../../dbus-d/dsrc buildflags+=-L-ldbus-1 } diff -r c8f7d77e4d4a -r 427c0332a111 dbus-d-javatests/filetree.xml --- a/dbus-d-javatests/filetree.xml Sat Oct 20 19:41:51 2007 +0200 +++ b/dbus-d-javatests/filetree.xml Sun Oct 21 14:49:02 2007 +0200 @@ -3,26 +3,26 @@ - + - + - + - + - + diff -r c8f7d77e4d4a -r 427c0332a111 dbus-d-javatests/jsrc/dbustest/DBusTester.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dbus-d-javatests/jsrc/dbustest/DBusTester.java Sun Oct 21 14:49:02 2007 +0200 @@ -0,0 +1,44 @@ +package dbustest; + +import java.io.IOException; + +import org.freedesktop.dbus.DirectConnection; + +import dbus_d_javahelper.ConsoleProcess; +import dbus_d_javahelper.DBusDLoader; + +public class DBusTester { + + static DirectConnection dc; + static ConsoleProcess process; + + /** + * @param args + */ + public static void main(String[] args) { + // TODO Auto-generated method stub + + final String address = DirectConnection.createDynamicTCPSession(); + DBusDLoader busDLoader = new DBusDLoader( "../dsrc/DBusTesting" ); + try{ + System.err.println("Java App: start D"); + DirectConnection dc = busDLoader.startup(); + + DataFileSystem rem = (DataFileSystem) dc.getRemoteObject( + "/DHelper/MyDataFileSystem/0", DBusTesting.class); + + System.err.println("Java App: startup complete"); + } + finally{ + busDLoader.disconnect(); + } + } + +} + + + + + + + \ No newline at end of file diff -r c8f7d77e4d4a -r 427c0332a111 dbus-d/dsrc/dsss.conf --- a/dbus-d/dsrc/dsss.conf Sat Oct 20 19:41:51 2007 +0200 +++ b/dbus-d/dsrc/dsss.conf Sun Oct 21 14:49:02 2007 +0200 @@ -12,6 +12,7 @@ [org/freedesktop/dbus/tool/CreateInterface.d] target=../CreateInterface +buildflags+=$LIB_PREFIX/libSDD-tango-*.a diff -r c8f7d77e4d4a -r 427c0332a111 dbus-d/dsrc/org/freedesktop/dbus/tool/CreateInterface.d --- a/dbus-d/dsrc/org/freedesktop/dbus/tool/CreateInterface.d Sat Oct 20 19:41:51 2007 +0200 +++ b/dbus-d/dsrc/org/freedesktop/dbus/tool/CreateInterface.d Sun Oct 21 14:49:02 2007 +0200 @@ -47,7 +47,7 @@ const char[] ID_DIRECTION_IN = "in"; const char[] ID_DIRECTION_OUT = "out"; const char[] ID_TYPE = "type"; -const char[] ANNO_RETURNS = "org.dsource.tiolink.Returns"; +const char[] ANNO_RETURNS = "org.dsource.dbus.d.Returns"; IntfTree intfTree; //-----------------------------------------