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