update dev300-m58
[ooovba.git] / udkapi / com / sun / star / script / XInvocation.idl
blob33b02643f23669aaed77406be00c7160f4d705c9
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XInvocation.idl,v $
10 * $Revision: 1.11 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_script_XInvocation_idl__
31 #define __com_sun_star_script_XInvocation_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include <com/sun/star/uno/XInterface.idl>
35 #endif
37 #ifndef __com_sun_star_beans_XIntrospectionAccess_idl__
38 #include <com/sun/star/beans/XIntrospectionAccess.idl>
39 #endif
41 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
42 #include <com/sun/star/lang/IllegalArgumentException.idl>
43 #endif
45 #ifndef __com_sun_star_script_CannotConvertException_idl__
46 #include <com/sun/star/script/CannotConvertException.idl>
47 #endif
49 #ifndef __com_sun_star_reflection_InvocationTargetException_idl__
50 #include <com/sun/star/reflection/InvocationTargetException.idl>
51 #endif
53 #ifndef __com_sun_star_beans_UnknownPropertyException_idl__
54 #include <com/sun/star/beans/UnknownPropertyException.idl>
55 #endif
58 //=============================================================================
60 module com { module sun { module star { module script {
62 //=============================================================================
63 /** gives access to an object's methods and properties.
64 Container access is available through
65 <type scope="com::sun::star::container">XIndexContainer</type>,
66 <type scope="com::sun::star::container">XNameContainer</type> and
67 <type scope="com::sun::star::container">XEnumerationAccess</type>.
68 </p>
70 published interface XInvocation: com::sun::star::uno::XInterface
72 //-------------------------------------------------------------------------
73 /** returns the introspection from this object or <NULL/>
74 if the object does not provide this information.
76 com::sun::star::beans::XIntrospectionAccess getIntrospection();
78 //-------------------------------------------------------------------------
79 /** provides access to methods exposed by an object.
81 @param aParams all parameters; pure out params are undefined in sequence,
82 the value has to be ignored by the callee
83 @param aOutParamIndex This sequence contains the indices of all parameters
84 that are specified as out or inout.
85 @param aOutParam This sequence contains the values of all parameters that
86 are specified as out or inout and corresponds with the
87 indices provided by the aOutParamIndex sequence.
89 Example: aOutParamIndex == { 1, 4 } means that
90 aOutParam[0] contains the out value of the aParams[1]
91 parameter and aOutParam[1] contains the out value of
92 the aParams[4] parameter.
94 any invoke( [in] string aFunctionName,
95 [in] sequence<any> aParams,
96 [out] sequence<short> aOutParamIndex,
97 [out] sequence<any> aOutParam )
98 raises( com::sun::star::lang::IllegalArgumentException,
99 com::sun::star::script::CannotConvertException,
100 com::sun::star::reflection::InvocationTargetException );
102 //-------------------------------------------------------------------------
103 /** sets a value to the property with the specified name.
105 <p> If the underlying object implements an
106 <type scope="com::sun::star::container">XNameContainer</type>,
107 then this method will insert the value if there is no such
108 <var>aPropertyName</var>.
110 </p>
112 void setValue( [in] string aPropertyName,
113 [in] any aValue )
114 raises( com::sun::star::beans::UnknownPropertyException,
115 com::sun::star::script::CannotConvertException,
116 com::sun::star::reflection::InvocationTargetException );
118 //-------------------------------------------------------------------------
119 /** returns the value of the property with the specified name.
121 @param aPropertyName
122 specifies the name of the property.
124 any getValue( [in] string aPropertyName )
125 raises( com::sun::star::beans::UnknownPropertyException );
127 //-------------------------------------------------------------------------
128 /** returns <TRUE/> if the method with the specified name exists, else <FALSE/>.
130 <p>This optimizes the calling sequence
131 ( <member>XInvocation::hasMethod</member>,
132 <member>XInvocation::invoke</member> )!</p>
134 @param aName
135 specifies the name of the method.
137 boolean hasMethod( [in] string aName );
139 //-------------------------------------------------------------------------
140 /** returns <TRUE/> if the property with the specified name exists, else <FALSE/>.
142 <p>This optimizes the calling sequence
143 ( <member>XInvocation::hasProperty</member>,
144 <member>XInvocation::getValue</member> ) or
146 ( <member>XInvocation::hasProperty</member>,
147 <member>XInvocation::setValue</member> )!
149 @param aName
150 specifies the name of the property.
152 boolean hasProperty( [in] string aName );
156 //=============================================================================
158 }; }; }; };
160 #endif