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_loader_XImplementationLoader_idl__
24#define __com_sun_star_loader_XImplementationLoader_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_registry_XRegistryKey_idl__
31#include <com/sun/star/registry/XRegistryKey.idl>
32#endif
33
34#ifndef __com_sun_star_registry_CannotRegisterImplementationException_idl__
35#include <com/sun/star/registry/CannotRegisterImplementationException.idl>
36#endif
37
38#ifndef __com_sun_star_loader_CannotActivateFactoryException_idl__
39#include <com/sun/star/loader/CannotActivateFactoryException.idl>
40#endif
41
42//=============================================================================
43
44 module com {  module sun {  module star {  module loader {
45
46//=============================================================================
47
48/** handles activation (loading) of a UNO component.
49    @see		com::sun::star::registry::XImplementationRegistration
50 */
51published interface XImplementationLoader: com::sun::star::uno::XInterface
52{
53	//-------------------------------------------------------------------------
54
55	/** activates a concrete implementation within a component.
56        @param implementationName The name of the implementation,
57               which shall be instantiated. The method
58               <member>XImplementationLoader::writeRegistryInfo</member>
59               writes a list of implementation names hosted by this component.
60        @param implementationLoaderUrl specification bug, ignore this parameter, please
61               pass an empty string.
62        @param locationUrl Points to the location of the file containing
63               the component (for instance a .jar-file or a shared library).
64               This parameter
65               should be in an URL format (= protocol:protocol-dependent-part).
66               In case the string contains no
67               leading "protocol:", the implementation in general assumes,
68               that it is a relative file url. <p>Special loaders may define
69               their own protocol (for instance an executable loader may need
70               more than only one file url).
71
72        @param xKey A registry which may be used to read static data previously
73               written via <method>XImplementationLoader::writeRegistryInfo()</method>.
74               The use of this parameter is deprecated.
75
76        @return returns a factory interface, which allows to create an instance of
77                the concrete implementation. In general, the object supports a
78                <type scope="com::sun::star::lang">XSingleComponentFactory</type>
79                and the <type scope="com::sun::star::lang">XServiceInfo</type> interface. The
80                XServiceInfo interface informs about the capabilities of the
81                service implementation, not the factory itself.
82	 */
83	com::sun::star::uno::XInterface activate( [in] string implementationName,
84			 [in] string implementationLoaderUrl,
85			 [in] string locationUrl,
86			 [in] com::sun::star::registry::XRegistryKey xKey )
87			raises( com::sun::star::loader::CannotActivateFactoryException );
88
89	//-------------------------------------------------------------------------
90	/** writes a list of all implementations hosted by this component into a registry key.
91        <p>This method is called during registering a component.
92        @param xKey The registry key, which shall be used to write for each
93                    implementation the implementation name plus a list of supported
94                    services.
95        @param implementationLoaderUrl specification bug, ignore this parameter, please
96               pass an empty string.
97        @param locationUrl Points to the location of the file containing
98               the component (for instance a .jar-file or a shared library).
99               This parameter
100               should be in an URL format (= protocol:protocol-dependent-part).
101               In case the string contains no
102               leading &quot;protocol:&quot;, the implementation in general assumes,
103               that it is a relative file url. <p>Special loaders may define
104               their own protocol (for instance an executable loader may need
105               more than only one file url).
106        @see com::sun::star::registry::XImplementationRegistration
107	 */
108	boolean writeRegistryInfo( [in] com::sun::star::registry::XRegistryKey xKey,
109			 [in] string implementationLoaderUrl,
110			 [in] string locationUrl )
111			raises( com::sun::star::registry::CannotRegisterImplementationException );
112
113};
114
115//=============================================================================
116
117}; }; }; };
118
119#endif
120