1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24#ifndef __com_sun_star_script_provider_XScript_idl__ 25#define __com_sun_star_script_provider_XScript_idl__ 26 27#ifndef __com_sun_star_uno_XInterface_idl__ 28#include <com/sun/star/uno/XInterface.idl> 29#endif 30 31#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 32#include <com/sun/star/lang/IllegalArgumentException.idl> 33#endif 34 35#ifndef __com_sun_star_script_CannotConvertException_idl__ 36#include <com/sun/star/script/CannotConvertException.idl> 37#endif 38 39#ifndef __com_sun_star_reflection_InvocationTargetException_idl__ 40#include <com/sun/star/reflection/InvocationTargetException.idl> 41#endif 42 43#ifndef __com_sun_star_script_provider_ScriptFrameworkErrorException_idl__ 44#include <com/sun/star/script/provider/ScriptFrameworkErrorException.idl> 45#endif 46 47//=========================================================================== 48 49module com { module sun { module star { module script { module provider { 50 51//=========================================================================== 52/** 53 This interface represents an invokable script or UNO function. 54*/ 55interface XScript : ::com::sun::star::uno::XInterface { 56 57 //---------------------------------------------------------------------- 58 /** 59 invoke the script or function represented by the implementing 60 object 61 62 @param aParams 63 all parameters; pure, out params are undefined in sequence, 64 i.e., the value has to be ignored by the callee 65 @param aOutParamIndex 66 out indices, indicating the position of the out or inout 67 parameters in the list of arguments to the script 68 @param aOutParam 69 out parameters<p> 70 For example, if the script had the signature<br> 71 <code>long foo( [inout] string a, [in] string b, [out] string c )</code> 72 <br> the call would look like<br> 73 <code>bar.invoke( {"foo", "foo2", "this-is-ignored" }, aOutParamIndex, aOutParam);</code> 74 <br> and after the call the out sequences would contain<br> 75 <listing> 76 aOutParamIndex={0,2}; 77 aOutParam={"string from a", "string from c"}; 78 </listing> 79 80 @returns 81 the value returned from the function being invoked 82 83 @throws ::com::sun::star::reflection::InvocationTargetException 84 if and error occurs while attempting to invoke a script the information is captured. If the error or exception is generated by the script itself it is wrapped as either ScriptErrorRaisedException or ScriptExceptionRaisedException or ScriptingFrameworkErrorException are wrapped as ScriptFrameworkErrorExceptions. 85 */ 86 any invoke( 87 [in] sequence<any> aParams, 88 [out] sequence<short> aOutParamIndex, 89 [out] sequence<any> aOutParam ) raises( 90 ::com::sun::star::script::provider::ScriptFrameworkErrorException , 91 ::com::sun::star::reflection::InvocationTargetException); 92 93}; 94 95//=========================================================================== 96}; }; }; }; }; // ::com::sun::star::script::provider 97 98#endif 99