1*3508ca0dSAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3*3508ca0dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*3508ca0dSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*3508ca0dSAndrew Rist * distributed with this work for additional information 6*3508ca0dSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*3508ca0dSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*3508ca0dSAndrew Rist * "License"); you may not use this file except in compliance 9*3508ca0dSAndrew Rist * with the License. You may obtain a copy of the License at 10*3508ca0dSAndrew Rist * 11*3508ca0dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*3508ca0dSAndrew Rist * 13*3508ca0dSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*3508ca0dSAndrew Rist * software distributed under the License is distributed on an 15*3508ca0dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*3508ca0dSAndrew Rist * KIND, either express or implied. See the License for the 17*3508ca0dSAndrew Rist * specific language governing permissions and limitations 18*3508ca0dSAndrew Rist * under the License. 19*3508ca0dSAndrew Rist * 20*3508ca0dSAndrew Rist *************************************************************/ 21*3508ca0dSAndrew Rist 22*3508ca0dSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir#ifndef _TEST_LANGUAGE_BINDING_IDL_ 25cdf0e10cSrcweir#define _TEST_LANGUAGE_BINDING_IDL_ 26cdf0e10cSrcweir 27cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl> 28cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl> 29cdf0e10cSrcweir 30cdf0e10cSrcweirmodule test 31cdf0e10cSrcweir{ 32cdf0e10cSrcweir 33cdf0e10cSrcweirenum TestEnum 34cdf0e10cSrcweir{ 35cdf0e10cSrcweir TEST, 36cdf0e10cSrcweir ONE, 37cdf0e10cSrcweir TWO, 38cdf0e10cSrcweir CHECK, 39cdf0e10cSrcweir LOLA, 40cdf0e10cSrcweir PALOO, 41cdf0e10cSrcweir ZA 42cdf0e10cSrcweir}; 43cdf0e10cSrcweir 44cdf0e10cSrcweir/** 45cdf0e10cSrcweir * simple c++ types 46cdf0e10cSrcweir */ 47cdf0e10cSrcweirstruct TestSimple 48cdf0e10cSrcweir{ 49cdf0e10cSrcweir boolean Bool; 50cdf0e10cSrcweir char Char; 51cdf0e10cSrcweir byte Byte; 52cdf0e10cSrcweir short Short; 53cdf0e10cSrcweir unsigned short UShort; 54cdf0e10cSrcweir long Long; 55cdf0e10cSrcweir unsigned long ULong; 56cdf0e10cSrcweir hyper Hyper; 57cdf0e10cSrcweir unsigned hyper UHyper; 58cdf0e10cSrcweir float Float; 59cdf0e10cSrcweir double Double; 60cdf0e10cSrcweir test::TestEnum Enum; 61cdf0e10cSrcweir}; 62cdf0e10cSrcweir/** 63cdf0e10cSrcweir * complex c++ types 64cdf0e10cSrcweir */ 65cdf0e10cSrcweirstruct TestElement : test::TestSimple 66cdf0e10cSrcweir{ 67cdf0e10cSrcweir string String; 68cdf0e10cSrcweir com::sun::star::uno::XInterface Interface; 69cdf0e10cSrcweir any Any; 70cdf0e10cSrcweir}; 71cdf0e10cSrcweirstruct TestDataElements : test::TestElement 72cdf0e10cSrcweir{ 73cdf0e10cSrcweir sequence<test::TestElement > Sequence; 74cdf0e10cSrcweir}; 75cdf0e10cSrcweir 76cdf0e10cSrcweirtypedef TestDataElements TestData; 77cdf0e10cSrcweir 78cdf0e10cSrcweir/** 79cdf0e10cSrcweir * Monster test interface to test language binding calls. 80cdf0e10cSrcweir * 81cdf0e10cSrcweir * @author Daniel Boelzle 82cdf0e10cSrcweir */ 83cdf0e10cSrcweirinterface XLBTestBase : com::sun::star::uno::XInterface 84cdf0e10cSrcweir{ 85cdf0e10cSrcweir /** 86cdf0e10cSrcweir * in parameter test, tests by calls reference also (complex types) 87cdf0e10cSrcweir */ 88cdf0e10cSrcweir [oneway] void setValues( [in] boolean bBool, [in] char cChar, [in] byte nByte, 89cdf0e10cSrcweir [in] short nShort, [in] unsigned short nUShort, 90cdf0e10cSrcweir [in] long nLong, [in] unsigned long nULong, 91cdf0e10cSrcweir [in] hyper nHyper, [in] unsigned hyper nUHyper, 92cdf0e10cSrcweir [in] float fFloat, [in] double fDouble, 93cdf0e10cSrcweir [in] test::TestEnum eEnum, [in] string aString, 94cdf0e10cSrcweir [in] com::sun::star::uno::XInterface xInterface, [in] any aAny, 95cdf0e10cSrcweir [in] sequence<test::TestElement > aSequence, 96cdf0e10cSrcweir [in] test::TestData aStruct ); 97cdf0e10cSrcweir /** 98cdf0e10cSrcweir * inout parameter test 99cdf0e10cSrcweir */ 100cdf0e10cSrcweir test::TestData setValues2( [inout] boolean bBool, [inout] char cChar, [inout] byte nByte, 101cdf0e10cSrcweir [inout] short nShort, [inout] unsigned short nUShort, 102cdf0e10cSrcweir [inout] long nLong, [inout] unsigned long nULong, 103cdf0e10cSrcweir [inout] hyper nHyper, [inout] unsigned hyper nUHyper, 104cdf0e10cSrcweir [inout] float fFloat, [inout] double fDouble, 105cdf0e10cSrcweir [inout] test::TestEnum eEnum, [inout] string aString, 106cdf0e10cSrcweir [inout] com::sun::star::uno::XInterface xInterface, [inout] any aAny, 107cdf0e10cSrcweir [inout] sequence<test::TestElement > aSequence, 108cdf0e10cSrcweir [inout] test::TestData aStruct ); 109cdf0e10cSrcweir 110cdf0e10cSrcweir /** 111cdf0e10cSrcweir * out parameter test 112cdf0e10cSrcweir */ 113cdf0e10cSrcweir test::TestData getValues( [out] boolean bBool, [out] char cChar, [out] byte nByte, 114cdf0e10cSrcweir [out] short nShort, [out] unsigned short nUShort, 115cdf0e10cSrcweir [out] long nLong, [out] unsigned long nULong, 116cdf0e10cSrcweir [out] hyper nHyper, [out] unsigned hyper nUHyper, 117cdf0e10cSrcweir [out] float fFloat, [out] double fDouble, 118cdf0e10cSrcweir [out] test::TestEnum eEnum, [out] string aString, 119cdf0e10cSrcweir [out] com::sun::star::uno::XInterface xInterface, [out] any aAny, 120cdf0e10cSrcweir [out] sequence<test::TestElement > aSequence, 121cdf0e10cSrcweir [out] test::TestData aStruct ); 122cdf0e10cSrcweir 123cdf0e10cSrcweir [attribute] boolean Bool; 124cdf0e10cSrcweir [attribute] byte Byte; 125cdf0e10cSrcweir [attribute] char Char; 126cdf0e10cSrcweir [attribute] short Short; 127cdf0e10cSrcweir [attribute] unsigned short UShort; 128cdf0e10cSrcweir [attribute] long Long; 129cdf0e10cSrcweir [attribute] unsigned long ULong; 130cdf0e10cSrcweir [attribute] hyper Hyper; 131cdf0e10cSrcweir [attribute] unsigned hyper UHyper; 132cdf0e10cSrcweir [attribute] float Float; 133cdf0e10cSrcweir [attribute] double Double; 134cdf0e10cSrcweir [attribute] test::TestEnum Enum; 135cdf0e10cSrcweir [attribute] string String; 136cdf0e10cSrcweir [attribute] com::sun::star::uno::XInterface Interface; 137cdf0e10cSrcweir [attribute] any Any; 138cdf0e10cSrcweir [attribute] sequence<test::TestElement > Sequence; 139cdf0e10cSrcweir [attribute] test::TestData Struct; 140cdf0e10cSrcweir}; 141cdf0e10cSrcweir 142cdf0e10cSrcweir 143cdf0e10cSrcweir/** 144cdf0e10cSrcweir * Inherting from monster; adds raiseException(). 145cdf0e10cSrcweir * 146cdf0e10cSrcweir * @author Daniel Boelzle 147cdf0e10cSrcweir */ 148cdf0e10cSrcweirinterface XLanguageBindingTest : test::XLBTestBase 149cdf0e10cSrcweir{ 150cdf0e10cSrcweir /** 151cdf0e10cSrcweir * params are there only for dummy, to test if all temp out params will be released. 152cdf0e10cSrcweir */ 153cdf0e10cSrcweir test::TestData raiseException( [out] boolean bBool, [out] char cChar, [out] byte nByte, 154cdf0e10cSrcweir [out] short nShort, [out] unsigned short nUShort, 155cdf0e10cSrcweir [out] long nLong, [out] unsigned long nULong, 156cdf0e10cSrcweir [out] hyper nHyper, [out] unsigned hyper nUHyper, 157cdf0e10cSrcweir [out] float fFloat, [out] double fDouble, 158cdf0e10cSrcweir [out] test::TestEnum eEnum, [out] string aString, 159cdf0e10cSrcweir [out] com::sun::star::uno::XInterface xInterface, [out] any aAny, 160cdf0e10cSrcweir [out] sequence<test::TestElement > aSequence, 161cdf0e10cSrcweir [out] test::TestData aStruct ) 162cdf0e10cSrcweir raises( com::sun::star::lang::IllegalArgumentException ); 163cdf0e10cSrcweir 164cdf0e10cSrcweir /** 165cdf0e10cSrcweir * raises runtime exception 166cdf0e10cSrcweir */ 167cdf0e10cSrcweir [attribute] long RuntimeException; 168cdf0e10cSrcweir}; 169cdf0e10cSrcweir 170cdf0e10cSrcweir}; // test 171cdf0e10cSrcweir 172cdf0e10cSrcweir 173cdf0e10cSrcweir#endif 174