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