calc: on editing invalidation of view with different zoom is wrong
[LibreOffice.git] / testtools / source / bridgetest / idl / bridgetest.idl
blob4857522aa9a59d3f09c9d69d7b0503c2cecaba5f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 module test { module testtools { module bridgetest {
22 enum TestEnum
24 TEST,
25 ONE,
26 TWO,
27 CHECK,
28 LOLA,
29 PALOO,
33 enum TestBadEnum { M = 1 };
35 struct TestStruct
37 long member;
40 /**
41 * simple types
43 struct TestSimple
45 boolean Bool;
46 char Char;
47 byte Byte;
48 byte Byte2;
49 short Short;
50 short Short2;
51 unsigned short UShort;
52 long Long;
53 unsigned long ULong;
54 hyper Hyper;
55 unsigned hyper UHyper;
56 float Float;
57 double Double;
58 TestEnum Enum;
60 /**
61 * equal to max size returned in registers on x86_64
63 struct SmallStruct
65 hyper a;
66 hyper b;
68 /**
69 * equal to max size returned in registers on ia64
71 struct MediumStruct
73 hyper a;
74 hyper b;
75 hyper c;
76 hyper d;
78 /**
79 * bigger than max size returned in registers on ia64
81 struct BigStruct
83 hyper a;
84 hyper b;
85 hyper c;
86 hyper d;
87 hyper e;
88 hyper f;
89 hyper g;
90 hyper h;
92 /**
93 * two floats, BSDs/MacOSX on intel handle returning small
94 * structs differently than Linux
96 struct TwoFloats
98 float a;
99 float b;
102 * all floats, ia64 handles them specially
104 struct FourFloats
106 float a;
107 float b;
108 float c;
109 float d;
112 * Small struct with mixed float and integers.
113 * Should return in registers on BSDs/MACOSx
115 struct MixedFloatAndInteger
117 float a;
118 long b;
120 struct DoubleHyper {
121 double a;
122 hyper b;
124 struct HyperDouble {
125 hyper a;
126 double b;
128 struct FloatFloatLongByte {
129 float a;
130 float b;
131 long c;
132 byte d;
135 * Small struct with three bytes. Should *not* return in registers on
136 * BSDs/MACOSx
138 struct ThreeByteStruct
140 byte a;
141 byte b;
142 byte c;
145 * complex types adding string, interface, any
147 struct TestElement : TestSimple
149 string String;
150 com::sun::star::uno::XInterface Interface;
151 any Any;
154 * adding even more complexity, sequence< TestElement >
156 struct TestDataElements : TestElement
158 sequence< TestElement > Sequence;
162 * typedef used in interface
164 typedef TestDataElements TestData;
166 struct TestPolyStruct<T> { T member; };
167 struct TestPolyStruct2<T,C> {
168 T member1;
169 C member2;
172 interface XRecursiveCall : com::sun::star::uno::XInterface
174 /***
175 * @param nToCall If nToCall is 0, the method returns immediately.
176 * Otherwise, call the given interface with nToCall -1
178 ***/
179 void callRecursivly( [in] XRecursiveCall xCall , [in] long nToCall );
182 interface XMultiBase1 {
183 [attribute] double att1; // initially 0.0
184 long fn11([in] long arg); // return 11 * arg
185 string fn12([in] string arg); // return "12" + arg
188 interface XMultiBase2: XMultiBase1 {
189 long fn21([in] long arg); // return 21 * arg
190 string fn22([in] string arg); // return "22" + arg
193 interface XMultiBase3 {
194 [attribute] double att3; // initially 0.0
195 long fn31([in] long arg); // return 31 * arg
196 string fn32([in] string arg); // return "32" + arg
197 long fn33(); // return 33
200 interface XMultiBase3a: XMultiBase3 {};
202 interface XMultiBase4 {
203 long fn41([in] long arg); // return 41 * arg
206 interface XMultiBase5 {
207 interface XMultiBase3;
208 interface XMultiBase4;
209 interface XMultiBase1;
212 interface XMultiBase6 {
213 interface XMultiBase2;
214 interface XMultiBase3a;
215 interface XMultiBase5;
216 long fn61([in] long arg); // return 61 * arg
217 string fn62([in] string arg); // return "62" + arg
220 interface XMultiBase7 {
221 long fn71([in] long arg); // return 71 * arg
222 string fn72([in] string arg); // return "72" + arg
223 long fn73(); // return 73
226 interface XMulti {
227 interface XMultiBase6;
228 interface XMultiBase7;
232 * Monster test interface to test bridge calls.
233 * An implementation of this object has to store given values and return whenever there
234 * is an out param or return value.
236 interface XBridgeTestBase : com::sun::star::uno::XInterface
239 * in parameter test, tests by calls reference also (complex types)
241 void setValues( [in] boolean bBool,
242 [in] char cChar,
243 [in] byte nByte,
244 [in] short nShort,
245 [in] unsigned short nUShort,
246 [in] long nLong,
247 [in] unsigned long nULong,
248 [in] hyper nHyper,
249 [in] unsigned hyper nUHyper,
250 [in] float fFloat,
251 [in] double fDouble,
252 [in] TestEnum eEnum,
253 [in] string aString,
254 [in] byte aByte2,
255 [in] short aShort2,
256 [in] com::sun::star::uno::XInterface xInterface,
257 [in] any aAny,
258 [in] sequence< TestElement > aSequence,
259 [in] TestData aStruct );
261 * inout parameter test
263 * @return aStruct. The out parameter contain the values, that were previously set
264 * by setValues or (if not called before) default constructed values.
267 TestData setValues2( [inout] boolean bBool,
268 [inout] char cChar,
269 [inout] byte nByte,
270 [inout] short nShort,
271 [inout] unsigned short nUShort,
272 [inout] long nLong,
273 [inout] unsigned long nULong,
274 [inout] hyper nHyper,
275 [inout] unsigned hyper nUHyper,
276 [inout] float fFloat,
277 [inout] double fDouble,
278 [inout] TestEnum eEnum,
279 [inout] string aString,
280 [inout] byte aByte2,
281 [inout] short aShort2,
282 [inout] com::sun::star::uno::XInterface xInterface,
283 [inout] any aAny,
284 [inout] sequence< TestElement > aSequence,
285 [inout] TestData aStruct );
288 * out parameter test
290 TestData getValues( [out] boolean bBool,
291 [out] char cChar,
292 [out] byte nByte,
293 [out] short nShort,
294 [out] unsigned short nUShort,
295 [out] long nLong,
296 [out] unsigned long nULong,
297 [out] hyper nHyper,
298 [out] unsigned hyper nUHyper,
299 [out] float fFloat,
300 [out] double fDouble,
301 [out] TestEnum eEnum,
302 [out] string aString,
303 [out] byte aByte2,
304 [out] short aShort2,
305 [out] com::sun::star::uno::XInterface xInterface,
306 [out] any aAny,
307 [out] sequence< TestElement > aSequence,
308 [out] TestData aStruct );
311 * register return test 1
313 SmallStruct echoSmallStruct( [in] SmallStruct aStruct );
316 * register return test 2
318 MediumStruct echoMediumStruct( [in] MediumStruct aStruct );
321 * register return test 3
323 BigStruct echoBigStruct( [in] BigStruct aStruct );
326 * register return test 4
328 TwoFloats echoTwoFloats( [in] TwoFloats aStruct );
331 * register return test 5
333 FourFloats echoFourFloats( [in] FourFloats aStruct );
336 * register return test 6
338 MixedFloatAndInteger echoMixedFloatAndInteger( [in] MixedFloatAndInteger aStruct );
340 DoubleHyper echoDoubleHyper([in] DoubleHyper s);
342 HyperDouble echoHyperDouble([in] HyperDouble s);
344 FloatFloatLongByte echoFloatFloatLongByte([in] FloatFloatLongByte s);
347 * register return test 7
349 ThreeByteStruct echoThreeByteStruct( [in] ThreeByteStruct aStruct );
352 * PPC Alignment test (#i107182#)
354 long testPPCAlignment( [in] hyper l1, [in] hyper l2, [in] long i1, [in] hyper l3, [in] long i2 );
357 * PPC64 Alignment test
359 long testPPC64Alignment( [in] double d1, [in] double d2, [in] double d3, [in] long i1 );
363 * VFP ABI (armhf) doubles test
365 double testTenDoubles( [in] double d1, [in] double d2, [in] double d3, [in] double d4, [in] double d5, [in] double d6, [in] double d7, [in] double d8, [in] double d9, [in] double d10 );
367 [attribute] boolean Bool;
368 [attribute] byte Byte;
369 [attribute] char Char;
370 [attribute] short Short;
371 [attribute] unsigned short UShort;
372 [attribute] long Long;
373 [attribute] unsigned long ULong;
374 [attribute] hyper Hyper;
375 [attribute] unsigned hyper UHyper;
376 [attribute] float Float;
377 [attribute] double Double;
378 [attribute] TestEnum Enum;
379 [attribute] string String;
380 [attribute] byte Byte2;
381 [attribute] short Short2;
382 [attribute] com::sun::star::uno::XInterface Interface;
383 [attribute] any Any;
384 [attribute] sequence< TestElement > Sequence;
385 [attribute] TestData Struct;
387 [attribute] long RaiseAttr1 {
388 set raises (com::sun::star::lang::IllegalArgumentException);
390 [attribute, readonly] long RaiseAttr2 {
391 get raises (com::sun::star::lang::IllegalArgumentException);
394 TestPolyStruct<boolean> transportPolyBoolean(
395 [in] TestPolyStruct<boolean> arg);
396 void transportPolyHyper([inout] TestPolyStruct<hyper> arg);
397 void transportPolySequence(
398 [in] TestPolyStruct<sequence<any> > arg1,
399 [out] TestPolyStruct<sequence<any> > arg2);
401 TestPolyStruct<long> getNullPolyLong();
402 TestPolyStruct<string> getNullPolyString();
403 TestPolyStruct<type> getNullPolyType();
404 TestPolyStruct<any> getNullPolyAny();
405 TestPolyStruct<sequence<boolean> > getNullPolySequence();
406 TestPolyStruct<TestEnum> getNullPolyEnum();
407 TestPolyStruct<TestBadEnum> getNullPolyBadEnum();
408 TestPolyStruct<TestStruct> getNullPolyStruct();
409 TestPolyStruct<XBridgeTestBase> getNullPolyInterface();
411 /***
412 * This method returns the parameter value.
413 * Method to extensively test anys.
414 ****/
415 any transportAny( [in] any value );
417 /***
418 * methods to check sequence of calls. Call call() and callOneway
419 * in an arbitrary sequence. Increase the callId for every call.
420 * The testobject sets an error flag.
422 @see testSequencePassed
423 ***/
424 void call( [in] long nCallId, [in] long nWaitMUSEC );
425 void callOneway( [in] long nCallId, [in] long nWaitMUSEC );
426 boolean sequenceOfCallTestPassed();
428 /****
429 * methods to check, if threads thread identity is holded.
431 ***/
432 void startRecursiveCall( [in] XRecursiveCall xCall , [in] long nToCall );
434 XMulti getMulti();
435 string testMulti([in] XMulti multi);
440 * Inheriting from monster; adds raiseException(), attribute raising RuntimeException.
442 interface XBridgeTest : XBridgeTestBase
445 * the exception struct returned has to be filled with given arguments.
446 * return value is for dummy.
448 TestData raiseException( [in] short ArgumentPosition,
449 [in] string Message,
450 [in] com::sun::star::uno::XInterface Context )
451 raises( com::sun::star::lang::IllegalArgumentException );
455 * Throws runtime exception.
456 * check remote bridges handle exceptions during oneway calls properly.
457 * Note that on client side the exception may fly or not. When it flies, it should
458 * have the proper message and context.
459 ***/
460 void raiseRuntimeExceptionOneway( [in] string Message,
461 [in] com::sun::star::uno::XInterface Context );
464 * raises runtime exception;
465 * the exception struct returned has to be filled with formerly set test data.
467 [attribute] long RuntimeException;
471 exception BadConstructorArguments: com::sun::star::uno::Exception {};
473 service Constructors: com::sun::star::uno::XInterface {
474 create1(
475 [in] boolean arg0,
476 [in] byte arg1,
477 [in] short arg2,
478 [in] unsigned short arg3,
479 [in] long arg4,
480 [in] unsigned long arg5,
481 [in] hyper arg6,
482 [in] unsigned hyper arg7,
483 [in] float arg8,
484 [in] double arg9,
485 [in] char arg10,
486 [in] string arg11,
487 [in] type arg12,
488 [in] any arg13,
489 [in] sequence< boolean > arg14,
490 [in] sequence< byte > arg15,
491 [in] sequence< short > arg16,
492 [in] sequence< unsigned short > arg17,
493 [in] sequence< long > arg18,
494 [in] sequence< unsigned long > arg19,
495 [in] sequence< hyper > arg20,
496 [in] sequence< unsigned hyper > arg21,
497 [in] sequence< float > arg22,
498 [in] sequence< double > arg23,
499 [in] sequence< char > arg24,
500 [in] sequence< string > arg25,
501 [in] sequence< type > arg26,
502 [in] sequence< any > arg27,
503 [in] sequence< sequence< boolean > > arg28,
504 [in] sequence< sequence< any > > arg29,
505 [in] sequence< TestEnum > arg30,
506 [in] sequence< TestStruct > arg31,
507 [in] sequence< TestPolyStruct< boolean > > arg32,
508 [in] sequence< TestPolyStruct< any > > arg33,
509 [in] sequence< com::sun::star::uno::XInterface > arg34,
510 [in] TestEnum arg35,
511 [in] TestStruct arg36,
512 [in] TestPolyStruct< boolean > arg37,
513 [in] TestPolyStruct< any > arg38,
514 [in] com::sun::star::uno::XInterface arg39)
515 raises (BadConstructorArguments);
517 create2([in] any... args) raises (BadConstructorArguments);
521 service Constructors2: XMultiBase1 {
523 create1(
524 [in] TestPolyStruct<type> arg1,
525 [in] TestPolyStruct<any> arg2,
526 [in] TestPolyStruct<boolean> arg3,
527 [in] TestPolyStruct<byte> arg4,
528 [in] TestPolyStruct<short> arg5,
529 [in] TestPolyStruct<long> arg6,
530 [in] TestPolyStruct<hyper> arg7,
531 [in] TestPolyStruct<char> arg8,
532 [in] TestPolyStruct<string> arg9,
533 [in] TestPolyStruct<float> arg10,
534 [in] TestPolyStruct<double> arg11,
535 [in] TestPolyStruct<com::sun::star::uno::XInterface> arg12,
536 [in] TestPolyStruct<com::sun::star::lang::XComponent> arg13,
537 [in] TestPolyStruct<TestEnum> arg14,
538 [in] TestPolyStruct<TestPolyStruct2<char,any> > arg15,
539 [in] TestPolyStruct<TestPolyStruct2<TestPolyStruct2<char,any>,string> > arg16,
540 [in] TestPolyStruct2<string, TestPolyStruct2<char, TestPolyStruct<any> > > arg17,
541 [in] TestPolyStruct2<TestPolyStruct2<char,any>, TestPolyStruct<char> > arg18,
542 [in] TestPolyStruct<sequence<type> > arg19,
543 [in] TestPolyStruct<sequence<any> > arg20,
544 [in] TestPolyStruct<sequence<boolean> > arg21,
545 [in] TestPolyStruct<sequence<byte> > arg22,
546 [in] TestPolyStruct<sequence<short> > arg23,
547 [in] TestPolyStruct<sequence<long> > arg24,
548 [in] TestPolyStruct<sequence<hyper> > arg25,
549 [in] TestPolyStruct<sequence<char> > arg26,
550 [in] TestPolyStruct<sequence<string> > arg27,
551 [in] TestPolyStruct<sequence<float> > arg28,
552 [in] TestPolyStruct<sequence<double> > arg29,
553 [in] TestPolyStruct<sequence<com::sun::star::uno::XInterface> > arg30,
554 [in] TestPolyStruct<sequence<com::sun::star::lang::XComponent> > arg31,
555 [in] TestPolyStruct<sequence<TestEnum> > arg32,
556 [in] TestPolyStruct<sequence<TestPolyStruct2<char, sequence<any> > > > arg33,
557 [in] TestPolyStruct<sequence<TestPolyStruct2<TestPolyStruct<char>, sequence<any> > > > arg34,
558 [in] TestPolyStruct<sequence<sequence<long> > > arg35,
559 [in] sequence<TestPolyStruct<long > > arg36,
560 [in] sequence<TestPolyStruct<TestPolyStruct2<char,any> > > arg37,
561 [in] sequence<TestPolyStruct<TestPolyStruct2<TestPolyStruct2<char,any>,string> > > arg38,
562 [in] sequence<TestPolyStruct2<string, TestPolyStruct2<char, TestPolyStruct<any> > > > arg39,
563 [in] sequence<TestPolyStruct2<TestPolyStruct2<char,any>, TestPolyStruct<char> > > arg40,
564 [in] sequence<sequence<TestPolyStruct< char > > > arg41,
565 [in] sequence<sequence<TestPolyStruct<TestPolyStruct2<char,any> > > >arg42,
566 [in] sequence<sequence<TestPolyStruct<TestPolyStruct2<TestPolyStruct2<char,any>,string> > > > arg43,
567 [in] sequence<sequence<TestPolyStruct2<string, TestPolyStruct2<char, TestPolyStruct<any> > > > > arg44,
568 [in] sequence<sequence<TestPolyStruct2<TestPolyStruct2<char,any>, TestPolyStruct<char> > > > arg45
572 interface XCurrentContextChecker {
573 boolean perform(
574 [in] XCurrentContextChecker other, [in] long setSteps,
575 [in] long checkSteps);
578 /** Extended tests with sequences.
580 interface XBridgeTest2 : XBridgeTest
582 sequence< boolean > setSequenceBool( [in] sequence< boolean > aSeq);
583 sequence< char > setSequenceChar( [in] sequence< char > aSeq);
584 sequence< byte> setSequenceByte( [in] sequence< byte > aSeq);
585 sequence< short> setSequenceShort( [in] sequence< short > aSeq);
586 sequence< unsigned short > setSequenceUShort( [in] sequence< unsigned short > aSeq);
587 sequence< long > setSequenceLong( [in] sequence< long > aSeq);
588 sequence< unsigned long > setSequenceULong( [in] sequence< unsigned long > aSeq);
589 sequence< hyper > setSequenceHyper( [in] sequence< hyper > aSeq);
590 sequence< unsigned hyper > setSequenceUHyper( [in] sequence< unsigned hyper > aSeq);
591 sequence< float > setSequenceFloat( [in] sequence< float > aSeq);
592 sequence< double > setSequenceDouble( [in] sequence< double > aSeq);
593 sequence< TestEnum > setSequenceEnum( [in] sequence< TestEnum > aSeq);
594 sequence< string > setSequenceString( [in] sequence< string > aString);
595 sequence< com::sun::star::uno::XInterface > setSequenceXInterface(
596 [in] sequence< com::sun::star::uno::XInterface > aSeq);
597 sequence< any > setSequenceAny( [in] sequence< any > aSeq);
598 sequence< TestElement > setSequenceStruct( [in] sequence< TestElement > aSeq);
600 sequence< sequence< long > > setDim2( [in] sequence< sequence< long > > aSeq);
601 sequence< sequence < sequence < long > > > setDim3(
602 [in] sequence< sequence < sequence < long > > > aSeq);
604 void setSequencesInOut( [inout] sequence< boolean > aSeqBoolean,
605 [inout] sequence< char > aSeqChar,
606 [inout] sequence< byte > aSeqByte,
607 [inout] sequence< short > aSeqShort,
608 [inout] sequence< unsigned short> aSeqUShort,
609 [inout] sequence< long > aSeqLong,
610 [inout] sequence< unsigned long > aSeqULong,
611 [inout] sequence< hyper > aSeqHyper,
612 [inout] sequence< unsigned hyper > aSeqUHyper,
613 [inout] sequence< float > aSeqFloat,
614 [inout] sequence< double > aSeqDouble,
615 [inout] sequence< TestEnum > aSeqEnum,
616 [inout] sequence< string > aSeqString,
617 [inout] sequence< com::sun::star::uno::XInterface > aSeqXInterface,
618 [inout] sequence< any > aSeqAny,
619 [inout] sequence< sequence< long > > aSeqDim2,
620 [inout] sequence< sequence < sequence < long > > > aSeqDim3);
622 void setSequencesOut( [out] sequence< boolean > aSeqBoolean,
623 [out] sequence< char > aSeqChar,
624 [out] sequence< byte > aSeqByte,
625 [out] sequence< short > aSeqShort,
626 [out] sequence< unsigned short> aSeqUShort,
627 [out] sequence< long > aSeqLong,
628 [out] sequence< unsigned long > aSeqULong,
629 [out] sequence< hyper > aSeqHyper,
630 [out] sequence< unsigned hyper > aSeqUHyper,
631 [out] sequence< float > aSeqFloat,
632 [out] sequence< double > aSeqDouble,
633 [out] sequence< TestEnum > aSeqEnum,
634 [out] sequence< string > aSeqString,
635 [out] sequence< com::sun::star::uno::XInterface > aSeqXInterface,
636 [out] sequence< any > aSeqAny,
637 [out] sequence< sequence< long > > aSeqDim2,
638 [out] sequence< sequence < sequence < long > > > aSeqDim3);
640 void testConstructorsService(
641 [in] com::sun::star::uno::XComponentContext context)
642 raises (BadConstructorArguments);
644 XCurrentContextChecker getCurrentContextChecker();
647 }; }; };
649 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */