1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
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.
14 *
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).
20 *
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.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_script_XInvocation_idl__
28#define __com_sun_star_script_XInvocation_idl__
29
30#ifndef __com_sun_star_uno_XInterface_idl__
31#include <com/sun/star/uno/XInterface.idl>
32#endif
33
34#ifndef __com_sun_star_beans_XIntrospectionAccess_idl__
35#include <com/sun/star/beans/XIntrospectionAccess.idl>
36#endif
37
38#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
39#include <com/sun/star/lang/IllegalArgumentException.idl>
40#endif
41
42#ifndef __com_sun_star_script_CannotConvertException_idl__
43#include <com/sun/star/script/CannotConvertException.idl>
44#endif
45
46#ifndef __com_sun_star_reflection_InvocationTargetException_idl__
47#include <com/sun/star/reflection/InvocationTargetException.idl>
48#endif
49
50#ifndef __com_sun_star_beans_UnknownPropertyException_idl__
51#include <com/sun/star/beans/UnknownPropertyException.idl>
52#endif
53
54
55//=============================================================================
56
57 module com {  module sun {  module star {  module script {
58
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>
66 */
67published interface XInvocation: com::sun::star::uno::XInterface
68{
69	//-------------------------------------------------------------------------
70	/** returns the introspection from this object or <NULL/>
71		if the object does not provide this information.
72	 */
73	com::sun::star::beans::XIntrospectionAccess getIntrospection();
74
75	//-------------------------------------------------------------------------
76	/** provides access to methods exposed by an object.
77
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.
85
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.
90	 */
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 );
98
99	//-------------------------------------------------------------------------
100	/** sets a value to the property with the specified name.
101
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>.
106
107		</p>
108	 */
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 );
114
115	//-------------------------------------------------------------------------
116	/** returns the value of the property with the specified name.
117
118		@param aPropertyName
119			specifies the name of the property.
120	 */
121	any getValue( [in] string aPropertyName )
122			raises( com::sun::star::beans::UnknownPropertyException );
123
124	//-------------------------------------------------------------------------
125	/** returns <TRUE/> if the method with the specified name exists, else <FALSE/>.
126
127		<p>This optimizes the calling sequence
128		( <member>XInvocation::hasMethod</member>,
129		<member>XInvocation::invoke</member> )!</p>
130
131				@param aName
132					specifies the name of the method.
133	 */
134	boolean hasMethod( [in] string aName );
135
136	//-------------------------------------------------------------------------
137	/** returns <TRUE/> if the property with the specified name exists, else <FALSE/>.
138
139				<p>This optimizes the calling sequence
140				( <member>XInvocation::hasProperty</member>,
141				<member>XInvocation::getValue</member> ) or
142
143				( <member>XInvocation::hasProperty</member>,
144				<member>XInvocation::setValue</member> )!
145
146					@param aName
147				specifies the name of the property.
148	 */
149	boolean hasProperty( [in] string aName );
150
151};
152
153//=============================================================================
154
155}; }; }; };
156
157#endif
158