Version 6.1.0.2, tag libreoffice-6.1.0.2
[LibreOffice.git] / stoc / test / language_binding.idl
blob6567f47ec898929e7312829a1edac03e7d965360
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 #ifndef _TEST_LANGUAGE_BINDING_IDL_
21 #define _TEST_LANGUAGE_BINDING_IDL_
23 #include <com/sun/star/uno/XInterface.idl>
24 #include <com/sun/star/lang/IllegalArgumentException.idl>
26 module test
29 enum TestEnum
31 TEST,
32 ONE,
33 TWO,
34 CHECK,
35 LOLA,
36 PALOO,
40 /**
41 * simple c++ types
43 struct TestSimple
45 boolean Bool;
46 char Char;
47 byte Byte;
48 short Short;
49 unsigned short UShort;
50 long Long;
51 unsigned long ULong;
52 hyper Hyper;
53 unsigned hyper UHyper;
54 float Float;
55 double Double;
56 test::TestEnum Enum;
58 /**
59 * complex c++ types
61 struct TestElement : test::TestSimple
63 string String;
64 com::sun::star::uno::XInterface Interface;
65 any Any;
67 struct TestDataElements : test::TestElement
69 sequence<test::TestElement > Sequence;
72 typedef TestDataElements TestData;
74 /**
75 * Monster test interface to test language binding calls.
77 * @author Daniel Boelzle
79 interface XLBTestBase : com::sun::star::uno::XInterface
81 /**
82 * in parameter test, tests by calls reference also (complex types)
84 void setValues( [in] boolean bBool, [in] char cChar, [in] byte nByte,
85 [in] short nShort, [in] unsigned short nUShort,
86 [in] long nLong, [in] unsigned long nULong,
87 [in] hyper nHyper, [in] unsigned hyper nUHyper,
88 [in] float fFloat, [in] double fDouble,
89 [in] test::TestEnum eEnum, [in] string aString,
90 [in] com::sun::star::uno::XInterface xInterface, [in] any aAny,
91 [in] sequence<test::TestElement > aSequence,
92 [in] test::TestData aStruct );
93 /**
94 * inout parameter test
96 test::TestData setValues2( [inout] boolean bBool, [inout] char cChar, [inout] byte nByte,
97 [inout] short nShort, [inout] unsigned short nUShort,
98 [inout] long nLong, [inout] unsigned long nULong,
99 [inout] hyper nHyper, [inout] unsigned hyper nUHyper,
100 [inout] float fFloat, [inout] double fDouble,
101 [inout] test::TestEnum eEnum, [inout] string aString,
102 [inout] com::sun::star::uno::XInterface xInterface, [inout] any aAny,
103 [inout] sequence<test::TestElement > aSequence,
104 [inout] test::TestData aStruct );
107 * out parameter test
109 test::TestData getValues( [out] boolean bBool, [out] char cChar, [out] byte nByte,
110 [out] short nShort, [out] unsigned short nUShort,
111 [out] long nLong, [out] unsigned long nULong,
112 [out] hyper nHyper, [out] unsigned hyper nUHyper,
113 [out] float fFloat, [out] double fDouble,
114 [out] test::TestEnum eEnum, [out] string aString,
115 [out] com::sun::star::uno::XInterface xInterface, [out] any aAny,
116 [out] sequence<test::TestElement > aSequence,
117 [out] test::TestData aStruct );
119 [attribute] boolean Bool;
120 [attribute] byte Byte;
121 [attribute] char Char;
122 [attribute] short Short;
123 [attribute] unsigned short UShort;
124 [attribute] long Long;
125 [attribute] unsigned long ULong;
126 [attribute] hyper Hyper;
127 [attribute] unsigned hyper UHyper;
128 [attribute] float Float;
129 [attribute] double Double;
130 [attribute] test::TestEnum Enum;
131 [attribute] string String;
132 [attribute] com::sun::star::uno::XInterface Interface;
133 [attribute] any Any;
134 [attribute] sequence<test::TestElement > Sequence;
135 [attribute] test::TestData Struct;
140 * Inherting from monster; adds raiseException().
142 * @author Daniel Boelzle
144 interface XLanguageBindingTest : test::XLBTestBase
147 * params are there only for dummy, to test if all temp out params will be released.
149 test::TestData raiseException( [out] boolean bBool, [out] char cChar, [out] byte nByte,
150 [out] short nShort, [out] unsigned short nUShort,
151 [out] long nLong, [out] unsigned long nULong,
152 [out] hyper nHyper, [out] unsigned hyper nUHyper,
153 [out] float fFloat, [out] double fDouble,
154 [out] test::TestEnum eEnum, [out] string aString,
155 [out] com::sun::star::uno::XInterface xInterface, [out] any aAny,
156 [out] sequence<test::TestElement > aSequence,
157 [out] test::TestData aStruct )
158 raises( com::sun::star::lang::IllegalArgumentException );
161 * raises runtime exception
163 [attribute] long RuntimeException;
166 }; // test
169 #endif
171 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */