comparison dbus-d-javatests/dsrc/DBusTestsInterfaces.d @ 0:a5576806d36d

recreate repository without any libs for lightweight repository
author Frank Benoit <benoit@tionex.de>
date Sat, 20 Oct 2007 18:07:18 +0200
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:a5576806d36d
1 /**
2 * Generated with TioLink
3 * TioLink was written by Frank Benoit <benoit@tionex.de>
4 * http://www.dsource.org/projects/tiolink
5 *
6 * File type: D programming language source code
7 */
8 module DBusTestsInterfaces;
9
10 public import org.freedesktop.dbus.Struct;
11 public import org.freedesktop.dbus.Variant;
12
13 import tango.core.Signal;
14 import org.freedesktop.dbus.DBus;
15 import org.freedesktop.dbus.c.Connection : DBusConnection;
16 import org.freedesktop.dbus.c.Message : DBusMessage;
17 import org.freedesktop.dbus.c.Shared : DBusHandlerResult;
18
19
20 // DBus interfaces
21 public interface DBusInterface {
22 // org
23 public interface org {
24 // org.freedesktop
25 public interface freedesktop {
26 // org.freedesktop.DBus
27 public interface DBus {
28 // org.freedesktop.DBus.Peer
29 public interface Peer {
30 public void Ping();
31 public char[] GetMachineId();
32 }
33 // org.freedesktop.DBus.Introspectable
34 public interface Introspectable {
35 public char[] Introspect();
36 }
37 // org.freedesktop.DBus.Properties
38 public interface Properties {
39 public DBusVariant Get( in char[] intf_name, in char[] prop_name );
40 public void Set( in char[] intf_name, in char[] prop_name, in DBusVariant prop );
41 public DBusVariant[ char[] ] GetAll( in char[] intf_name );
42 }
43 }
44 }
45 }
46 // dbustests
47 public interface dbustests {
48 // dbustests.Tests
49 public interface Tests {
50 public void identityVoid();
51 public bool identityBool( in bool input );
52 public byte identityByte( in byte input );
53 public short identityShort( in short input );
54 public ushort identityUShort( in ushort input );
55 public int identityInt( in int input );
56 public uint identityUInt( in uint input );
57 public long identityLong( in long input );
58 public ulong identityULong( in ulong input );
59 public double identityDouble( in double input );
60 public char[] identityString( in char[] input );
61 public DBusVariant identityVariant( in DBusVariant input );
62 public bool[] identityArrayBool( in bool[] input );
63 public byte[] identityArrayByte( in byte[] input );
64 public short[] identityArrayShort( in short[] input );
65 public ushort[] identityArrayUShort( in ushort[] input );
66 public int[] identityArrayInt( in int[] input );
67 public uint[] identityArrayUInt( in uint[] input );
68 public long[] identityArrayLong( in long[] input );
69 public ulong[] identityArrayULong( in ulong[] input );
70 public double[] identityArrayDouble( in double[] input );
71 public char[][] identityArrayString( in char[][] input );
72 public DBusVariant[] identityArrayVariant( in DBusVariant[] input );
73 public long Sum( in int[] input );
74 public uint Sum( in byte[] input );
75 public char[][][ char[] ] InvertMapping( in char[][ char[] ] input );
76 public void DeStruct( in Struct!( char[], uint, short ) input, out char[] res_1, out uint res_2, out short res_3 );
77 public DBusVariant[] Primitize( in DBusVariant input );
78 public bool Invert( in bool input );
79 public tango.core.Signal.Signal!()* signalVoid();
80 public tango.core.Signal.Signal!( int )* signalInt();
81 public tango.core.Signal.Signal!( Struct!( char[], uint, short ) )* signalStruct();
82 public tango.core.Signal.Signal!( Struct!( char[], uint, short )[] )* signalArray();
83 public tango.core.Signal.Signal!( DBusVariant )* signalVariant();
84 }
85 }
86 }
87
88
89 // Peer implementations
90 public interface DBusPeers {
91 // org
92 public class org : DBusPeerObject, DBusInterface.org {
93 // org.freedesktop
94 public class freedesktop : DBusPeerObject, DBusInterface.org.freedesktop {
95 // org.freedesktop.DBus
96 public class DBus : DBusPeerObject, DBusInterface.org.freedesktop.DBus {
97 // org.freedesktop.DBus.Peer
98 public class Peer : DBusPeerObject, DBusInterface.org.freedesktop.DBus.Peer {
99 public void Ping(){
100 }
101 public char[] GetMachineId(){
102 }
103 }
104 // org.freedesktop.DBus.Introspectable
105 public class Introspectable : DBusPeerObject, DBusInterface.org.freedesktop.DBus.Introspectable {
106 public char[] Introspect(){
107 }
108 }
109 // org.freedesktop.DBus.Properties
110 public class Properties : DBusPeerObject, DBusInterface.org.freedesktop.DBus.Properties {
111 public DBusVariant Get( in char[] intf_name, in char[] prop_name ){
112 }
113 public void Set( in char[] intf_name, in char[] prop_name, in DBusVariant prop ){
114 }
115 public DBusVariant[ char[] ] GetAll( in char[] intf_name ){
116 }
117 }
118 }
119 }
120 }
121 // dbustests
122 public class dbustests : DBusPeerObject, DBusInterface.dbustests {
123 // dbustests.Tests
124 public class Tests : DBusPeerObject, DBusInterface.dbustests.Tests {
125 public void identityVoid(){
126 }
127 public bool identityBool( in bool input ){
128 }
129 public byte identityByte( in byte input ){
130 }
131 public short identityShort( in short input ){
132 }
133 public ushort identityUShort( in ushort input ){
134 }
135 public int identityInt( in int input ){
136 }
137 public uint identityUInt( in uint input ){
138 }
139 public long identityLong( in long input ){
140 }
141 public ulong identityULong( in ulong input ){
142 }
143 public double identityDouble( in double input ){
144 }
145 public char[] identityString( in char[] input ){
146 }
147 public DBusVariant identityVariant( in DBusVariant input ){
148 }
149 public bool[] identityArrayBool( in bool[] input ){
150 }
151 public byte[] identityArrayByte( in byte[] input ){
152 }
153 public short[] identityArrayShort( in short[] input ){
154 }
155 public ushort[] identityArrayUShort( in ushort[] input ){
156 }
157 public int[] identityArrayInt( in int[] input ){
158 }
159 public uint[] identityArrayUInt( in uint[] input ){
160 }
161 public long[] identityArrayLong( in long[] input ){
162 }
163 public ulong[] identityArrayULong( in ulong[] input ){
164 }
165 public double[] identityArrayDouble( in double[] input ){
166 }
167 public char[][] identityArrayString( in char[][] input ){
168 }
169 public DBusVariant[] identityArrayVariant( in DBusVariant[] input ){
170 }
171 public long Sum( in int[] input ){
172 }
173 public uint Sum( in byte[] input ){
174 }
175 public char[][][ char[] ] InvertMapping( in char[][ char[] ] input ){
176 }
177 public void DeStruct( in Struct!( char[], uint, short ) input, out char[] res_1, out uint res_2, out short res_3 ){
178 }
179 public DBusVariant[] Primitize( in DBusVariant input ){
180 }
181 public bool Invert( in bool input ){
182 }
183 }
184 }
185 }
186
187
188 // DBusObject
189 public class DBusObject : DBusObjectImpl, DBusInterface.org.freedesktop.DBus.Introspectable {
190 this(){
191 super();
192 }
193 public char[] Introspect(){
194 return super.Introspect();
195 }
196 }
197
198
199 // DBusPeerObject
200 public class DBusPeerObject {
201 }
202
203
204 private void init_introspectionData(){
205 registerIntrospectionData(
206 DBusInterface.org.freedesktop.DBus.Peer.classinfo,
207 `<interface name="org.freedesktop.DBus.Peer">\n`
208 ` <method name="Ping">\n`
209 ` </method>\n`
210 ` <method name="GetMachineId">\n`
211 ` <annotation name="org.dsource.tiolink.Returns" value="machine_uuid" />\n`
212 ` <arg name="machine_uuid" type="s" direction="out" />\n`
213 ` </method>\n`
214 `</interface>\n`);
215 registerIntrospectionData(
216 DBusInterface.org.freedesktop.DBus.Introspectable.classinfo,
217 `<interface name="org.freedesktop.DBus.Introspectable">\n`
218 ` <method name="Introspect">\n`
219 ` <annotation name="org.dsource.tiolink.Returns" value="xml_data" />\n`
220 ` <arg name="xml_data" type="s" direction="out" />\n`
221 ` </method>\n`
222 `</interface>\n`);
223 registerIntrospectionData(
224 DBusInterface.org.freedesktop.DBus.Properties.classinfo,
225 `<interface name="org.freedesktop.DBus.Properties">\n`
226 ` <method name="Get">\n`
227 ` <annotation name="org.dsource.tiolink.Returns" value="prop" />\n`
228 ` <arg name="intf_name" type="s" direction="in" />\n`
229 ` <arg name="prop_name" type="s" direction="in" />\n`
230 ` <arg name="prop" type="v" direction="out" />\n`
231 ` </method>\n`
232 ` <method name="Set">\n`
233 ` <arg name="intf_name" type="s" direction="in" />\n`
234 ` <arg name="prop_name" type="s" direction="in" />\n`
235 ` <arg name="prop" type="v" direction="in" />\n`
236 ` </method>\n`
237 ` <method name="GetAll">\n`
238 ` <annotation name="org.dsource.tiolink.Returns" value="allprops" />\n`
239 ` <arg name="intf_name" type="s" direction="in" />\n`
240 ` <arg name="allprops" type="a{sv}" direction="out" />\n`
241 ` </method>\n`
242 `</interface>\n`);
243 registerIntrospectionData(
244 DBusInterface.dbustests.Tests.classinfo,
245 `<interface name="dbustests.Tests">\n`
246 ` <method name="identityVoid">\n`
247 ` </method>\n`
248 ` <method name="identityBool">\n`
249 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
250 ` <arg name="res" type="b" direction="out" />\n`
251 ` <arg name="input" type="b" direction="in" />\n`
252 ` </method>\n`
253 ` <method name="identityByte">\n`
254 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
255 ` <arg name="res" type="y" direction="out" />\n`
256 ` <arg name="input" type="y" direction="in" />\n`
257 ` </method>\n`
258 ` <method name="identityShort">\n`
259 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
260 ` <arg name="res" type="n" direction="out" />\n`
261 ` <arg name="input" type="n" direction="in" />\n`
262 ` </method>\n`
263 ` <method name="identityUShort">\n`
264 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
265 ` <arg name="res" type="q" direction="out" />\n`
266 ` <arg name="input" type="q" direction="in" />\n`
267 ` </method>\n`
268 ` <method name="identityInt">\n`
269 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
270 ` <arg name="res" type="i" direction="out" />\n`
271 ` <arg name="input" type="i" direction="in" />\n`
272 ` </method>\n`
273 ` <method name="identityUInt">\n`
274 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
275 ` <arg name="res" type="u" direction="out" />\n`
276 ` <arg name="input" type="u" direction="in" />\n`
277 ` </method>\n`
278 ` <method name="identityLong">\n`
279 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
280 ` <arg name="res" type="x" direction="out" />\n`
281 ` <arg name="input" type="x" direction="in" />\n`
282 ` </method>\n`
283 ` <method name="identityULong">\n`
284 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
285 ` <arg name="res" type="t" direction="out" />\n`
286 ` <arg name="input" type="t" direction="in" />\n`
287 ` </method>\n`
288 ` <method name="identityDouble">\n`
289 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
290 ` <arg name="res" type="d" direction="out" />\n`
291 ` <arg name="input" type="d" direction="in" />\n`
292 ` </method>\n`
293 ` <method name="identityString">\n`
294 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
295 ` <arg name="res" type="s" direction="out" />\n`
296 ` <arg name="input" type="s" direction="in" />\n`
297 ` </method>\n`
298 ` <method name="identityVariant">\n`
299 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
300 ` <arg name="res" type="v" direction="out" />\n`
301 ` <arg name="input" type="v" direction="in" />\n`
302 ` </method>\n`
303 ` <method name="identityArrayBool">\n`
304 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
305 ` <arg name="res" type="ab" direction="out" />\n`
306 ` <arg name="input" type="ab" direction="in" />\n`
307 ` </method>\n`
308 ` <method name="identityArrayByte">\n`
309 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
310 ` <arg name="res" type="ay" direction="out" />\n`
311 ` <arg name="input" type="ay" direction="in" />\n`
312 ` </method>\n`
313 ` <method name="identityArrayShort">\n`
314 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
315 ` <arg name="res" type="an" direction="out" />\n`
316 ` <arg name="input" type="an" direction="in" />\n`
317 ` </method>\n`
318 ` <method name="identityArrayUShort">\n`
319 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
320 ` <arg name="res" type="aq" direction="out" />\n`
321 ` <arg name="input" type="aq" direction="in" />\n`
322 ` </method>\n`
323 ` <method name="identityArrayInt">\n`
324 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
325 ` <arg name="res" type="ai" direction="out" />\n`
326 ` <arg name="input" type="ai" direction="in" />\n`
327 ` </method>\n`
328 ` <method name="identityArrayUInt">\n`
329 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
330 ` <arg name="res" type="au" direction="out" />\n`
331 ` <arg name="input" type="au" direction="in" />\n`
332 ` </method>\n`
333 ` <method name="identityArrayLong">\n`
334 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
335 ` <arg name="res" type="ax" direction="out" />\n`
336 ` <arg name="input" type="ax" direction="in" />\n`
337 ` </method>\n`
338 ` <method name="identityArrayULong">\n`
339 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
340 ` <arg name="res" type="at" direction="out" />\n`
341 ` <arg name="input" type="at" direction="in" />\n`
342 ` </method>\n`
343 ` <method name="identityArrayDouble">\n`
344 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
345 ` <arg name="res" type="ad" direction="out" />\n`
346 ` <arg name="input" type="ad" direction="in" />\n`
347 ` </method>\n`
348 ` <method name="identityArrayString">\n`
349 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
350 ` <arg name="res" type="as" direction="out" />\n`
351 ` <arg name="input" type="as" direction="in" />\n`
352 ` </method>\n`
353 ` <method name="identityArrayVariant">\n`
354 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
355 ` <arg name="res" type="av" direction="out" />\n`
356 ` <arg name="input" type="av" direction="in" />\n`
357 ` </method>\n`
358 ` <method name="Sum">\n`
359 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
360 ` <arg name="res" type="x" direction="out" />\n`
361 ` <arg name="input" type="ai" direction="in" />\n`
362 ` </method>\n`
363 ` <method name="Sum">\n`
364 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
365 ` <arg name="res" type="u" direction="out" />\n`
366 ` <arg name="input" type="ay" direction="in" />\n`
367 ` </method>\n`
368 ` <method name="InvertMapping">\n`
369 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
370 ` <arg name="res" type="a{sas}" direction="out" />\n`
371 ` <arg name="input" type="a{ss}" direction="in" />\n`
372 ` </method>\n`
373 ` <method name="DeStruct">\n`
374 ` <arg name="input" type="(sun)" direction="in" />\n`
375 ` <arg name="res_1" type="s" direction="out" />\n`
376 ` <arg name="res_2" type="u" direction="out" />\n`
377 ` <arg name="res_3" type="n" direction="out" />\n`
378 ` </method>\n`
379 ` <method name="Primitize">\n`
380 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
381 ` <arg name="input" type="v" direction="in" />\n`
382 ` <arg name="res" type="av" direction="out" />\n`
383 ` </method>\n`
384 ` <method name="Invert">\n`
385 ` <annotation name="org.dsource.tiolink.Returns" value="res" />\n`
386 ` <arg name="res" type="b" direction="out" />\n`
387 ` <arg name="input" type="b" direction="in" />\n`
388 ` </method>\n`
389 `</interface>\n`);
390 }
391 private DBusHandlerResult intfHandler__org_freedesktop_DBus_Peer( DBusConnection* conn, DBusMessage* message, void* user_data ){
392 DBusInterface.org.freedesktop.DBus.Peer o = cast(DBusInterface.org.freedesktop.DBus.Peer)cast(Object)user_data;
393 if( o is null || !checkIntf( "org.freedesktop.DBus.Peer", message) )
394 return DBusHandlerResult.DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
395
396 try{
397 char[METHOD_SIG_MAXLENGTH] buf;
398 switch( methodSignature( message, buf ) ){
399 case "Ping|":
400 {
401 o.Ping();
402 sendReply( conn, message );
403 }
404 break;
405 case "GetMachineId|":
406 {
407 Struct!( char[] ) po;
408 po.t[0] = o.GetMachineId();
409 sendReplyData!( char[] )( conn, message, po );
410 }
411 break;
412 default:
413 return DBusHandlerResult.DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
414 }
415 }
416 catch( Exception e ){
417 sendException( conn, message, e );
418 }
419 return DBusHandlerResult.DBUS_HANDLER_RESULT_HANDLED;
420 }
421
422 private DBusHandlerResult intfHandler__org_freedesktop_DBus_Introspectable( DBusConnection* conn, DBusMessage* message, void* user_data ){
423 DBusInterface.org.freedesktop.DBus.Introspectable o = cast(DBusInterface.org.freedesktop.DBus.Introspectable)cast(Object)user_data;
424 if( o is null || !checkIntf( "org.freedesktop.DBus.Introspectable", message) )
425 return DBusHandlerResult.DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
426
427 try{
428 char[METHOD_SIG_MAXLENGTH] buf;
429 switch( methodSignature( message, buf ) ){
430 case "Introspect|":
431 {
432 Struct!( char[] ) po;
433 po.t[0] = o.Introspect();
434 sendReplyData!( char[] )( conn, message, po );
435 }
436 break;
437 default:
438 return DBusHandlerResult.DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
439 }
440 }
441 catch( Exception e ){
442 sendException( conn, message, e );
443 }
444 return DBusHandlerResult.DBUS_HANDLER_RESULT_HANDLED;
445 }
446
447 private DBusHandlerResult intfHandler__org_freedesktop_DBus_Properties( DBusConnection* conn, DBusMessage* message, void* user_data ){
448 DBusInterface.org.freedesktop.DBus.Properties o = cast(DBusInterface.org.freedesktop.DBus.Properties)cast(Object)user_data;
449 if( o is null || !checkIntf( "org.freedesktop.DBus.Properties", message) )
450 return DBusHandlerResult.DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
451
452 try{
453 char[METHOD_SIG_MAXLENGTH] buf;
454 switch( methodSignature( message, buf ) ){
455 case "Get|ss":
456 {
457 Struct!( char[], char[] ) pi = getCallValues!( char[], char[] )( message );
458 Struct!( DBusVariant ) po;
459 po.t[0] = o.Get( pi.t[0], pi.t[1] );
460 sendReplyData!( DBusVariant )( conn, message, po );
461 }
462 break;
463 case "Set|ssv":
464 {
465 Struct!( char[], char[], DBusVariant ) pi = getCallValues!( char[], char[], DBusVariant )( message );
466 o.Set( pi.t[0], pi.t[1], pi.t[2] );
467 sendReply( conn, message );
468 }
469 break;
470 case "GetAll|s":
471 {
472 Struct!( char[] ) pi = getCallValues!( char[] )( message );
473 Struct!( DBusVariant[ char[] ] ) po;
474 po.t[0] = o.GetAll( pi.t[0] );
475 sendReplyData!( DBusVariant[ char[] ] )( conn, message, po );
476 }
477 break;
478 default:
479 return DBusHandlerResult.DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
480 }
481 }
482 catch( Exception e ){
483 sendException( conn, message, e );
484 }
485 return DBusHandlerResult.DBUS_HANDLER_RESULT_HANDLED;
486 }
487
488 private DBusHandlerResult intfHandler__dbustests_Tests( DBusConnection* conn, DBusMessage* message, void* user_data ){
489 DBusInterface.dbustests.Tests o = cast(DBusInterface.dbustests.Tests)cast(Object)user_data;
490 if( o is null || !checkIntf( "dbustests.Tests", message) )
491 return DBusHandlerResult.DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
492
493 try{
494 char[METHOD_SIG_MAXLENGTH] buf;
495 switch( methodSignature( message, buf ) ){
496 case "identityVoid|":
497 {
498 o.identityVoid();
499 sendReply( conn, message );
500 }
501 break;
502 case "identityBool|b":
503 {
504 Struct!( bool ) pi = getCallValues!( bool )( message );
505 Struct!( bool ) po;
506 po.t[0] = o.identityBool( pi.t[0] );
507 sendReplyData!( bool )( conn, message, po );
508 }
509 break;
510 case "identityByte|y":
511 {
512 Struct!( byte ) pi = getCallValues!( byte )( message );
513 Struct!( byte ) po;
514 po.t[0] = o.identityByte( pi.t[0] );
515 sendReplyData!( byte )( conn, message, po );
516 }
517 break;
518 case "identityShort|n":
519 {
520 Struct!( short ) pi = getCallValues!( short )( message );
521 Struct!( short ) po;
522 po.t[0] = o.identityShort( pi.t[0] );
523 sendReplyData!( short )( conn, message, po );
524 }
525 break;
526 case "identityUShort|q":
527 {
528 Struct!( ushort ) pi = getCallValues!( ushort )( message );
529 Struct!( ushort ) po;
530 po.t[0] = o.identityUShort( pi.t[0] );
531 sendReplyData!( ushort )( conn, message, po );
532 }
533 break;
534 case "identityInt|i":
535 {
536 Struct!( int ) pi = getCallValues!( int )( message );
537 Struct!( int ) po;
538 po.t[0] = o.identityInt( pi.t[0] );
539 sendReplyData!( int )( conn, message, po );
540 }
541 break;
542 case "identityUInt|u":
543 {
544 Struct!( uint ) pi = getCallValues!( uint )( message );
545 Struct!( uint ) po;
546 po.t[0] = o.identityUInt( pi.t[0] );
547 sendReplyData!( uint )( conn, message, po );
548 }
549 break;
550 case "identityLong|x":
551 {
552 Struct!( long ) pi = getCallValues!( long )( message );
553 Struct!( long ) po;
554 po.t[0] = o.identityLong( pi.t[0] );
555 sendReplyData!( long )( conn, message, po );
556 }
557 break;
558 case "identityULong|t":
559 {
560 Struct!( ulong ) pi = getCallValues!( ulong )( message );
561 Struct!( ulong ) po;
562 po.t[0] = o.identityULong( pi.t[0] );
563 sendReplyData!( ulong )( conn, message, po );
564 }
565 break;
566 case "identityDouble|d":
567 {
568 Struct!( double ) pi = getCallValues!( double )( message );
569 Struct!( double ) po;
570 po.t[0] = o.identityDouble( pi.t[0] );
571 sendReplyData!( double )( conn, message, po );
572 }
573 break;
574 case "identityString|s":
575 {
576 Struct!( char[] ) pi = getCallValues!( char[] )( message );
577 Struct!( char[] ) po;
578 po.t[0] = o.identityString( pi.t[0] );
579 sendReplyData!( char[] )( conn, message, po );
580 }
581 break;
582 case "identityVariant|v":
583 {
584 Struct!( DBusVariant ) pi = getCallValues!( DBusVariant )( message );
585 Struct!( DBusVariant ) po;
586 po.t[0] = o.identityVariant( pi.t[0] );
587 sendReplyData!( DBusVariant )( conn, message, po );
588 }
589 break;
590 case "identityArrayBool|ab":
591 {
592 Struct!( bool[] ) pi = getCallValues!( bool[] )( message );
593 Struct!( bool[] ) po;
594 po.t[0] = o.identityArrayBool( pi.t[0] );
595 sendReplyData!( bool[] )( conn, message, po );
596 }
597 break;
598 case "identityArrayByte|ay":
599 {
600 Struct!( byte[] ) pi = getCallValues!( byte[] )( message );
601 Struct!( byte[] ) po;
602 po.t[0] = o.identityArrayByte( pi.t[0] );
603 sendReplyData!( byte[] )( conn, message, po );
604 }
605 break;
606 case "identityArrayShort|an":
607 {
608 Struct!( short[] ) pi = getCallValues!( short[] )( message );
609 Struct!( short[] ) po;
610 po.t[0] = o.identityArrayShort( pi.t[0] );
611 sendReplyData!( short[] )( conn, message, po );
612 }
613 break;
614 case "identityArrayUShort|aq":
615 {
616 Struct!( ushort[] ) pi = getCallValues!( ushort[] )( message );
617 Struct!( ushort[] ) po;
618 po.t[0] = o.identityArrayUShort( pi.t[0] );
619 sendReplyData!( ushort[] )( conn, message, po );
620 }
621 break;
622 case "identityArrayInt|ai":
623 {
624 Struct!( int[] ) pi = getCallValues!( int[] )( message );
625 Struct!( int[] ) po;
626 po.t[0] = o.identityArrayInt( pi.t[0] );
627 sendReplyData!( int[] )( conn, message, po );
628 }
629 break;
630 case "identityArrayUInt|au":
631 {
632 Struct!( uint[] ) pi = getCallValues!( uint[] )( message );
633 Struct!( uint[] ) po;
634 po.t[0] = o.identityArrayUInt( pi.t[0] );
635 sendReplyData!( uint[] )( conn, message, po );
636 }
637 break;
638 case "identityArrayLong|ax":
639 {
640 Struct!( long[] ) pi = getCallValues!( long[] )( message );
641 Struct!( long[] ) po;
642 po.t[0] = o.identityArrayLong( pi.t[0] );
643 sendReplyData!( long[] )( conn, message, po );
644 }
645 break;
646 case "identityArrayULong|at":
647 {
648 Struct!( ulong[] ) pi = getCallValues!( ulong[] )( message );
649 Struct!( ulong[] ) po;
650 po.t[0] = o.identityArrayULong( pi.t[0] );
651 sendReplyData!( ulong[] )( conn, message, po );
652 }
653 break;
654 case "identityArrayDouble|ad":
655 {
656 Struct!( double[] ) pi = getCallValues!( double[] )( message );
657 Struct!( double[] ) po;
658 po.t[0] = o.identityArrayDouble( pi.t[0] );
659 sendReplyData!( double[] )( conn, message, po );
660 }
661 break;
662 case "identityArrayString|as":
663 {
664 Struct!( char[][] ) pi = getCallValues!( char[][] )( message );
665 Struct!( char[][] ) po;
666 po.t[0] = o.identityArrayString( pi.t[0] );
667 sendReplyData!( char[][] )( conn, message, po );
668 }
669 break;
670 case "identityArrayVariant|av":
671 {
672 Struct!( DBusVariant[] ) pi = getCallValues!( DBusVariant[] )( message );
673 Struct!( DBusVariant[] ) po;
674 po.t[0] = o.identityArrayVariant( pi.t[0] );
675 sendReplyData!( DBusVariant[] )( conn, message, po );
676 }
677 break;
678 case "Sum|ai":
679 {
680 Struct!( int[] ) pi = getCallValues!( int[] )( message );
681 Struct!( long ) po;
682 po.t[0] = o.Sum( pi.t[0] );
683 sendReplyData!( long )( conn, message, po );
684 }
685 break;
686 case "Sum|ay":
687 {
688 Struct!( byte[] ) pi = getCallValues!( byte[] )( message );
689 Struct!( uint ) po;
690 po.t[0] = o.Sum( pi.t[0] );
691 sendReplyData!( uint )( conn, message, po );
692 }
693 break;
694 case "InvertMapping|a{ss}":
695 {
696 Struct!( char[][ char[] ] ) pi = getCallValues!( char[][ char[] ] )( message );
697 Struct!( char[][][ char[] ] ) po;
698 po.t[0] = o.InvertMapping( pi.t[0] );
699 sendReplyData!( char[][][ char[] ] )( conn, message, po );
700 }
701 break;
702 case "DeStruct|(sun)":
703 {
704 Struct!( Struct!( char[], uint, short ) ) pi = getCallValues!( Struct!( char[], uint, short ) )( message );
705 Struct!( char[], uint, short ) po;
706 o.DeStruct( pi.t[0], po.t[0], po.t[1], po.t[2] );
707 sendReplyData!( char[], uint, short )( conn, message, po );
708 }
709 break;
710 case "Primitize|v":
711 {
712 Struct!( DBusVariant ) pi = getCallValues!( DBusVariant )( message );
713 Struct!( DBusVariant[] ) po;
714 po.t[0] = o.Primitize( pi.t[0] );
715 sendReplyData!( DBusVariant[] )( conn, message, po );
716 }
717 break;
718 case "Invert|b":
719 {
720 Struct!( bool ) pi = getCallValues!( bool )( message );
721 Struct!( bool ) po;
722 po.t[0] = o.Invert( pi.t[0] );
723 sendReplyData!( bool )( conn, message, po );
724 }
725 break;
726 case "signalVoid>":
727 {
728 o.signalVoid().opCall();
729 }
730 break;
731 case "signalInt>i":
732 {
733 Struct!( int ) pi = getCallValues!( int )( message );
734 o.signalInt().opCall( pi.t[0] );
735 }
736 break;
737 case "signalStruct>(sun)":
738 {
739 Struct!( Struct!( char[], uint, short ) ) pi = getCallValues!( Struct!( char[], uint, short ) )( message );
740 o.signalStruct().opCall( pi.t[0] );
741 }
742 break;
743 case "signalArray>a(sun)":
744 {
745 Struct!( Struct!( char[], uint, short )[] ) pi = getCallValues!( Struct!( char[], uint, short )[] )( message );
746 o.signalArray().opCall( pi.t[0] );
747 }
748 break;
749 case "signalVariant>v":
750 {
751 Struct!( DBusVariant ) pi = getCallValues!( DBusVariant )( message );
752 o.signalVariant().opCall( pi.t[0] );
753 }
754 break;
755 default:
756 return DBusHandlerResult.DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
757 }
758 }
759 catch( Exception e ){
760 sendException( conn, message, e );
761 }
762 return DBusHandlerResult.DBUS_HANDLER_RESULT_HANDLED;
763 }
764
765 private void init_handlers(){
766 registerHandler(
767 DBusInterface.org.freedesktop.DBus.Peer.classinfo,
768 & intfHandler__org_freedesktop_DBus_Peer );
769 registerHandler(
770 DBusInterface.org.freedesktop.DBus.Introspectable.classinfo,
771 & intfHandler__org_freedesktop_DBus_Introspectable );
772 registerHandler(
773 DBusInterface.org.freedesktop.DBus.Properties.classinfo,
774 & intfHandler__org_freedesktop_DBus_Properties );
775 registerHandler(
776 DBusInterface.dbustests.Tests.classinfo,
777 & intfHandler__dbustests_Tests );
778 }
779
780 static this(){
781 init_introspectionData();
782 init_handlers();
783 }
784