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#ifndef __com_sun_star_script_XInvocation_idl__
24#define __com_sun_star_script_XInvocation_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30#ifndef __com_sun_star_beans_XIntrospectionAccess_idl__
31#include <com/sun/star/beans/XIntrospectionAccess.idl>
32#endif
33
34#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
35#include <com/sun/star/lang/IllegalArgumentException.idl>
36#endif
37
38#ifndef __com_sun_star_script_CannotConvertException_idl__
39#include <com/sun/star/script/CannotConvertException.idl>
40#endif
41
42#ifndef __com_sun_star_reflection_InvocationTargetException_idl__
43#include <com/sun/star/reflection/InvocationTargetException.idl>
44#endif
45
46#ifndef __com_sun_star_beans_UnknownPropertyException_idl__
47#include <com/sun/star/beans/UnknownPropertyException.idl>
48#endif
49
50
51//=============================================================================
52
53 module com {  module sun {  module star {  module script {
54
55//=============================================================================
56/** gives access to an object's methods and properties.
57	Container access is available through
58	<type scope="com::sun::star::container">XIndexContainer</type>,
59	<type scope="com::sun::star::container">XNameContainer</type> and
60	<type scope="com::sun::star::container">XEnumerationAccess</type>.
61	</p>
62 */
63published interface XInvocation: com::sun::star::uno::XInterface
64{
65	//-------------------------------------------------------------------------
66	/** returns the introspection from this object or <NULL/>
67		if the object does not provide this information.
68	 */
69	com::sun::star::beans::XIntrospectionAccess getIntrospection();
70
71	//-------------------------------------------------------------------------
72	/** provides access to methods exposed by an object.
73
74		@param aParams all parameters; pure out params are undefined in sequence,
75					   the value has to be ignored by the callee
76		@param aOutParamIndex This sequence contains the indices of all parameters
77						that are specified as out or inout.
78		@param aOutParam This sequence contains the values of all parameters that
79						are specified as out or inout and corresponds with the
80						indices provided by the aOutParamIndex sequence.
81
82						Example: aOutParamIndex == { 1, 4 } means that
83						aOutParam[0] contains the out value of the aParams[1]
84						parameter and aOutParam[1] contains the out value of
85						the aParams[4] parameter.
86	 */
87	any invoke( [in] string aFunctionName,
88			 [in] sequence<any> aParams,
89			 [out] sequence<short> aOutParamIndex,
90			 [out] sequence<any> aOutParam )
91			raises( com::sun::star::lang::IllegalArgumentException,
92					com::sun::star::script::CannotConvertException,
93					com::sun::star::reflection::InvocationTargetException );
94
95	//-------------------------------------------------------------------------
96	/** sets a value to the property with the specified name.
97
98		<p> If the underlying object implements an
99		<type scope="com::sun::star::container">XNameContainer</type>,
100		then this method will insert the value if there is no such
101		<var>aPropertyName</var>.
102
103		</p>
104	 */
105	void setValue( [in] string aPropertyName,
106			 [in] any aValue )
107			raises( com::sun::star::beans::UnknownPropertyException,
108					com::sun::star::script::CannotConvertException,
109					com::sun::star::reflection::InvocationTargetException );
110
111	//-------------------------------------------------------------------------
112	/** returns the value of the property with the specified name.
113
114		@param aPropertyName
115			specifies the name of the property.
116	 */
117	any getValue( [in] string aPropertyName )
118			raises( com::sun::star::beans::UnknownPropertyException );
119
120	//-------------------------------------------------------------------------
121	/** returns <TRUE/> if the method with the specified name exists, else <FALSE/>.
122
123		<p>This optimizes the calling sequence
124		( <member>XInvocation::hasMethod</member>,
125		<member>XInvocation::invoke</member> )!</p>
126
127				@param aName
128					specifies the name of the method.
129	 */
130	boolean hasMethod( [in] string aName );
131
132	//-------------------------------------------------------------------------
133	/** returns <TRUE/> if the property with the specified name exists, else <FALSE/>.
134
135				<p>This optimizes the calling sequence
136				( <member>XInvocation::hasProperty</member>,
137				<member>XInvocation::getValue</member> ) or
138
139				( <member>XInvocation::hasProperty</member>,
140				<member>XInvocation::setValue</member> )!
141
142					@param aName
143				specifies the name of the property.
144	 */
145	boolean hasProperty( [in] string aName );
146
147};
148
149//=============================================================================
150
151}; }; }; };
152
153#endif
154