merge the formfield patch from ooo-build
[ooovba.git] / cppu / test / language_binding.idl
blob7100a2abaf4213bc241f3803e7b5e8d706686fad
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: language_binding.idl,v $
10 * $Revision: 1.5 $
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 ************************************************************************/
30 #ifndef _TEST_LANGUAGE_BINDING_IDL_
31 #define _TEST_LANGUAGE_BINDING_IDL_
33 #include <com/sun/star/uno/XInterface.idl>
34 #include <com/sun/star/lang/IllegalArgumentException.idl>
36 module test
39 enum TestEnum
41 TEST,
42 ONE,
43 TWO,
44 CHECK,
45 LOLA,
46 PALOO,
50 /**
51 * simple c++ types
53 struct TestSimple
55 boolean Bool;
56 char Char;
57 byte Byte;
58 short Short;
59 unsigned short UShort;
60 long Long;
61 unsigned long ULong;
62 hyper Hyper;
63 unsigned hyper UHyper;
64 float Float;
65 double Double;
66 test::TestEnum Enum;
68 /**
69 * equal to max size returned in registers on x86_64
71 struct SmallStruct
73 hyper a;
74 hyper b;
76 /**
77 * equal to max size returned in registers on ia64
79 struct MediumStruct
81 hyper a;
82 hyper b;
83 hyper c;
84 hyper d;
86 /**
87 * bigger than max size returned in registers on ia64
89 struct BigStruct
91 hyper a;
92 hyper b;
93 hyper c;
94 hyper d;
95 hyper e;
96 hyper f;
97 hyper g;
98 hyper h;
101 * all floats, ia64 claims to handle them specially
103 struct AllFloats
105 float a;
106 float b;
107 float c;
108 float d;
112 * complex c++ types
114 struct TestElement : test::TestSimple
116 string String;
117 com::sun::star::uno::XInterface Interface;
118 any Any;
120 struct TestDataElements : test::TestElement
122 sequence<test::TestElement > Sequence;
125 typedef TestDataElements TestData;
127 /**
128 * Monster test interface to test language binding calls.
130 * @author Daniel Boelzle
132 interface XLBTestBase : com::sun::star::uno::XInterface
135 * in parameter test, tests by calls reference also (complex types)
137 [oneway] void setValues( [in] boolean bBool, [in] char cChar, [in] byte nByte,
138 [in] short nShort, [in] unsigned short nUShort,
139 [in] long nLong, [in] unsigned long nULong,
140 [in] hyper nHyper, [in] unsigned hyper nUHyper,
141 [in] float fFloat, [in] double fDouble,
142 [in] test::TestEnum eEnum, [in] string aString,
143 [in] com::sun::star::uno::XInterface xInterface, [in] any aAny,
144 [in] sequence<test::TestElement > aSequence,
145 [in] test::TestData aStruct );
147 * inout parameter test
149 test::TestData setValues2( [inout] boolean bBool, [inout] char cChar, [inout] byte nByte,
150 [inout] short nShort, [inout] unsigned short nUShort,
151 [inout] long nLong, [inout] unsigned long nULong,
152 [inout] hyper nHyper, [inout] unsigned hyper nUHyper,
153 [inout] float fFloat, [inout] double fDouble,
154 [inout] test::TestEnum eEnum, [inout] string aString,
155 [inout] com::sun::star::uno::XInterface xInterface, [inout] any aAny,
156 [inout] sequence<test::TestElement > aSequence,
157 [inout] test::TestData aStruct );
160 * out parameter test
162 test::TestData getValues( [out] boolean bBool, [out] char cChar, [out] byte nByte,
163 [out] short nShort, [out] unsigned short nUShort,
164 [out] long nLong, [out] unsigned long nULong,
165 [out] hyper nHyper, [out] unsigned hyper nUHyper,
166 [out] float fFloat, [out] double fDouble,
167 [out] test::TestEnum eEnum, [out] string aString,
168 [out] com::sun::star::uno::XInterface xInterface, [out] any aAny,
169 [out] sequence<test::TestElement > aSequence,
170 [out] test::TestData aStruct );
173 * register return test 1
175 test::SmallStruct echoSmallStruct( [in] test::SmallStruct aStruct );
178 * register return test 2
180 test::MediumStruct echoMediumStruct( [in] test::MediumStruct aStruct );
183 * register return test 3
185 test::BigStruct echoBigStruct( [in] test::BigStruct aStruct );
188 * register return test 4
190 test::AllFloats echoAllFloats( [in] test::AllFloats aStruct );
192 [attribute] boolean Bool;
193 [attribute] byte Byte;
194 [attribute] char Char;
195 [attribute] short Short;
196 [attribute] unsigned short UShort;
197 [attribute] long Long;
198 [attribute] unsigned long ULong;
199 [attribute] hyper Hyper;
200 [attribute] unsigned hyper UHyper;
201 [attribute] float Float;
202 [attribute] double Double;
203 [attribute] test::TestEnum Enum;
204 [attribute] string String;
205 [attribute] com::sun::star::uno::XInterface Interface;
206 [attribute] any Any;
207 [attribute] sequence<test::TestElement > Sequence;
208 [attribute] test::TestData Struct;
212 /**
213 * Inherting from monster; adds raiseException().
215 * @author Daniel Boelzle
217 interface XLanguageBindingTest : test::XLBTestBase
220 * params are there only for dummy, to test if all temp out params will be released.
222 test::TestData raiseException( [out] boolean bBool, [out] char cChar, [out] byte nByte,
223 [out] short nShort, [out] unsigned short nUShort,
224 [out] long nLong, [out] unsigned long nULong,
225 [out] hyper nHyper, [out] unsigned hyper nUHyper,
226 [out] float fFloat, [out] double fDouble,
227 [out] test::TestEnum eEnum, [out] string aString,
228 [out] com::sun::star::uno::XInterface xInterface, [out] any aAny,
229 [out] sequence<test::TestElement > aSequence,
230 [out] test::TestData aStruct )
231 raises( com::sun::star::lang::IllegalArgumentException );
234 * raises runtime exception
236 [attribute] long RuntimeException;
239 }; // test
242 #endif