merge the formfield patch from ooo-build
[ooovba.git] / extensions / test / ole / idl / oletest.idl
blob20444760aa963ea50e16725fdaf1353769b59652
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: oletest.idl,v $
10 * $Revision: 1.13 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #include <com/sun/star/uno/XInterface.idl>
32 #include <com/sun/star/script/XInvocation.idl>
33 #include <com/sun/star/beans/XPropertySet.idl>
34 #include <com/sun/star/lang/XEventListener.idl>
37 module oletest
40 interface XTestSequence: com::sun::star::uno::XInterface
42 sequence<byte> methodByte( [in] sequence<byte> aSeq );
43 sequence<float> methodFloat( [in] sequence<float> aSeq);
44 sequence<double> methodDouble( [in] sequence<double> aSeq);
45 sequence<boolean> methodBool( [in] sequence<boolean> aSeq);
46 sequence<short> methodShort( [in] sequence<short> aSeq);
47 sequence<unsigned short> methodUShort( [in] sequence<unsigned short> aSeq);
48 sequence<long> methodLong( [in] sequence<long> aSeq);
49 sequence<unsigned long> methodULong( [in] sequence<unsigned long> aSeq);
50 sequence<string> methodString( [in] sequence<string> aSeq);
51 sequence<char> methodChar( [in] sequence<char> aSeq);
52 sequence<any> methodAny ( [in] sequence<any> aSeq);
53 sequence<type> methodType ( [in] sequence<type> aSeq);
54 sequence<com::sun::star::uno::XInterface> methodXInterface ( [in] sequence<com::sun::star::uno::XInterface> aSeq);
55 sequence< sequence <long> > methodSequence( [in] sequence< sequence< long > > aSeq);
56 sequence< sequence <sequence <long> > > methodSequence2( [in] sequence< sequence< sequence<long> > > aSeq);
57 sequence< com::sun::star::lang::XEventListener > methodXEventListeners( [in] sequence<com::sun::star::lang::XEventListener> aSeq);
58 sequence< sequence< com::sun::star::lang::XEventListener > > methodXEventListenersMul( [in] sequence< sequence< com::sun::star::lang::XEventListener> > aSeq);
60 [attribute] sequence<byte> AttrByte;
61 [attribute] sequence<float> AttrFloat;
62 [attribute] sequence<double> AttrDouble;
63 [attribute] sequence<boolean> AttrBool;
64 [attribute] sequence<short> AttrShort;
65 [attribute] sequence<unsigned short> AttrUShort;
66 [attribute] sequence<long> AttrLong;
67 [attribute] sequence<unsigned long> AttrULong;
68 [attribute] sequence<string> AttrString;
69 [attribute] sequence<char> AttrChar;
70 [attribute] sequence<any> AttrAny;
71 [attribute] sequence<type> AttrType;
72 [attribute] sequence< sequence<long> > AttrSequence;
73 [attribute] sequence< sequence< sequence <long> > > AttrSequence2;
74 [attribute] sequence< com::sun::star::uno::XInterface > AttrXInterface;
76 [attribute] byte AByte;
77 [attribute] float AFloat;
78 [attribute] double ADouble;
79 [attribute] boolean ABool;
80 [attribute] short AShort;
81 [attribute] unsigned short AUShort;
82 [attribute] long ALong;
83 [attribute] unsigned long AULong;
84 [attribute] string AString;
85 [attribute] char AChar;
86 [attribute] any AAny;
87 [attribute] type AType;
88 [attribute] com::sun::star::uno::XInterface AXInterface;
89 [attribute] com::sun::star::script::XInvocation AXInvocation;
91 void testout_methodByte( [out] byte rOut );
92 void testout_methodFloat( [out] float rOut);
93 void testout_methodDouble( [out] double rOut);
94 void testout_methodBool( [out] boolean rOut);
95 void testout_methodShort( [out] short rOut);
96 void testout_methodUShort( [out] unsigned short rOut);
97 void testout_methodLong( [out] long rOut);
98 void testout_methodULong( [out] unsigned long rOut);
99 void testout_methodHyper( [out] hyper rOut);
100 void testout_methodUHyper( [out] unsigned hyper rOut);
101 void testout_methodString( [out] string rOut);
102 void testout_methodChar( [out] char rOut);
103 void testout_methodAny ( [out] any rOut);
104 void testout_methodType ( [out] type rOut);
105 void testout_methodSequence( [out] sequence< long > rOut);
106 void testout_methodSequence2( [out] sequence < sequence< long > > rOut);
107 void testout_methodXInterface( [out] com::sun::star::uno::XInterface rOut);
109 void testout_methodMulParams1( [out] long rout1, [out] long rout2);
110 void testout_methodMulParams2( [out] long rout1, [out] long rout2, [out] string rout3);
111 void testout_methodMulParams3( [in] string sin, [out] string sout);
112 void testout_methodMulParams4( [in] float in1, [out] float out1, [in] long in2, [out] long out2, [in] long in3);
114 void testinout_methodByte( [inout] byte rOut );
115 void testinout_methodFloat( [inout] float rOut);
116 void testinout_methodDouble( [inout] double rOut);
117 void testinout_methodBool( [inout] boolean rOut);
118 void testinout_methodShort( [inout] short rOut);
119 void testinout_methodUShort( [inout] unsigned short rOut);
120 void testinout_methodLong( [inout] long rOut);
121 void testinout_methodULong( [inout] unsigned long rOut);
122 void testinout_methodHyper( [inout] hyper rOut);
123 void testinout_methodUHyper( [inout] unsigned hyper rOut);
124 void testinout_methodString( [inout] string rOut);
125 void testinout_methodChar( [inout] char rOut);
126 void testinout_methodAny ( [inout] any rOut);
127 void testinout_methodType ( [inout] type rOut);
128 void testinout_methodSequence( [inout] sequence< long > rOut);
129 void testinout_methodSequence2( [inout] sequence < sequence< long > > rOut);
130 void testinout_methodXInterface( [inout] com::sun::star::script::XInvocation rOut);
131 void testinout_methodXInterface2( [inout] com::sun::star::uno::XInterface rOut);
133 any methodAnyTest1( [in] any rIn);
134 [attribute] any AttrAny2;
137 interface XTestStruct: com::sun::star::uno::XInterface
139 // Method taking structs as arguments
140 void methodStruct( [in] com::sun::star::beans::Property aProp);
141 // Methods returning structs
142 com::sun::star::beans::Property retMethodStruct();
143 // Attributes as structs
144 [attribute] com::sun::star::beans::Property AttrStruct;
146 com::sun::star::beans::Property methodStruct2( [in] com::sun::star::beans::Property aProp);
150 struct SimpleStruct
152 string message;
155 interface XTestInParameters: com::sun::star::uno::XInterface
157 byte in_methodByte( [in] byte rIn );
158 float in_methodFloat( [in] float rIn);
159 double in_methodDouble( [in] double rIn);
160 boolean in_methodBool( [in] boolean rIn);
161 short in_methodShort( [in] short rIn);
162 unsigned short in_methodUShort( [in] unsigned short rIn);
163 long in_methodLong( [in] long rIn);
164 unsigned long in_methodULong( [in] unsigned long rIn);
165 hyper in_methodHyper( [in] hyper rIn);
166 unsigned hyper in_methodUHyper( [in] unsigned hyper rIn);
167 string in_methodString( [in] string rIn);
168 char in_methodChar( [in] char rIn);
169 any in_methodAny ( [in] any rIn);
170 type in_methodType ( [in] type rIn);
171 com::sun::star::uno::XInterface in_methodXInterface([in] com::sun::star::uno::XInterface rIn);
172 com::sun::star::script::XInvocation in_methodInvocation( [in] com::sun::star::script::XInvocation inv);
173 SimpleStruct in_methodStruct( [in] SimpleStruct aStruct);
174 void in_methodAll( [in] byte b, [in] float f, [in] double d, [in] boolean abool, [in]short sh,
175 [in] unsigned short us, [in] long l, [in] unsigned long ul,
176 [in] string s, [in] char c, [in] any a, [in] type t, [in] com::sun::star::script::XInvocation inv);
180 enum SimpleEnum
187 interface XTestOther: com::sun::star::uno::XInterface
189 // Any test
190 void other_methodAnyIn( [in] any rAny);
191 void other_methodAnyOut( [out] any rAny);
192 any other_methodAnyRet();
193 void in_float( [in] float val);
194 //typeInAny determines what type must be in rAny. If rAny contains
195 //a different type then an exception is being thrown
196 any other_methodAny([in] any rAny, [in] string typeInAny);
200 interface XSimple: com::sun::star::uno::XInterface
202 void func( [in] string message);
203 string getName();
206 interface XSimple2: com::sun::star::uno::XInterface
208 void func2( [in] string message);
209 string getName2();
212 interface XSimple3: com::sun::star::uno::XInterface
214 void func3( [in] string message);
215 string getName3();
219 interface XCallback: com::sun::star::uno::XInterface
221 void func1();
222 oletest::XSimple returnInterface();
223 void outInterface( [out] oletest::XSimple outInterface);
224 void outStruct( [out] oletest::SimpleStruct outStruct);
225 void outEnum( [out] oletest::SimpleEnum outEnum);
226 void outSeqAny( [out] sequence<any> outSeqAny);
227 void outSeqByte( [out] sequence<byte> outVal);
228 void outAny( [out] any outAny);
229 void outBool( [out] boolean outBool);
230 void outChar( [out] char outChar);
231 void outString( [out] string outString);
232 void outFloat( [out] float outFloat);
233 void outDouble( [out] double outDouble);
234 void outByte( [out] byte outByte);
235 void outShort( [out] short outShort);
236 void outLong( [out] long outLong);
237 void outValuesMixed( [in] long lval, [out] long outval, [in] string sval);
238 void outValuesAll( [out] oletest::XSimple outInterface,
239 [out] SimpleStruct outStruct ,
240 [out] SimpleEnum outEnum,
241 [out] sequence<any> outSeqAny,
242 [out] any outAny,
243 [out] boolean outBool,
244 [out] char outChar,
245 [out] string outString,
246 [out] float outFloat,
247 [out] double outDouble,
248 [out] byte outByte,
249 [out] short outShort,
250 [out] long outLong);
251 // IN OUT parameters
252 void inoutInterface( [inout] oletest::XSimple inoutVal);
253 void inoutStruct( [inout] oletest::SimpleStruct inoutVal);
254 void inoutEnum( [inout] oletest::SimpleEnum inoutVal);
255 void inoutSeqAny( [inout] sequence<any> inoutVal);
256 void inoutAny( [inout] any inoutVal);
257 void inoutBool( [inout] boolean inoutVal);
258 void inoutChar( [inout] char inoutVal);
259 void inoutString( [inout] string inoutVal);
260 void inoutFloat( [inout] float inoutVal);
261 void inoutDouble( [inout] double inoutVal);
262 void inoutByte( [inout] byte inoutVal);
263 void inoutShort( [inout] short inoutVal);
264 void inoutLong( [inout] long inoutVal);
266 void inoutValuesAll( [inout] oletest::XSimple aXSimple,
267 [inout] oletest::SimpleStruct aStruct,
268 [inout] oletest::SimpleEnum aEnum,
269 [inout] sequence<any> aSeq,
270 [inout] any aAny,
271 [inout] boolean aBool,
272 [inout] char aChar,
273 [inout] string aString,
274 [inout] float aFloat,
275 [inout] double aDouble,
276 [inout] byte aByte,
277 [inout] short aShort,
278 [inout] long aLong);
280 // IN parameter
282 void inValues( [in] char aChar, [in] long aLong, [in] string aString);
283 void inSeqByte( [in] sequence<byte> val);
284 void inSeqXEventListener( [in] sequence<com::sun::star::lang::XEventListener> listener, [in]
285 sequence<com::sun::star::lang::EventObject> events);
287 // Attributes
288 [attribute] oletest::XSimple simple;
295 interface XTestInterfaces: com::sun::star::uno::XInterface
297 // Any test
298 void testInterface( [in] oletest::XCallback xCallback, [in] long mode);
299 void testInterface2( [in] oletest::XSimple xSimple, [in] long mode);
302 interface XIdentity: com::sun::star::uno::XInterface
304 void setObject([in] com::sun::star::uno::XInterface val);
305 boolean isSame( [in] com::sun::star::uno::XInterface val);
307 com::sun::star::uno::XInterface getThis();
310 }; // oletest