1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 __com_sun_star_script_provider_XScript_idl__
21 #define __com_sun_star_script_provider_XScript_idl__
23 #include
<com
/sun
/star
/uno
/XInterface.idl
>
24 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
25 #include
<com
/sun
/star
/script
/CannotConvertException.idl
>
26 #include
<com
/sun
/star
/reflection
/InvocationTargetException.idl
>
27 #include
<com
/sun
/star
/script
/provider
/ScriptFrameworkErrorException.idl
>
30 module com
{ module sun
{ module star
{ module script
{ module provider
{
33 This interface represents an invokable script or UNO function.
35 interface XScript
: ::com
::sun
::star
::uno
::XInterface
{
38 invoke the script or function represented by the implementing
42 all parameters; pure, out parameters are undefined in sequence,
43 i.e., the value has to be ignored by the callee
45 out indices, indicating the position of the out or inout
46 parameters in the list of arguments to the script
49 For example, if the script had the signature<br>
50 <code>long foo( [inout] string a, [in] string b, [out] string c )</code>
51 <br> the call would look like<br>
52 <code>bar.invoke( {"foo", "foo2", "this-is-ignored" }, aOutParamIndex, aOutParam);</code>
53 <br> and after the call the out sequences would contain<br>
56 aOutParam={"string from a", "string from c"};
60 the value returned from the function being invoked
62 @throws ::com::sun::star::reflection::InvocationTargetException
63 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 ScriptFrameworkErrorException are wrapped as ScriptFrameworkErrorExceptions.
66 [in] sequence
<any
> aParams
,
67 [out] sequence
<short> aOutParamIndex
,
68 [out] sequence
<any
> aOutParam
) raises
(
69 ::com
::sun
::star
::script
::provider
::ScriptFrameworkErrorException
,
70 ::com
::sun
::star
::reflection
::InvocationTargetException
);
74 }; }; }; }; }; // ::com::sun::star::script::provider
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */