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