merged tag ooo/OOO330_m14
[LibreOffice.git] / udkapi / com / sun / star / script / XInvocation.idl
blob9299dc8f8802c5f5354ecc0f49863065b31650c2
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_script_XInvocation_idl__
28 #define __com_sun_star_script_XInvocation_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include <com/sun/star/uno/XInterface.idl>
32 #endif
34 #ifndef __com_sun_star_beans_XIntrospectionAccess_idl__
35 #include <com/sun/star/beans/XIntrospectionAccess.idl>
36 #endif
38 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
39 #include <com/sun/star/lang/IllegalArgumentException.idl>
40 #endif
42 #ifndef __com_sun_star_script_CannotConvertException_idl__
43 #include <com/sun/star/script/CannotConvertException.idl>
44 #endif
46 #ifndef __com_sun_star_reflection_InvocationTargetException_idl__
47 #include <com/sun/star/reflection/InvocationTargetException.idl>
48 #endif
50 #ifndef __com_sun_star_beans_UnknownPropertyException_idl__
51 #include <com/sun/star/beans/UnknownPropertyException.idl>
52 #endif
55 //=============================================================================
57 module com { module sun { module star { module script {
59 //=============================================================================
60 /** gives access to an object's methods and properties.
61 Container access is available through
62 <type scope="com::sun::star::container">XIndexContainer</type>,
63 <type scope="com::sun::star::container">XNameContainer</type> and
64 <type scope="com::sun::star::container">XEnumerationAccess</type>.
65 </p>
67 published interface XInvocation: com::sun::star::uno::XInterface
69 //-------------------------------------------------------------------------
70 /** returns the introspection from this object or <NULL/>
71 if the object does not provide this information.
73 com::sun::star::beans::XIntrospectionAccess getIntrospection();
75 //-------------------------------------------------------------------------
76 /** provides access to methods exposed by an object.
78 @param aParams all parameters; pure out params are undefined in sequence,
79 the value has to be ignored by the callee
80 @param aOutParamIndex This sequence contains the indices of all parameters
81 that are specified as out or inout.
82 @param aOutParam This sequence contains the values of all parameters that
83 are specified as out or inout and corresponds with the
84 indices provided by the aOutParamIndex sequence.
86 Example: aOutParamIndex == { 1, 4 } means that
87 aOutParam[0] contains the out value of the aParams[1]
88 parameter and aOutParam[1] contains the out value of
89 the aParams[4] parameter.
91 any invoke( [in] string aFunctionName,
92 [in] sequence<any> aParams,
93 [out] sequence<short> aOutParamIndex,
94 [out] sequence<any> aOutParam )
95 raises( com::sun::star::lang::IllegalArgumentException,
96 com::sun::star::script::CannotConvertException,
97 com::sun::star::reflection::InvocationTargetException );
99 //-------------------------------------------------------------------------
100 /** sets a value to the property with the specified name.
102 <p> If the underlying object implements an
103 <type scope="com::sun::star::container">XNameContainer</type>,
104 then this method will insert the value if there is no such
105 <var>aPropertyName</var>.
107 </p>
109 void setValue( [in] string aPropertyName,
110 [in] any aValue )
111 raises( com::sun::star::beans::UnknownPropertyException,
112 com::sun::star::script::CannotConvertException,
113 com::sun::star::reflection::InvocationTargetException );
115 //-------------------------------------------------------------------------
116 /** returns the value of the property with the specified name.
118 @param aPropertyName
119 specifies the name of the property.
121 any getValue( [in] string aPropertyName )
122 raises( com::sun::star::beans::UnknownPropertyException );
124 //-------------------------------------------------------------------------
125 /** returns <TRUE/> if the method with the specified name exists, else <FALSE/>.
127 <p>This optimizes the calling sequence
128 ( <member>XInvocation::hasMethod</member>,
129 <member>XInvocation::invoke</member> )!</p>
131 @param aName
132 specifies the name of the method.
134 boolean hasMethod( [in] string aName );
136 //-------------------------------------------------------------------------
137 /** returns <TRUE/> if the property with the specified name exists, else <FALSE/>.
139 <p>This optimizes the calling sequence
140 ( <member>XInvocation::hasProperty</member>,
141 <member>XInvocation::getValue</member> ) or
143 ( <member>XInvocation::hasProperty</member>,
144 <member>XInvocation::setValue</member> )!
146 @param aName
147 specifies the name of the property.
149 boolean hasProperty( [in] string aName );
153 //=============================================================================
155 }; }; }; };
157 #endif