/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#ifndef __com_sun_star_reflection_XTypeDescriptionEnumerationAccess_idl__
#define __com_sun_star_reflection_XTypeDescriptionEnumerationAccess_idl__

#include <com/sun/star/uno/XInterface.idl>
#include <com/sun/star/uno/TypeClass.idl>
#include <com/sun/star/reflection/XTypeDescriptionEnumeration.idl>
#include <com/sun/star/reflection/TypeDescriptionSearchDepth.idl>
#include <com/sun/star/reflection/NoSuchTypeNameException.idl>
#include <com/sun/star/reflection/InvalidTypeNameException.idl>


 module com {  module sun {  module star {  module reflection {


/** Defines an interface for creating enumerations for type descriptions.

    @since OOo 1.1.2

  */
published interface XTypeDescriptionEnumerationAccess : com::sun::star::uno::XInterface
{
    /** Creates an enumeration for type descriptions.

        <p>An enumeration is always created for an UNOIDL module. The
        enumeration contents can be restricted by specifying type classes.
        Only types that match one of the supplied type classes will be part of
        the collection. Additionally, it is possible to specify the depth
        for the search within the underlying type description tree.

        @param moduleName
            contains the name of an UNOIDL module. Modules are separated by a
            single '.' (i.e., "com.sun.star.reflection"). The root of the module
            hierarchy is specified with an empty string. Module names are always
            absolute, never relative.

        @param types
            restricts the contents of the enumeration. It will only contain
            type descriptions that match one of the supplied type classes. An
            empty sequence specifies that the enumeration shall contain all
            type descriptions.

            <p>Valid types classes are:
            <ul>
            <li>com::sun::star::uno::TypeClass::MODULE
            <li>com::sun::star::uno::TypeClass::INTERFACE
            <li>com::sun::star::uno::TypeClass::SERVICE
            <li>com::sun::star::uno::TypeClass::STRUCT
            <li>com::sun::star::uno::TypeClass::ENUM
            <li>com::sun::star::uno::TypeClass::EXCEPTION
            <li>com::sun::star::uno::TypeClass::TYPEDEF
            <li>com::sun::star::uno::TypeClass::CONSTANT
            <li>com::sun::star::uno::TypeClass::CONSTANTS
            <li>com::sun::star::uno::TypeClass::SINGLETON
            </ul>

        @param depth
            specifies the depth of search in the underlying tree of type
            descriptions. Clients should be aware of the fact that specifying
            TypeDescriptionSearchDepth::INFINITE can lead to
            larger delays when constructing or using the
            XTypeDescriptionEnumeration instance.

        @returns
            an enumeration of type descriptions.

            <p>The enumeration returns implementations of
            XTypeDescription. Following concrete UNOIDL parts
            represented by specialized interfaces derived from
            XTypeDescription can be returned by the enumerator:

            <table border="1">
                <tr><th>IDL</th><th>interface</th></tr>
                    <tr>
                        <td>enum</td>
                        <td>XEnumTypeDescription</td>
                    </tr>
                    <tr>
                        <td>struct</td>
                        <td>XCompoundTypeDescription (the returned
                        object should actually implement
                        XStructTypeDescription)</td>
                    </tr>
                    <tr>
                        <td>exception</td>
                        <td>XCompoundTypeDescription</td>
                    </tr>
                    <tr>
                        <td>interface</td>
                        <td>XInterfaceTypeDescription (the returned
                        object should actually implement
                        XInterfaceTypeDescription2)</td>
                    </tr>
                    <tr>
                        <td>service</td>
                        <td>XServiceTypeDescription (the returned
                        object should actually implement
                        XServiceTypeDescription2)</td>
                    </tr>
                    <tr>
                        <td>singleton</td>
                        <td>XSingletonTypeDescription (the returned
                        object should actually implement
                        XSingletonTypeDescription2)</td>
                    </tr>
                    <tr>
                        <td>module</td>
                        <td>XModuleTypeDescription</td>
                    </tr>
                    <tr>
                        <td>typedef</td>
                        <td>XIndirectTypeDescription</td>
                    </tr>
                    <tr>
                        <td>constant</td>
                        <td>XConstantTypeDescription</td>
                    </tr>
                    <tr>
                        <td>constants</td>
                        <td>XConstantsTypeDescription</td>
                    </tr>
            </table>

        @throws NoSuchTypeNameException
            in case that the given module name does not exist. This exception
            will never be thrown in case moduleName is the empty string.

        @throws InvalidTypeNameException
            in case that the given module name does exist, but does not specify
            an UNOIDL module. This exception will never be thrown in case
            moduleName is the empty string.
      */
    XTypeDescriptionEnumeration
    createTypeDescriptionEnumeration(
            [in] string moduleName,
            [in] sequence< com::sun::star::uno::TypeClass > types,
            [in] TypeDescriptionSearchDepth depth )
        raises( NoSuchTypeNameException, InvalidTypeNameException );
};


}; }; }; };

#endif

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
