xref: /aoo41x/main/extensions/test/ole/idl/oletest.idl (revision 757e8756)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#include <com/sun/star/uno/XInterface.idl>
25#include <com/sun/star/script/XInvocation.idl>
26#include <com/sun/star/beans/XPropertySet.idl>
27#include <com/sun/star/lang/XEventListener.idl>
28
29
30module oletest
31{
32
33interface XTestSequence: com::sun::star::uno::XInterface
34{
35	sequence<byte> methodByte( [in] sequence<byte> aSeq );
36	sequence<float> methodFloat( [in] sequence<float> aSeq);
37	sequence<double> methodDouble( [in] sequence<double> aSeq);
38	sequence<boolean> methodBool( [in] sequence<boolean> aSeq);
39	sequence<short> methodShort( [in] sequence<short> aSeq);
40	sequence<unsigned short> methodUShort( [in] sequence<unsigned short> aSeq);
41	sequence<long> methodLong( [in] sequence<long> aSeq);
42	sequence<unsigned long> methodULong( [in] sequence<unsigned long> aSeq);
43	sequence<string> methodString( [in] sequence<string> aSeq);
44	sequence<char> methodChar( [in] sequence<char> aSeq);
45	sequence<any> methodAny	( [in] sequence<any> aSeq);
46    sequence<type> methodType	( [in] sequence<type> aSeq);
47	sequence<com::sun::star::uno::XInterface> methodXInterface ( [in] sequence<com::sun::star::uno::XInterface> aSeq);
48	sequence< sequence <long> > methodSequence( [in] sequence< sequence< long > > aSeq);
49	sequence< sequence <sequence <long> > > methodSequence2( [in] sequence< sequence< sequence<long> > > aSeq);
50    sequence< com::sun::star::lang::XEventListener > methodXEventListeners( [in] sequence<com::sun::star::lang::XEventListener> aSeq);
51    sequence< sequence< com::sun::star::lang::XEventListener > > methodXEventListenersMul( [in] sequence< sequence< com::sun::star::lang::XEventListener> > aSeq);
52
53	[attribute] sequence<byte> AttrByte;
54	[attribute] sequence<float> AttrFloat;
55	[attribute] sequence<double> AttrDouble;
56	[attribute] sequence<boolean> AttrBool;
57	[attribute] sequence<short> AttrShort;
58	[attribute] sequence<unsigned short> AttrUShort;
59	[attribute] sequence<long> AttrLong;
60	[attribute] sequence<unsigned long> AttrULong;
61	[attribute] sequence<string> AttrString;
62	[attribute] sequence<char> AttrChar;
63	[attribute] sequence<any> AttrAny;
64    [attribute] sequence<type> AttrType;
65	[attribute] sequence< sequence<long> > AttrSequence;
66	[attribute] sequence< sequence< sequence <long> > > AttrSequence2;
67	[attribute] sequence< com::sun::star::uno::XInterface > AttrXInterface;
68
69	[attribute] byte AByte;
70	[attribute] float AFloat;
71	[attribute] double ADouble;
72	[attribute] boolean ABool;
73	[attribute] short AShort;
74	[attribute] unsigned short AUShort;
75	[attribute] long ALong;
76	[attribute] unsigned long AULong;
77	[attribute] string AString;
78	[attribute] char AChar;
79	[attribute] any AAny;
80    [attribute] type AType;
81	[attribute] com::sun::star::uno::XInterface  AXInterface;
82    [attribute] com::sun::star::script::XInvocation  AXInvocation;
83
84	void testout_methodByte( [out] byte rOut );
85	void testout_methodFloat( [out] float rOut);
86	void testout_methodDouble( [out] double rOut);
87	void testout_methodBool( [out] boolean rOut);
88	void testout_methodShort( [out] short rOut);
89	void testout_methodUShort( [out] unsigned short rOut);
90	void testout_methodLong( [out]  long rOut);
91	void testout_methodULong( [out] unsigned long rOut);
92 	void testout_methodHyper( [out]  hyper rOut);
93 	void testout_methodUHyper( [out] unsigned hyper rOut);
94    void testout_methodString( [out] string rOut);
95	void testout_methodChar( [out] char rOut);
96	void testout_methodAny	( [out] any rOut);
97    void testout_methodType	( [out] type rOut);
98	void testout_methodSequence( [out] sequence< long > rOut);
99	void testout_methodSequence2( [out] sequence < sequence< long > > rOut);
100	void testout_methodXInterface( [out] com::sun::star::uno::XInterface rOut);
101
102	void testout_methodMulParams1( [out] long rout1, [out] long rout2);
103	void testout_methodMulParams2( [out] long rout1, [out] long rout2, [out] string rout3);
104	void testout_methodMulParams3( [in] string sin, [out] string sout);
105	void testout_methodMulParams4( [in] float in1, [out] float out1, [in] long in2, [out] long out2, [in] long in3);
106
107	void testinout_methodByte( [inout] byte rOut );
108	void testinout_methodFloat( [inout] float rOut);
109	void testinout_methodDouble( [inout] double rOut);
110	void testinout_methodBool( [inout] boolean rOut);
111	void testinout_methodShort( [inout] short rOut);
112	void testinout_methodUShort( [inout] unsigned short rOut);
113	void testinout_methodLong( [inout]  long rOut);
114	void testinout_methodULong( [inout] unsigned long rOut);
115	void testinout_methodHyper( [inout]  hyper rOut);
116	void testinout_methodUHyper( [inout] unsigned hyper rOut);
117    void testinout_methodString( [inout] string rOut);
118	void testinout_methodChar( [inout] char rOut);
119	void testinout_methodAny	( [inout] any rOut);
120    void testinout_methodType	( [inout] type rOut);
121	void testinout_methodSequence( [inout] sequence< long > rOut);
122	void testinout_methodSequence2( [inout] sequence < sequence< long > > rOut);
123	void testinout_methodXInterface( [inout] com::sun::star::script::XInvocation rOut);
124	void testinout_methodXInterface2( [inout] com::sun::star::uno::XInterface rOut);
125
126	any methodAnyTest1( [in] any rIn);
127	[attribute]  any AttrAny2;
128
129};
130interface XTestStruct: com::sun::star::uno::XInterface
131{
132// Method taking structs as arguments
133	void methodStruct( [in] com::sun::star::beans::Property aProp);
134//	Methods returning structs
135	com::sun::star::beans::Property retMethodStruct();
136// Attributes as structs
137	[attribute] com::sun::star::beans::Property AttrStruct;
138
139    com::sun::star::beans::Property methodStruct2( [in] com::sun::star::beans::Property aProp);
140};
141
142
143struct SimpleStruct
144{
145	string message;
146};
147
148interface XTestInParameters: com::sun::star::uno::XInterface
149{
150	byte in_methodByte( [in] byte rIn );
151	float in_methodFloat( [in] float rIn);
152	double in_methodDouble( [in] double rIn);
153	boolean in_methodBool( [in] boolean rIn);
154	short in_methodShort( [in] short rIn);
155	unsigned short in_methodUShort( [in] unsigned short rIn);
156	long in_methodLong( [in]  long rIn);
157	unsigned long in_methodULong( [in] unsigned long rIn);
158    hyper in_methodHyper( [in]  hyper rIn);
159	unsigned hyper in_methodUHyper( [in] unsigned hyper rIn);
160	string in_methodString( [in] string rIn);
161	char in_methodChar( [in] char rIn);
162	any in_methodAny	( [in] any rIn);
163    type in_methodType	( [in] type rIn);
164    com::sun::star::uno::XInterface in_methodXInterface([in] com::sun::star::uno::XInterface rIn);
165	com::sun::star::script::XInvocation in_methodInvocation( [in] com::sun::star::script::XInvocation inv);
166	SimpleStruct in_methodStruct( [in] SimpleStruct aStruct);
167	void in_methodAll( [in] byte b, [in] float f, [in] double d, [in] boolean abool, [in]short sh,
168					   [in] unsigned short us, [in] long l, [in] unsigned long ul,
169					   [in] string s, [in] char c, [in] any a, [in] type t, [in] com::sun::star::script::XInvocation inv);
170};
171
172
173enum SimpleEnum
174{
175	A,
176	B,
177	C
178};
179
180interface XTestOther: com::sun::star::uno::XInterface
181{
182	// Any test
183	void other_methodAnyIn( [in] any rAny);
184	void other_methodAnyOut( [out] any rAny);
185	any other_methodAnyRet();
186	void in_float( [in] float val);
187    //typeInAny determines what type must be in rAny. If rAny contains
188    //a different type then an exception is being thrown
189    any other_methodAny([in] any rAny, [in] string typeInAny);
190};
191
192
193interface XSimple: com::sun::star::uno::XInterface
194{
195	void func( [in] string message);
196	string getName();
197};
198
199interface XSimple2: com::sun::star::uno::XInterface
200{
201	void func2( [in] string message);
202	string getName2();
203};
204
205interface XSimple3: com::sun::star::uno::XInterface
206{
207	void func3( [in] string message);
208	string getName3();
209};
210
211
212interface XCallback: com::sun::star::uno::XInterface
213{
214	void func1();
215	oletest::XSimple returnInterface();
216	void outInterface( [out] oletest::XSimple outInterface);
217	void outStruct( [out] oletest::SimpleStruct outStruct);
218	void outEnum( [out] oletest::SimpleEnum outEnum);
219	void outSeqAny( [out] sequence<any> outSeqAny);
220	void outSeqByte( [out] sequence<byte> outVal);
221	void outAny( [out] any outAny);
222	void outBool( [out] boolean outBool);
223	void outChar( [out] char outChar);
224	void outString( [out] string outString);
225	void outFloat( [out] float outFloat);
226	void outDouble( [out] double outDouble);
227	void outByte( [out] byte outByte);
228	void outShort( [out] short outShort);
229	void outLong( [out] long outLong);
230	void outValuesMixed( [in] long lval, [out] long outval, [in] string sval);
231	void outValuesAll( [out] oletest::XSimple outInterface,
232					   [out] SimpleStruct outStruct ,
233					   [out] SimpleEnum outEnum,
234					   [out] sequence<any> outSeqAny,
235					   [out] any outAny,
236					   [out] boolean outBool,
237					   [out] char outChar,
238					   [out] string outString,
239					   [out] float outFloat,
240					   [out] double outDouble,
241					   [out] byte	outByte,
242					   [out] short outShort,
243					   [out] long outLong);
244// IN OUT parameters
245	void inoutInterface( [inout] oletest::XSimple inoutVal);
246	void inoutStruct( [inout] oletest::SimpleStruct inoutVal);
247	void inoutEnum( [inout] oletest::SimpleEnum inoutVal);
248	void inoutSeqAny( [inout] sequence<any> inoutVal);
249	void inoutAny( [inout] any inoutVal);
250	void inoutBool( [inout] boolean inoutVal);
251	void inoutChar( [inout] char inoutVal);
252	void inoutString( [inout] string inoutVal);
253	void inoutFloat( [inout] float inoutVal);
254	void inoutDouble( [inout] double inoutVal);
255	void inoutByte( [inout] byte inoutVal);
256	void inoutShort( [inout] short inoutVal);
257	void inoutLong( [inout] long inoutVal);
258
259	void inoutValuesAll( [inout] oletest::XSimple aXSimple,
260						 [inout] oletest::SimpleStruct aStruct,
261						 [inout] oletest::SimpleEnum aEnum,
262						 [inout] sequence<any> aSeq,
263						 [inout] any aAny,
264						 [inout] boolean aBool,
265						 [inout] char aChar,
266						 [inout] string aString,
267						 [inout] float aFloat,
268						 [inout] double aDouble,
269						 [inout] byte aByte,
270						 [inout] short aShort,
271						 [inout] long aLong);
272
273	// IN parameter
274
275	void inValues( [in] char aChar, [in] long aLong, [in] string aString);
276	void inSeqByte( [in] sequence<byte> val);
277    void inSeqXEventListener( [in] sequence<com::sun::star::lang::XEventListener> listener, [in]
278                              sequence<com::sun::star::lang::EventObject> events);
279
280	// Attributes
281	[attribute] oletest::XSimple simple;
282
283
284
285
286};
287
288interface XTestInterfaces: com::sun::star::uno::XInterface
289{
290	// Any test
291	void testInterface( [in] oletest::XCallback xCallback, [in] long mode);
292	void testInterface2( [in] oletest::XSimple xSimple, [in] long mode);
293};
294
295interface XIdentity: com::sun::star::uno::XInterface
296{
297    void setObject([in] com::sun::star::uno::XInterface val);
298    boolean isSame( [in] com::sun::star::uno::XInterface val);
299
300    com::sun::star::uno::XInterface getThis();
301};
302
303}; // oletest
304
305