1*d1766043SAndrew Rist/**************************************************************
2*d1766043SAndrew Rist *
3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5*d1766043SAndrew Rist * distributed with this work for additional information
6*d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9*d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10*d1766043SAndrew Rist *
11*d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12*d1766043SAndrew Rist *
13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*d1766043SAndrew Rist * software distributed under the License is distributed on an
15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17*d1766043SAndrew Rist * specific language governing permissions and limitations
18*d1766043SAndrew Rist * under the License.
19*d1766043SAndrew Rist *
20*d1766043SAndrew Rist *************************************************************/
21*d1766043SAndrew Rist
22*d1766043SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir#ifndef __com_sun_star_frame_XModuleManager_idl__
25cdf0e10cSrcweir#define __com_sun_star_frame_XModuleManager_idl__
26cdf0e10cSrcweir
27cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
28cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
29cdf0e10cSrcweir#endif
30cdf0e10cSrcweir
31cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
32cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
33cdf0e10cSrcweir#endif
34cdf0e10cSrcweir
35cdf0e10cSrcweir#ifndef __com_sun_star_frame_UnknownModuleException_idl__
36cdf0e10cSrcweir#include <com/sun/star/frame/UnknownModuleException.idl>
37cdf0e10cSrcweir#endif
38cdf0e10cSrcweir
39cdf0e10cSrcweir//===============================================
40cdf0e10cSrcweir
41cdf0e10cSrcweirmodule com { module sun { module star { module frame {
42cdf0e10cSrcweir
43cdf0e10cSrcweir//===============================================
44cdf0e10cSrcweir/** can be used to identify office modules.
45cdf0e10cSrcweir
46cdf0e10cSrcweir    @since OOo 2.0
47cdf0e10cSrcweir */
48cdf0e10cSrcweirpublished interface XModuleManager : com::sun::star::uno::XInterface
49cdf0e10cSrcweir{
50cdf0e10cSrcweir    //-------------------------------------------
51cdf0e10cSrcweir    /**
52cdf0e10cSrcweir       @short  identifies the given module.
53cdf0e10cSrcweir
54cdf0e10cSrcweir       @descr  This identifier can then be used at the service <type>ModuleManager</type>
55cdf0e10cSrcweir               to get more information about this module.
56cdf0e10cSrcweir
57cdf0e10cSrcweir               For identification the interface <type scope="com::sun::star::lang">XServiceInfo</type>
58cdf0e10cSrcweir               is requested on the given module. Because all module service registrations must be unique
59cdf0e10cSrcweir               this value can be queried and checked against the configuration.
60cdf0e10cSrcweir
61cdf0e10cSrcweir               Since OOo 2.3.0 also the optional interface <type>XModule</type> will be used.
62cdf0e10cSrcweir               If its exists it will be preferred.
63cdf0e10cSrcweir
64cdf0e10cSrcweir       @param  Module
65cdf0e10cSrcweir               Possible objects for this parameter can be the following one:
66cdf0e10cSrcweir               <ul>
67cdf0e10cSrcweir                   <li>
68cdf0e10cSrcweir                       <b><type scope="com::sun::star::frame">XFrame</type></b><br>
69cdf0e10cSrcweir                       A frame contains (against a component window) a controller.
70cdf0e10cSrcweir                       Such controller represent the module (in case no model exists).
71cdf0e10cSrcweir                   </li>
72cdf0e10cSrcweir                   <li>
73cdf0e10cSrcweir                       <b><type scope="com::sun::star::frame">XController</type></b><br>
74cdf0e10cSrcweir                       A controller can be bound to a model. Then the model represent the module.
75cdf0e10cSrcweir                       If no model exists - the controller is used for identification.
76cdf0e10cSrcweir                   </li>
77cdf0e10cSrcweir                   <li>
78cdf0e10cSrcweir                       <b><type scope="com::sun::star::frame">XModel</type></b><br>
79cdf0e10cSrcweir                       A model represent a module everytimes and can be used for
80cdf0e10cSrcweir                       identification directly.
81cdf0e10cSrcweir                   </li>
82cdf0e10cSrcweir               </ul>
83cdf0e10cSrcweir
84cdf0e10cSrcweir       @throws <type scope="com::sun::star::lang">IllegalArgumentException</type>
85cdf0e10cSrcweir               if the parameter Module is:
86cdf0e10cSrcweir               <ul>
87cdf0e10cSrcweir                   <li>an empty one</li>
88cdf0e10cSrcweir                   <li>or does not provide one of the needed interface
89cdf0e10cSrcweir                       XFrame, XControllerm, XModel</li>
90cdf0e10cSrcweir                   <li>or does not provide the needed interface XServiceInfo.</li>
91cdf0e10cSrcweir               </ul>
92cdf0e10cSrcweir
93cdf0e10cSrcweir       @throws <type>UnknownModuleException</type>
94cdf0e10cSrcweir               if the given module could not be identified.
95cdf0e10cSrcweir               Note: If the module represent a XFrame instance with does not contain
96cdf0e10cSrcweir               a document, this exception is thrown too!
97cdf0e10cSrcweir
98cdf0e10cSrcweir       @return An identifier for the given module.
99cdf0e10cSrcweir               Note: This value is valie everytimes. Error will be transported
100cdf0e10cSrcweir               by thrown exceptions!
101cdf0e10cSrcweir     */
102cdf0e10cSrcweir    string identify( [in] ::com::sun::star::uno::XInterface Module )
103cdf0e10cSrcweir        raises(::com::sun::star::lang::IllegalArgumentException,
104cdf0e10cSrcweir                                       UnknownModuleException  );
105cdf0e10cSrcweir
106cdf0e10cSrcweir
107cdf0e10cSrcweir};
108cdf0e10cSrcweir
109cdf0e10cSrcweir}; }; }; };
110cdf0e10cSrcweir
111cdf0e10cSrcweir#endif
112