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