1*cdf0e10cSrcweir/*************************************************************************
2*cdf0e10cSrcweir *
3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir *
5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir *
7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir *
9*cdf0e10cSrcweir * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir *
11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir *
15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir *
21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir *
26*cdf0e10cSrcweir ************************************************************************/
27*cdf0e10cSrcweir#ifndef __com_sun_star_beans_XIntrospectionAccess_idl__
28*cdf0e10cSrcweir#define __com_sun_star_beans_XIntrospectionAccess_idl__
29*cdf0e10cSrcweir
30*cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
31*cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
32*cdf0e10cSrcweir#endif
33*cdf0e10cSrcweir
34*cdf0e10cSrcweir#ifndef __com_sun_star_beans_Property_idl__
35*cdf0e10cSrcweir#include <com/sun/star/beans/Property.idl>
36*cdf0e10cSrcweir#endif
37*cdf0e10cSrcweir
38*cdf0e10cSrcweir#ifndef __com_sun_star_container_NoSuchElementException_idl__
39*cdf0e10cSrcweir#include <com/sun/star/container/NoSuchElementException.idl>
40*cdf0e10cSrcweir#endif
41*cdf0e10cSrcweir
42*cdf0e10cSrcweir#ifndef __com_sun_star_reflection_XIdlMethod_idl__
43*cdf0e10cSrcweir#include <com/sun/star/reflection/XIdlMethod.idl>
44*cdf0e10cSrcweir#endif
45*cdf0e10cSrcweir
46*cdf0e10cSrcweir#ifndef __com_sun_star_lang_NoSuchMethodException_idl__
47*cdf0e10cSrcweir#include <com/sun/star/lang/NoSuchMethodException.idl>
48*cdf0e10cSrcweir#endif
49*cdf0e10cSrcweir
50*cdf0e10cSrcweir#ifndef __com_sun_star_reflection_XIdlClass_idl__
51*cdf0e10cSrcweir#include <com/sun/star/reflection/XIdlClass.idl>
52*cdf0e10cSrcweir#endif
53*cdf0e10cSrcweir
54*cdf0e10cSrcweir#ifndef __com_sun_star_beans_IllegalTypeException_idl__
55*cdf0e10cSrcweir#include <com/sun/star/beans/IllegalTypeException.idl>
56*cdf0e10cSrcweir#endif
57*cdf0e10cSrcweir
58*cdf0e10cSrcweir//=============================================================================
59*cdf0e10cSrcweir
60*cdf0e10cSrcweir module com {  module sun {  module star {  module beans {
61*cdf0e10cSrcweir
62*cdf0e10cSrcweir//=============================================================================
63*cdf0e10cSrcweir
64*cdf0e10cSrcweir/** represents the result of an introspection operation done by
65*cdf0e10cSrcweir	the	inspect method of <type scope="com::sun::star::beans">
66*cdf0e10cSrcweir	XIntrospection</type>.
67*cdf0e10cSrcweir
68*cdf0e10cSrcweir	<p>This interface gives information about an object's
69*cdf0e10cSrcweir	properties and methods as detected in the introspection
70*cdf0e10cSrcweir	process. It's not possible to access properties	or call
71*cdf0e10cSrcweir	methods directly using this interface but it provides
72*cdf0e10cSrcweir	access to other interfaces to do so.
73*cdf0e10cSrcweir	See <member scope="com::sun::star::beans">
74*cdf0e10cSrcweir	XIntrospectionAccess::queryAdapter()</member></p>
75*cdf0e10cSrcweir
76*cdf0e10cSrcweir	<p>The <type>XExactName</type> interface has to be supported
77*cdf0e10cSrcweir	in order to implement inaccurate name access for all objects
78*cdf0e10cSrcweir	which implement the <type scope="com::sun::star::container">
79*cdf0e10cSrcweir	XNameAccess</type> interface or <type>XPropertySet</type>.</p>
80*cdf0e10cSrcweir
81*cdf0e10cSrcweir	<p>The <type>XMaterialHolder</type> interface has to be
82*cdf0e10cSrcweir	supported to give access to the inspected object.</p>
83*cdf0e10cSrcweir
84*cdf0e10cSrcweir		@see XPropertySet
85*cdf0e10cSrcweir		@see com::sun::star::beans::XExactName
86*cdf0e10cSrcweir */
87*cdf0e10cSrcweirpublished interface XIntrospectionAccess: com::sun::star::uno::XInterface
88*cdf0e10cSrcweir{
89*cdf0e10cSrcweir	//-------------------------------------------------------------------------
90*cdf0e10cSrcweir	/** returns information about which method concepts described in
91*cdf0e10cSrcweir		the <type>MethodConcept</type> constants group are supported
92*cdf0e10cSrcweir		by this <type>XIntrospectionAccess</type> implementation.
93*cdf0e10cSrcweir
94*cdf0e10cSrcweir		<p>The minimum supported concepts should be:</p>
95*cdf0e10cSrcweir
96*cdf0e10cSrcweir		<ul>
97*cdf0e10cSrcweir			<li> <const>MethodConcept::PROPERTY</const>, </li>
98*cdf0e10cSrcweir			<li> <const>MethodConcept::LISTENER</const>, </li>
99*cdf0e10cSrcweir			<li> <const>MethodConcept::ENUMERATION</const>, </li>
100*cdf0e10cSrcweir			<li> <const>MethodConcept::NAMECONTAINER</const></li>
101*cdf0e10cSrcweir			<li> <const>MethodConcept::INDEXCONTAINER</const>; </li>
102*cdf0e10cSrcweir		</ul>
103*cdf0e10cSrcweir
104*cdf0e10cSrcweir		@returns
105*cdf0e10cSrcweir			zero or more constants of the <type>MethodConcept</type>
106*cdf0e10cSrcweir			constants group combined by an arithmetical or-operation.
107*cdf0e10cSrcweir	 */
108*cdf0e10cSrcweir	long getSuppliedMethodConcepts();
109*cdf0e10cSrcweir
110*cdf0e10cSrcweir	//-------------------------------------------------------------------------
111*cdf0e10cSrcweir	/** returns information about which property concepts described in
112*cdf0e10cSrcweir		the <type>PropertyConcept</type> constants group are supported
113*cdf0e10cSrcweir		by this <type>XIntrospectionAccess</type> implementation.
114*cdf0e10cSrcweir
115*cdf0e10cSrcweir		<p>The minimum supported concepts should be:</p>
116*cdf0e10cSrcweir
117*cdf0e10cSrcweir		<ul>
118*cdf0e10cSrcweir			<li> <const>PropertyConcept::PROPERTYSET</const>, </li>
119*cdf0e10cSrcweir			<li> <const>PropertyConcept::ATTRIBUTES</const> and </li>
120*cdf0e10cSrcweir			<li> <const>PropertyConcept::METHODS</const>.  </li>
121*cdf0e10cSrcweir		</ul>
122*cdf0e10cSrcweir
123*cdf0e10cSrcweir		@returns
124*cdf0e10cSrcweir			zero or more constants of the <type>PropertyConcept</type>
125*cdf0e10cSrcweir			constants group.combined by an arithmetical or-operation.
126*cdf0e10cSrcweir	 */
127*cdf0e10cSrcweir	long getSuppliedPropertyConcepts();
128*cdf0e10cSrcweir
129*cdf0e10cSrcweir	//-------------------------------------------------------------------------
130*cdf0e10cSrcweir	/** returns information about a property if a property with
131*cdf0e10cSrcweir		the demanded name exists and if it accords to one of the
132*cdf0e10cSrcweir		demanded <type>PropertyConcept</type>s. The information
133*cdf0e10cSrcweir		is provided as <type>Property</type> struct.
134*cdf0e10cSrcweir
135*cdf0e10cSrcweir		@returns
136*cdf0e10cSrcweir			A <type>Property</type> struct providing
137*cdf0e10cSrcweir			information about the demanded property,
138*cdf0e10cSrcweir			if a corresponding property exists.
139*cdf0e10cSrcweir
140*cdf0e10cSrcweir		@param aName
141*cdf0e10cSrcweir			the name of the property.
142*cdf0e10cSrcweir
143*cdf0e10cSrcweir		@param nPropertyConcepts
144*cdf0e10cSrcweir			zero or more constants of the <type>PropertyConcept
145*cdf0e10cSrcweir			</type> constants group combined by an arithmetical
146*cdf0e10cSrcweir			or-operation.
147*cdf0e10cSrcweir
148*cdf0e10cSrcweir		@throws NoSuchElementException
149*cdf0e10cSrcweir			when a property with the demanded name doesn't exist
150*cdf0e10cSrcweir			or if it accords to a wrong <type>PropertyConcept
151*cdf0e10cSrcweir			</type>.
152*cdf0e10cSrcweir	 */
153*cdf0e10cSrcweir	com::sun::star::beans::Property getProperty( [in] string aName,
154*cdf0e10cSrcweir			 [in] long nPropertyConcepts )
155*cdf0e10cSrcweir			raises( com::sun::star::container::NoSuchElementException );
156*cdf0e10cSrcweir
157*cdf0e10cSrcweir	//-------------------------------------------------------------------------
158*cdf0e10cSrcweir	/** allows to ask if a property with the demanded name exists
159*cdf0e10cSrcweir		and if it accords to one of the demanded <type>
160*cdf0e10cSrcweir		PropertyConcept</type>s.
161*cdf0e10cSrcweir
162*cdf0e10cSrcweir		@returns
163*cdf0e10cSrcweir			<TRUE/> if the property exists and accords to one of
164*cdf0e10cSrcweir			the demanded <type>PropertyConcept</type>s, otherwise
165*cdf0e10cSrcweir			<FALSE/> is returned.
166*cdf0e10cSrcweir
167*cdf0e10cSrcweir		@param aName
168*cdf0e10cSrcweir			the name of the property.
169*cdf0e10cSrcweir
170*cdf0e10cSrcweir		@param nPropertyConcepts
171*cdf0e10cSrcweir			zero or more constants of the <type>PropertyConcept
172*cdf0e10cSrcweir			</type> constants group combined by an arithmetical
173*cdf0e10cSrcweir			or-operation.
174*cdf0e10cSrcweir	 */
175*cdf0e10cSrcweir	boolean hasProperty( [in] string aName,
176*cdf0e10cSrcweir			 [in] long nPropertyConcepts );
177*cdf0e10cSrcweir
178*cdf0e10cSrcweir	//-------------------------------------------------------------------------
179*cdf0e10cSrcweir	/** returns a sequence of properties of the introspected object
180*cdf0e10cSrcweir
181*cdf0e10cSrcweir		@returns
182*cdf0e10cSrcweir			all properties of the introspected object which accord
183*cdf0e10cSrcweir			to the demanded <type>PropertyConcept</type>s.
184*cdf0e10cSrcweir
185*cdf0e10cSrcweir		@param nPropertyConcepts
186*cdf0e10cSrcweir			zero or more constants of the <type>PropertyConcept
187*cdf0e10cSrcweir			</type> constants group combined by an arithmetical
188*cdf0e10cSrcweir			or-operation.
189*cdf0e10cSrcweir	 */
190*cdf0e10cSrcweir	sequence<com::sun::star::beans::Property> getProperties(
191*cdf0e10cSrcweir				[in] long nPropertyConcepts );
192*cdf0e10cSrcweir
193*cdf0e10cSrcweir	//-------------------------------------------------------------------------
194*cdf0e10cSrcweir	/** returns information about a method if a method with
195*cdf0e10cSrcweir		the demanded name exists and if it accords to one of
196*cdf0e10cSrcweir		the demanded MethodConcepts. The information is
197*cdf0e10cSrcweir		provided as <type scope="com::sun::star::reflection">
198*cdf0e10cSrcweir		XIdlMethod</type>.
199*cdf0e10cSrcweir
200*cdf0e10cSrcweir		@returns
201*cdf0e10cSrcweir			A <type scope="com::sun::star::reflection">
202*cdf0e10cSrcweir			XIdlMethod</type> providing information about and
203*cdf0e10cSrcweir			access to the demanded method if a corresponding
204*cdf0e10cSrcweir			method exists.
205*cdf0e10cSrcweir
206*cdf0e10cSrcweir		@param aName
207*cdf0e10cSrcweir			the name of the method.
208*cdf0e10cSrcweir
209*cdf0e10cSrcweir		@param nMethodConcepts
210*cdf0e10cSrcweir			zero or more constants of the <type>MethodConcept
211*cdf0e10cSrcweir			</type> constants group combined by an arithmetical
212*cdf0e10cSrcweir			or-operation.
213*cdf0e10cSrcweir
214*cdf0e10cSrcweir		@throws NoSuchElementException
215*cdf0e10cSrcweir			when a method with the demanded name doesn't exist
216*cdf0e10cSrcweir			or if it accords to a wrong <type>MethodConcept</type>.
217*cdf0e10cSrcweir	 */
218*cdf0e10cSrcweir	com::sun::star::reflection::XIdlMethod getMethod( [in] string aName,
219*cdf0e10cSrcweir			 [in] long nMethodConcepts )
220*cdf0e10cSrcweir			raises( com::sun::star::lang::NoSuchMethodException );
221*cdf0e10cSrcweir
222*cdf0e10cSrcweir	//-------------------------------------------------------------------------
223*cdf0e10cSrcweir	/** allows to ask if a method with the demanded name exists
224*cdf0e10cSrcweir		and if it accords to one of the demanded <type>MethodConcept
225*cdf0e10cSrcweir		</type>s.
226*cdf0e10cSrcweir
227*cdf0e10cSrcweir		@returns
228*cdf0e10cSrcweir			<TRUE/> if the method exists and accords to one of
229*cdf0e10cSrcweir			the demanded <type>MethodConcept</type>s, otherwise
230*cdf0e10cSrcweir			<FALSE/> is returned.
231*cdf0e10cSrcweir
232*cdf0e10cSrcweir		@param aName
233*cdf0e10cSrcweir			the name of the method.
234*cdf0e10cSrcweir
235*cdf0e10cSrcweir		@param nMethodConcepts
236*cdf0e10cSrcweir			zero or more constants of the <type>MethodConcept
237*cdf0e10cSrcweir			</type> constants group combined by an arithmetical
238*cdf0e10cSrcweir			or-operation.
239*cdf0e10cSrcweir	 */
240*cdf0e10cSrcweir	boolean hasMethod( [in] string aName,
241*cdf0e10cSrcweir			 [in] long nMethodConcepts );
242*cdf0e10cSrcweir
243*cdf0e10cSrcweir	//-------------------------------------------------------------------------
244*cdf0e10cSrcweir	/** returns a sequence of methods of the introspected object.
245*cdf0e10cSrcweir
246*cdf0e10cSrcweir		@returns
247*cdf0e10cSrcweir			all methods of the introspected object which accord
248*cdf0e10cSrcweir			to the demanded <type>MethodConcept</type>s.
249*cdf0e10cSrcweir
250*cdf0e10cSrcweir		@param nMethodConcepts
251*cdf0e10cSrcweir			zero or more constants of the <type>MethodConcept
252*cdf0e10cSrcweir			</type> constants group combined by an arithmetical
253*cdf0e10cSrcweir			or-operation.
254*cdf0e10cSrcweir	 */
255*cdf0e10cSrcweir	sequence<com::sun::star::reflection::XIdlMethod> getMethods(
256*cdf0e10cSrcweir			[in] long nMethodConcepts );
257*cdf0e10cSrcweir
258*cdf0e10cSrcweir	//-------------------------------------------------------------------------
259*cdf0e10cSrcweir	/** returns the listener types supported by the introspected
260*cdf0e10cSrcweir		object.
261*cdf0e10cSrcweir
262*cdf0e10cSrcweir		<p>If the introspected object has the methods
263*cdf0e10cSrcweir		<code>addFooListener( XFooListener xFoo )</code> and
264*cdf0e10cSrcweir		<code>removeFooListener( XFooListener xFoo )</code>
265*cdf0e10cSrcweir		the type of XFooListener will be one of the elements
266*cdf0e10cSrcweir		in the returned sequence.
267*cdf0e10cSrcweir
268*cdf0e10cSrcweir		@returns
269*cdf0e10cSrcweir			a sequence of the types of listener interfaces
270*cdf0e10cSrcweir			which are supported by the introspected object.
271*cdf0e10cSrcweir	 */
272*cdf0e10cSrcweir	sequence<type> getSupportedListeners();
273*cdf0e10cSrcweir
274*cdf0e10cSrcweir	//-------------------------------------------------------------------------
275*cdf0e10cSrcweir	/** creates an adapter that implements an interface with the
276*cdf0e10cSrcweir		specified type.
277*cdf0e10cSrcweir
278*cdf0e10cSrcweir		<p>To access properties, query for the <type>XPropertySet
279*cdf0e10cSrcweir		</type> interface. If the <type>XPropertySet</type> can
280*cdf0e10cSrcweir		be queried,	the <type>XFastPropertySet</type> interface
281*cdf0e10cSrcweir		must be supported too.  </p>
282*cdf0e10cSrcweir
283*cdf0e10cSrcweir		<p>If the introspected object implements a name container,
284*cdf0e10cSrcweir		the introspection should return the <type scope=
285*cdf0e10cSrcweir		"com::sun::star::container">XNameAccess</type> and <type
286*cdf0e10cSrcweir		scope="com::sun::star::container">XNameContainer</type>
287*cdf0e10cSrcweir		interfaces.</p>
288*cdf0e10cSrcweir
289*cdf0e10cSrcweir		<p>If the introspected object implements an index container,
290*cdf0e10cSrcweir		the introspection should return the <type scope=
291*cdf0e10cSrcweir		"com::sun::star::container">XIndexAccess</type> and <type
292*cdf0e10cSrcweir		scope="com::sun::star::container">XIndexContainer</type>
293*cdf0e10cSrcweir		interfaces.</p>
294*cdf0e10cSrcweir
295*cdf0e10cSrcweir		<p>If the introspected object implements an enumeration
296*cdf0e10cSrcweir		container, the introspection should return the <type scope=
297*cdf0e10cSrcweir		"com::sun::star::container">XEnumerationAccess</type>
298*cdf0e10cSrcweir		interface.</p>
299*cdf0e10cSrcweir
300*cdf0e10cSrcweir		<p>If the introspected object implements the <type scope=
301*cdf0e10cSrcweir		"com::sun::star::reflection">XIdlArray</type> interface,
302*cdf0e10cSrcweir		the introspection should return this.</p>
303*cdf0e10cSrcweir
304*cdf0e10cSrcweir		<p>To implement inaccurate name access, at all objects,
305*cdf0e10cSrcweir		which implement the <type scope="com::sun::star::container">
306*cdf0e10cSrcweir		XNameAccess</type> or <type>XPropertySet</type> interface,
307*cdf0e10cSrcweir		the <type>XExactName</type> interface has to be supported.
308*cdf0e10cSrcweir		</p>
309*cdf0e10cSrcweir
310*cdf0e10cSrcweir		@see com::sun::star::beans::XExactName
311*cdf0e10cSrcweir	 */
312*cdf0e10cSrcweir	com::sun::star::uno::XInterface queryAdapter( [in] type aInterfaceType )
313*cdf0e10cSrcweir			raises( com::sun::star::beans::IllegalTypeException );
314*cdf0e10cSrcweir
315*cdf0e10cSrcweir};
316*cdf0e10cSrcweir
317*cdf0e10cSrcweir//=============================================================================
318*cdf0e10cSrcweir
319*cdf0e10cSrcweir}; }; }; };
320*cdf0e10cSrcweir
321*cdf0e10cSrcweir#endif
322