build fix
[LibreOffice.git] / extensions / test / ole / idl / oletest.idl
blobb23f20b21a65faf21cd8b541583b1391ad87b529
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 #include <com/sun/star/uno/XInterface.idl>
21 #include <com/sun/star/script/XInvocation.idl>
22 #include <com/sun/star/beans/XPropertySet.idl>
23 #include <com/sun/star/lang/XEventListener.idl>
26 module oletest
29 interface XTestSequence: com::sun::star::uno::XInterface
31 sequence<byte> methodByte( [in] sequence<byte> aSeq );
32 sequence<float> methodFloat( [in] sequence<float> aSeq);
33 sequence<double> methodDouble( [in] sequence<double> aSeq);
34 sequence<boolean> methodBool( [in] sequence<boolean> aSeq);
35 sequence<short> methodShort( [in] sequence<short> aSeq);
36 sequence<unsigned short> methodUShort( [in] sequence<unsigned short> aSeq);
37 sequence<long> methodLong( [in] sequence<long> aSeq);
38 sequence<unsigned long> methodULong( [in] sequence<unsigned long> aSeq);
39 sequence<string> methodString( [in] sequence<string> aSeq);
40 sequence<char> methodChar( [in] sequence<char> aSeq);
41 sequence<any> methodAny ( [in] sequence<any> aSeq);
42 sequence<type> methodType ( [in] sequence<type> aSeq);
43 sequence<com::sun::star::uno::XInterface> methodXInterface ( [in] sequence<com::sun::star::uno::XInterface> aSeq);
44 sequence< sequence <long> > methodSequence( [in] sequence< sequence< long > > aSeq);
45 sequence< sequence <sequence <long> > > methodSequence2( [in] sequence< sequence< sequence<long> > > aSeq);
46 sequence< com::sun::star::lang::XEventListener > methodXEventListeners( [in] sequence<com::sun::star::lang::XEventListener> aSeq);
47 sequence< sequence< com::sun::star::lang::XEventListener > > methodXEventListenersMul( [in] sequence< sequence< com::sun::star::lang::XEventListener> > aSeq);
49 [attribute] sequence<byte> AttrByte;
50 [attribute] sequence<float> AttrFloat;
51 [attribute] sequence<double> AttrDouble;
52 [attribute] sequence<boolean> AttrBool;
53 [attribute] sequence<short> AttrShort;
54 [attribute] sequence<unsigned short> AttrUShort;
55 [attribute] sequence<long> AttrLong;
56 [attribute] sequence<unsigned long> AttrULong;
57 [attribute] sequence<string> AttrString;
58 [attribute] sequence<char> AttrChar;
59 [attribute] sequence<any> AttrAny;
60 [attribute] sequence<type> AttrType;
61 [attribute] sequence< sequence<long> > AttrSequence;
62 [attribute] sequence< sequence< sequence <long> > > AttrSequence2;
63 [attribute] sequence< com::sun::star::uno::XInterface > AttrXInterface;
65 [attribute] byte AByte;
66 [attribute] float AFloat;
67 [attribute] double ADouble;
68 [attribute] boolean ABool;
69 [attribute] short AShort;
70 [attribute] unsigned short AUShort;
71 [attribute] long ALong;
72 [attribute] unsigned long AULong;
73 [attribute] string AString;
74 [attribute] char AChar;
75 [attribute] any AAny;
76 [attribute] type AType;
77 [attribute] com::sun::star::uno::XInterface AXInterface;
78 [attribute] com::sun::star::script::XInvocation AXInvocation;
80 void testout_methodByte( [out] byte rOut );
81 void testout_methodFloat( [out] float rOut);
82 void testout_methodDouble( [out] double rOut);
83 void testout_methodBool( [out] boolean rOut);
84 void testout_methodShort( [out] short rOut);
85 void testout_methodUShort( [out] unsigned short rOut);
86 void testout_methodLong( [out] long rOut);
87 void testout_methodULong( [out] unsigned long rOut);
88 void testout_methodHyper( [out] hyper rOut);
89 void testout_methodUHyper( [out] unsigned hyper rOut);
90 void testout_methodString( [out] string rOut);
91 void testout_methodChar( [out] char rOut);
92 void testout_methodAny ( [out] any rOut);
93 void testout_methodType ( [out] type rOut);
94 void testout_methodSequence( [out] sequence< long > rOut);
95 void testout_methodSequence2( [out] sequence < sequence< long > > rOut);
96 void testout_methodXInterface( [out] com::sun::star::uno::XInterface rOut);
98 void testout_methodMulParams1( [out] long rout1, [out] long rout2);
99 void testout_methodMulParams2( [out] long rout1, [out] long rout2, [out] string rout3);
100 void testout_methodMulParams3( [in] string sin, [out] string sout);
101 void testout_methodMulParams4( [in] float in1, [out] float out1, [in] long in2, [out] long out2, [in] long in3);
103 void testinout_methodByte( [inout] byte rOut );
104 void testinout_methodFloat( [inout] float rOut);
105 void testinout_methodDouble( [inout] double rOut);
106 void testinout_methodBool( [inout] boolean rOut);
107 void testinout_methodShort( [inout] short rOut);
108 void testinout_methodUShort( [inout] unsigned short rOut);
109 void testinout_methodLong( [inout] long rOut);
110 void testinout_methodULong( [inout] unsigned long rOut);
111 void testinout_methodHyper( [inout] hyper rOut);
112 void testinout_methodUHyper( [inout] unsigned hyper rOut);
113 void testinout_methodString( [inout] string rOut);
114 void testinout_methodChar( [inout] char rOut);
115 void testinout_methodAny ( [inout] any rOut);
116 void testinout_methodType ( [inout] type rOut);
117 void testinout_methodSequence( [inout] sequence< long > rOut);
118 void testinout_methodSequence2( [inout] sequence < sequence< long > > rOut);
119 void testinout_methodXInterface( [inout] com::sun::star::script::XInvocation rOut);
120 void testinout_methodXInterface2( [inout] com::sun::star::uno::XInterface rOut);
122 any methodAnyTest1( [in] any rIn);
123 [attribute] any AttrAny2;
126 interface XTestStruct: com::sun::star::uno::XInterface
128 // Method taking structs as arguments
129 void methodStruct( [in] com::sun::star::beans::Property aProp);
130 // Methods returning structs
131 com::sun::star::beans::Property retMethodStruct();
132 // Attributes as structs
133 [attribute] com::sun::star::beans::Property AttrStruct;
135 com::sun::star::beans::Property methodStruct2( [in] com::sun::star::beans::Property aProp);
139 struct SimpleStruct
141 string message;
144 interface XTestInParameters: com::sun::star::uno::XInterface
146 byte in_methodByte( [in] byte rIn );
147 float in_methodFloat( [in] float rIn);
148 double in_methodDouble( [in] double rIn);
149 boolean in_methodBool( [in] boolean rIn);
150 short in_methodShort( [in] short rIn);
151 unsigned short in_methodUShort( [in] unsigned short rIn);
152 long in_methodLong( [in] long rIn);
153 unsigned long in_methodULong( [in] unsigned long rIn);
154 hyper in_methodHyper( [in] hyper rIn);
155 unsigned hyper in_methodUHyper( [in] unsigned hyper rIn);
156 string in_methodString( [in] string rIn);
157 char in_methodChar( [in] char rIn);
158 any in_methodAny ( [in] any rIn);
159 type in_methodType ( [in] type rIn);
160 com::sun::star::uno::XInterface in_methodXInterface([in] com::sun::star::uno::XInterface rIn);
161 com::sun::star::script::XInvocation in_methodInvocation( [in] com::sun::star::script::XInvocation inv);
162 SimpleStruct in_methodStruct( [in] SimpleStruct aStruct);
163 void in_methodAll( [in] byte b, [in] float f, [in] double d, [in] boolean abool, [in]short sh,
164 [in] unsigned short us, [in] long l, [in] unsigned long ul,
165 [in] string s, [in] char c, [in] any a, [in] type t, [in] com::sun::star::script::XInvocation inv);
169 enum SimpleEnum
176 interface XTestOther: com::sun::star::uno::XInterface
178 // Any test
179 void other_methodAnyIn( [in] any rAny);
180 void other_methodAnyOut( [out] any rAny);
181 any other_methodAnyRet();
182 void in_float( [in] float val);
183 //typeInAny determines what type must be in rAny. If rAny contains
184 //a different type then an exception is being thrown
185 any other_methodAny([in] any rAny, [in] string typeInAny);
189 interface XSimple: com::sun::star::uno::XInterface
191 void func( [in] string message);
192 string getName();
195 interface XSimple2: com::sun::star::uno::XInterface
197 void func2( [in] string message);
198 string getName2();
201 interface XSimple3: com::sun::star::uno::XInterface
203 void func3( [in] string message);
204 string getName3();
208 interface XCallback: com::sun::star::uno::XInterface
210 void func1();
211 oletest::XSimple returnInterface();
212 void outInterface( [out] oletest::XSimple outInterface);
213 void outStruct( [out] oletest::SimpleStruct outStruct);
214 void outEnum( [out] oletest::SimpleEnum outEnum);
215 void outSeqAny( [out] sequence<any> outSeqAny);
216 void outSeqByte( [out] sequence<byte> outVal);
217 void outAny( [out] any outAny);
218 void outBool( [out] boolean outBool);
219 void outChar( [out] char outChar);
220 void outString( [out] string outString);
221 void outFloat( [out] float outFloat);
222 void outDouble( [out] double outDouble);
223 void outByte( [out] byte outByte);
224 void outShort( [out] short outShort);
225 void outLong( [out] long outLong);
226 void outValuesMixed( [in] long lval, [out] long outval, [in] string sval);
227 void outValuesAll( [out] oletest::XSimple outInterface,
228 [out] SimpleStruct outStruct ,
229 [out] SimpleEnum outEnum,
230 [out] sequence<any> outSeqAny,
231 [out] any outAny,
232 [out] boolean outBool,
233 [out] char outChar,
234 [out] string outString,
235 [out] float outFloat,
236 [out] double outDouble,
237 [out] byte outByte,
238 [out] short outShort,
239 [out] long outLong);
240 // IN OUT parameters
241 void inoutInterface( [inout] oletest::XSimple inoutVal);
242 void inoutStruct( [inout] oletest::SimpleStruct inoutVal);
243 void inoutEnum( [inout] oletest::SimpleEnum inoutVal);
244 void inoutSeqAny( [inout] sequence<any> inoutVal);
245 void inoutAny( [inout] any inoutVal);
246 void inoutBool( [inout] boolean inoutVal);
247 void inoutChar( [inout] char inoutVal);
248 void inoutString( [inout] string inoutVal);
249 void inoutFloat( [inout] float inoutVal);
250 void inoutDouble( [inout] double inoutVal);
251 void inoutByte( [inout] byte inoutVal);
252 void inoutShort( [inout] short inoutVal);
253 void inoutLong( [inout] long inoutVal);
255 void inoutValuesAll( [inout] oletest::XSimple aXSimple,
256 [inout] oletest::SimpleStruct aStruct,
257 [inout] oletest::SimpleEnum aEnum,
258 [inout] sequence<any> aSeq,
259 [inout] any aAny,
260 [inout] boolean aBool,
261 [inout] char aChar,
262 [inout] string aString,
263 [inout] float aFloat,
264 [inout] double aDouble,
265 [inout] byte aByte,
266 [inout] short aShort,
267 [inout] long aLong);
269 // IN parameter
271 void inValues( [in] char aChar, [in] long aLong, [in] string aString);
272 void inSeqByte( [in] sequence<byte> val);
273 void inSeqXEventListener( [in] sequence<com::sun::star::lang::XEventListener> listener, [in]
274 sequence<com::sun::star::lang::EventObject> events);
276 // Attributes
277 [attribute] oletest::XSimple simple;
284 interface XTestInterfaces: com::sun::star::uno::XInterface
286 // Any test
287 void testInterface( [in] oletest::XCallback xCallback, [in] long mode);
288 void testInterface2( [in] oletest::XSimple xSimple, [in] long mode);
291 interface XIdentity: com::sun::star::uno::XInterface
293 void setObject([in] com::sun::star::uno::XInterface val);
294 boolean isSame( [in] com::sun::star::uno::XInterface val);
296 com::sun::star::uno::XInterface getThis();
299 }; // oletest
301 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */