/************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: XIntrospectionAccess.idl,v $ * $Revision: 1.13 $ * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 3 * only, as published by the Free Software Foundation. * * OpenOffice.org is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License version 3 for more details * (a copy is included in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU Lesser General Public License * version 3 along with OpenOffice.org. If not, see * * for a copy of the LGPLv3 License. * ************************************************************************/ #ifndef __com_sun_star_beans_XIntrospectionAccess_idl__ #define __com_sun_star_beans_XIntrospectionAccess_idl__ #ifndef __com_sun_star_uno_XInterface_idl__ #include #endif #ifndef __com_sun_star_beans_Property_idl__ #include #endif #ifndef __com_sun_star_container_NoSuchElementException_idl__ #include #endif #ifndef __com_sun_star_reflection_XIdlMethod_idl__ #include #endif #ifndef __com_sun_star_lang_NoSuchMethodException_idl__ #include #endif #ifndef __com_sun_star_reflection_XIdlClass_idl__ #include #endif #ifndef __com_sun_star_beans_IllegalTypeException_idl__ #include #endif //============================================================================= module com { module sun { module star { module beans { //============================================================================= /** represents the result of an introspection operation done by the inspect method of XIntrospection.

This interface gives information about an object's properties and methods as detected in the introspection process. It's not possible to access properties or call methods directly using this interface but it provides access to other interfaces to do so. See XIntrospectionAccess::queryAdapter()

The XExactName interface has to be supported in order to implement inaccurate name access for all objects which implement the XNameAccess interface or XPropertySet.

The XMaterialHolder interface has to be supported to give access to the inspected object.

@see XPropertySet @see com::sun::star::beans::XExactName */ published interface XIntrospectionAccess: com::sun::star::uno::XInterface { //------------------------------------------------------------------------- /** returns information about which method concepts described in the MethodConcept constants group are supported by this XIntrospectionAccess implementation.

The minimum supported concepts should be:

  • MethodConcept::PROPERTY,
  • MethodConcept::LISTENER,
  • MethodConcept::ENUMERATION,
  • MethodConcept::NAMECONTAINER
  • MethodConcept::INDEXCONTAINER;
@returns zero or more constants of the MethodConcept constants group combined by an arithmetical or-operation. */ long getSuppliedMethodConcepts(); //------------------------------------------------------------------------- /** returns information about which property concepts described in the PropertyConcept constants group are supported by this XIntrospectionAccess implementation.

The minimum supported concepts should be:

  • PropertyConcept::PROPERTYSET,
  • PropertyConcept::ATTRIBUTES and
  • PropertyConcept::METHODS.
@returns zero or more constants of the PropertyConcept constants group.combined by an arithmetical or-operation. */ long getSuppliedPropertyConcepts(); //------------------------------------------------------------------------- /** returns information about a property if a property with the demanded name exists and if it accords to one of the demanded PropertyConcepts. The information is provided as Property struct. @returns A Property struct providing information about the demanded property, if a corresponding property exists. @param aName the name of the property. @param nPropertyConcepts zero or more constants of the PropertyConcept constants group combined by an arithmetical or-operation. @throws NoSuchElementException when a property with the demanded name doesn't exist or if it accords to a wrong PropertyConcept . */ com::sun::star::beans::Property getProperty( [in] string aName, [in] long nPropertyConcepts ) raises( com::sun::star::container::NoSuchElementException ); //------------------------------------------------------------------------- /** allows to ask if a property with the demanded name exists and if it accords to one of the demanded PropertyConcepts. @returns if the property exists and accords to one of the demanded PropertyConcepts, otherwise is returned. @param aName the name of the property. @param nPropertyConcepts zero or more constants of the PropertyConcept constants group combined by an arithmetical or-operation. */ boolean hasProperty( [in] string aName, [in] long nPropertyConcepts ); //------------------------------------------------------------------------- /** returns a sequence of properties of the introspected object @returns all properties of the introspected object which accord to the demanded PropertyConcepts. @param nPropertyConcepts zero or more constants of the PropertyConcept constants group combined by an arithmetical or-operation. */ sequence getProperties( [in] long nPropertyConcepts ); //------------------------------------------------------------------------- /** returns information about a method if a method with the demanded name exists and if it accords to one of the demanded MethodConcepts. The information is provided as XIdlMethod. @returns A XIdlMethod providing information about and access to the demanded method if a corresponding method exists. @param aName the name of the method. @param nMethodConcepts zero or more constants of the MethodConcept constants group combined by an arithmetical or-operation. @throws NoSuchElementException when a method with the demanded name doesn't exist or if it accords to a wrong MethodConcept. */ com::sun::star::reflection::XIdlMethod getMethod( [in] string aName, [in] long nMethodConcepts ) raises( com::sun::star::lang::NoSuchMethodException ); //------------------------------------------------------------------------- /** allows to ask if a method with the demanded name exists and if it accords to one of the demanded MethodConcept s. @returns if the method exists and accords to one of the demanded MethodConcepts, otherwise is returned. @param aName the name of the method. @param nMethodConcepts zero or more constants of the MethodConcept constants group combined by an arithmetical or-operation. */ boolean hasMethod( [in] string aName, [in] long nMethodConcepts ); //------------------------------------------------------------------------- /** returns a sequence of methods of the introspected object. @returns all methods of the introspected object which accord to the demanded MethodConcepts. @param nMethodConcepts zero or more constants of the MethodConcept constants group combined by an arithmetical or-operation. */ sequence getMethods( [in] long nMethodConcepts ); //------------------------------------------------------------------------- /** returns the listener types supported by the introspected object.

If the introspected object has the methods addFooListener( XFooListener xFoo ) and removeFooListener( XFooListener xFoo ) the type of XFooListener will be one of the elements in the returned sequence. @returns a sequence of the types of listener interfaces which are supported by the introspected object. */ sequence getSupportedListeners(); //------------------------------------------------------------------------- /** creates an adapter that implements an interface with the specified type.

To access properties, query for the XPropertySet interface. If the XPropertySet can be queried, the XFastPropertySet interface must be supported too.

If the introspected object implements a name container, the introspection should return the XNameAccess and XNameContainer interfaces.

If the introspected object implements an index container, the introspection should return the XIndexAccess and XIndexContainer interfaces.

If the introspected object implements an enumeration container, the introspection should return the XEnumerationAccess interface.

If the introspected object implements the XIdlArray interface, the introspection should return this.

To implement inaccurate name access, at all objects, which implement the XNameAccess or XPropertySet interface, the XExactName interface has to be supported.

@see com::sun::star::beans::XExactName */ com::sun::star::uno::XInterface queryAdapter( [in] type aInterfaceType ) raises( com::sun::star::beans::IllegalTypeException ); }; //============================================================================= }; }; }; }; #endif