summaryrefslogtreecommitdiff
path: root/extensions/test/ole/idl/oletest.idl
blob: c2f2ecab426fe9928c10ae5c31152382a5d9411a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
/*************************************************************************
 *
 *  $RCSfile: oletest.idl,v $
 *
 *  $Revision: 1.4 $
 *
 *  last change: $Author: jl $ $Date: 2001-06-27 06:56:49 $
 *
 *  The Contents of this file are made available subject to the terms of
 *  either of the following licenses
 *
 *         - GNU Lesser General Public License Version 2.1
 *         - Sun Industry Standards Source License Version 1.1
 *
 *  Sun Microsystems Inc., October, 2000
 *
 *  GNU Lesser General Public License Version 2.1
 *  =============================================
 *  Copyright 2000 by Sun Microsystems, Inc.
 *  901 San Antonio Road, Palo Alto, CA 94303, USA
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License version 2.1, as published by the Free Software Foundation.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *  MA  02111-1307  USA
 *
 *
 *  Sun Industry Standards Source License Version 1.1
 *  =================================================
 *  The contents of this file are subject to the Sun Industry Standards
 *  Source License Version 1.1 (the "License"); You may not use this file
 *  except in compliance with the License. You may obtain a copy of the
 *  License at http://www.openoffice.org/license.html.
 *
 *  Software provided under this License is provided on an "AS IS" basis,
 *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
 *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
 *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
 *  See the License for the specific provisions governing your rights and
 *  obligations concerning the Software.
 *
 *  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
 *
 *  Copyright: 2000 by Sun Microsystems, Inc.
 *
 *  All Rights Reserved.
 *
 *  Contributor(s): _______________________________________
 *
 *
 ************************************************************************/
//#include <stardiv/uno/interface.idl>
#include <com/sun/star/uno/XInterface.idl>
#include <com/sun/star/script/XInvocation.idl>
//#include <stardiv/uno/beans/propset.idl>
#include <com/sun/star/beans/XPropertySet.idl>

module oletest
{

interface XTestSequence: com::sun::star::uno::XInterface
{
    sequence<byte> methodByte( [in] sequence<byte> aSeq );
    sequence<float> methodFloat( [in] sequence<float> aSeq);
    sequence<double> methodDouble( [in] sequence<double> aSeq);
    sequence<boolean> methodBool( [in] sequence<boolean> aSeq);
    sequence<short> methodShort( [in] sequence<short> aSeq);
    sequence<unsigned short> methodUShort( [in] sequence<unsigned short> aSeq);
    sequence<long> methodLong( [in] sequence<long> aSeq);
    sequence<unsigned long> methodULong( [in] sequence<unsigned long> aSeq);
    sequence<string> methodString( [in] sequence<string> aSeq);
    sequence<char> methodChar( [in] sequence<char> aSeq);
    sequence<any> methodAny ( [in] sequence<any> aSeq);
    sequence<com::sun::star::uno::XInterface> methodXInterface ( [in] sequence<com::sun::star::uno::XInterface> aSeq);
    sequence< sequence <long> > methodSequence( [in] sequence< sequence< long > > aSeq);
    sequence< sequence <sequence <long> > > methodSequence2( [in] sequence< sequence< sequence<long> > > aSeq);

    [attribute] sequence<byte> AttrByte;
    [attribute] sequence<float> AttrFloat;
    [attribute] sequence<double> AttrDouble;
    [attribute] sequence<boolean> AttrBool;
    [attribute] sequence<short> AttrShort;
    [attribute] sequence<unsigned short> AttrUShort;
    [attribute] sequence<long> AttrLong;
    [attribute] sequence<unsigned long> AttrULong;
    [attribute] sequence<string> AttrString;
    [attribute] sequence<char> AttrChar;
    [attribute] sequence<any> AttrAny;
    [attribute] sequence< sequence<long> > AttrSequence;
    [attribute] sequence< sequence< sequence <long> > > AttrSequence2;
    [attribute] sequence< com::sun::star::uno::XInterface > AttrXInterface;

    void testout_methodByte( [out] byte rOut );
    void testout_methodFloat( [out] float rOut);
    void testout_methodDouble( [out] double rOut);
    void testout_methodBool( [out] boolean rOut);
    void testout_methodShort( [out] short rOut);
    void testout_methodUShort( [out] unsigned short rOut);
    void testout_methodLong( [out]  long rOut);
    void testout_methodULong( [out] unsigned long rOut);
    void testout_methodString( [out] string rOut);
    void testout_methodChar( [out] char rOut);
    void testout_methodAny  ( [out] any rOut);
    void testout_methodSequence( [out] sequence< long > rOut);
    void testout_methodSequence2( [out] sequence < sequence< long > > rOut);
    void testout_methodXInterface( [out] com::sun::star::uno::XInterface rOut);

    void testout_methodMulParams1( [out] long rout1, [out] long rout2);
    void testout_methodMulParams2( [out] long rout1, [out] long rout2, [out] string rout3);
    void testout_methodMulParams3( [in] string sin, [out] string sout);
    void testout_methodMulParams4( [in] float in1, [out] float out1, [in] long in2, [out] long out2, [in] long in3);

    void testinout_methodByte( [inout] byte rOut );
    void testinout_methodFloat( [inout] float rOut);
    void testinout_methodDouble( [inout] double rOut);
    void testinout_methodBool( [inout] boolean rOut);
    void testinout_methodShort( [inout] short rOut);
    void testinout_methodUShort( [inout] unsigned short rOut);
    void testinout_methodLong( [inout]  long rOut);
    void testinout_methodULong( [inout] unsigned long rOut);
    void testinout_methodString( [inout] string rOut);
    void testinout_methodChar( [inout] char rOut);
    void testinout_methodAny    ( [inout] any rOut);
    void testinout_methodSequence( [inout] sequence< long > rOut);
    void testinout_methodSequence2( [inout] sequence < sequence< long > > rOut);
    void testinout_methodXInterface( [inout] com::sun::star::script::XInvocation rOut);

    any methodAnyTest1( [in] any rIn);
    [attribute]  any AttrAny2;

};
interface XTestStruct: com::sun::star::uno::XInterface
{
// Method taking structs as arguments
    void methodStruct( [in] com::sun::star::beans::Property aProp);
//  Methods returning structs
    com::sun::star::beans::Property retMethodStruct();
// Attributes as structs
    [attribute] com::sun::star::beans::Property AttrStruct;
};

interface XTestOutParameters: com::sun::star::uno::XInterface
{
    void out_methodByte( [out] byte rOut );
    void out_methodDouble( [out] double rOut);
    void out_methodBool( [out] boolean rOut);
    void out_methodShort( [out] short rOut);
    void out_methodUShort( [out] unsigned short rOut);
    void out_methodLong( [out]  long rOut);
    void out_methodULong( [out] unsigned long rOut);
    void out_methodString( [out] string rOut);
    void out_methodChar( [out] char rOut);
    void out_methodAny  ( [out] any rOut);
    void out_methodSequence( [out] sequence< long > rOut);
    void out_methodSequence2( [out] sequence < sequence< long > > rOut);

    void out_methodMulParams1( [out] long rout1, [out] long rout2);
    void out_methodMulParams2( [out] long rout1, [out] long rout2, [out] string rout3);
    void out_methodMulParams3( [in] string sin, [out] string sout);


};

struct SimpleStruct
{
    string message;
};

enum SimpleEnum
{
    A,
    B,
    C
};

interface XTestOther: com::sun::star::uno::XInterface
{
    // Any test
    void other_methodAnyIn( [in] any rAny);
    void other_methodAnyOut( [out] any rAny);
    any other_methodAnyRet();
    void in_float( [in] float val);
};


interface XSimple: com::sun::star::uno::XInterface
{
    void func( [in] string message);
    string getName();
};

interface XSimple2: com::sun::star::uno::XInterface
{
    void func2( [in] string message);
    string getName2();
};

interface XSimple3: com::sun::star::uno::XInterface
{
    void func3( [in] string message);
    string getName3();
};


interface XCallback: com::sun::star::uno::XInterface
{
    void func1();
    oletest::XSimple returnInterface();
    void outInterface( [out] oletest::XSimple outInterface);
    void outStruct( [out] oletest::SimpleStruct outStruct);
    void outEnum( [out] oletest::SimpleEnum outEnum);
    void outSeqAny( [out] sequence<any> outSeqAny);
    void outSeqByte( [out] sequence<byte> outVal);
    void outAny( [out] any outAny);
    void outBool( [out] boolean outBool);
    void outChar( [out] char outChar);
    void outString( [out] string outString);
    void outFloat( [out] float outFloat);
    void outDouble( [out] double outDouble);
    void outByte( [out] byte outByte);
    void outShort( [out] short outShort);
    void outLong( [out] long outLong);
    void outValuesMixed( [in] long lval, [out] long outval, [in] string sval);
    void outValuesAll( [out] oletest::XSimple outInterface,
                       [out] SimpleStruct outStruct ,
                       [out] SimpleEnum outEnum,
                       [out] sequence<any> outSeqAny,
                       [out] any outAny,
                       [out] boolean outBool,
                       [out] char outChar,
                       [out] string outString,
                       [out] float outFloat,
                       [out] double outDouble,
                       [out] byte   outByte,
                       [out] short outShort,
                       [out] long outLong);
// IN OUT parameters
    void inoutInterface( [inout] oletest::XSimple inoutVal);
    void inoutStruct( [inout] oletest::SimpleStruct inoutVal);
    void inoutEnum( [inout] oletest::SimpleEnum inoutVal);
    void inoutSeqAny( [inout] sequence<any> inoutVal);
    void inoutAny( [inout] any inoutVal);
    void inoutBool( [inout] boolean inoutVal);
    void inoutChar( [inout] char inoutVal);
    void inoutString( [inout] string inoutVal);
    void inoutFloat( [inout] float inoutVal);
    void inoutDouble( [inout] double inoutVal);
    void inoutByte( [inout] byte inoutVal);
    void inoutShort( [inout] short inoutVal);
    void inoutLong( [inout] long inoutVal);

    void inoutValuesAll( [inout] oletest::XSimple aXSimple,
                         [inout] oletest::SimpleStruct aStruct,
                         [inout] oletest::SimpleEnum aEnum,
                         [inout] sequence<any> aSeq,
                         [inout] any aAny,
                         [inout] boolean aBool,
                         [inout] char aChar,
                         [inout] string aString,
                         [inout] float aFloat,
                         [inout] double aDouble,
                         [inout] byte aByte,
                         [inout] short aShort,
                         [inout] long aLong);

    // IN parameter

    void inValues( [in] char aChar, [in] long aLong, [in] string aString);
    void inSeqByte( [in] sequence<byte> val);

    // Attributes
    [attribute] oletest::XSimple simple;




};


interface XTestInterfaces: com::sun::star::uno::XInterface
{
    // Any test
    void testInterface( [in] oletest::XCallback xCallback, [in] long mode);
    void testInterface2( [in] oletest::XSimple xSimple, [in] long mode);
};

}; // oletest