1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_loader_XImplementationLoader_idl__
28 #define __com_sun_star_loader_XImplementationLoader_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include
<com
/sun
/star
/uno
/XInterface.idl
>
34 #ifndef __com_sun_star_registry_XRegistryKey_idl__
35 #include
<com
/sun
/star
/registry
/XRegistryKey.idl
>
38 #ifndef __com_sun_star_registry_CannotRegisterImplementationException_idl__
39 #include
<com
/sun
/star
/registry
/CannotRegisterImplementationException.idl
>
42 #ifndef __com_sun_star_loader_CannotActivateFactoryException_idl__
43 #include
<com
/sun
/star
/loader
/CannotActivateFactoryException.idl
>
46 //=============================================================================
48 module com
{ module sun
{ module star
{ module loader
{
50 //=============================================================================
52 /** handles activation (loading) of a UNO component.
53 @see com::sun::star::registry::XImplementationRegistration
55 published
interface XImplementationLoader
: com
::sun
::star
::uno
::XInterface
57 //-------------------------------------------------------------------------
59 /** activates a concrete implementation within a component.
60 @param implementationName The name of the implementation,
61 which shall be instantiated. The method
62 <member>XImplementationLoader::writeRegistryInfo</member>
63 writes a list of implementation names hosted by this component.
64 @param implementationLoaderUrl specification bug, ignore this parameter, please
66 @param locationUrl Points to the location of the file containing
67 the component (for instance a .jar-file or a shared library).
69 should be in an URL format (= protocol:protocol-dependent-part).
70 In case the string contains no
71 leading "protocol:", the implementation in general assumes,
72 that it is a relative file url. <p>Special loaders may define
73 their own protocol (for instance an executable loader may need
74 more than only one file url).
76 @param xKey A registry which may be used to read static data previously
77 written via <method>XImplementationLoader::writeRegistryInfo()</method>.
78 The use of this parameter is deprecated.
80 @return returns a factory interface, which allows to create an instance of
81 the concrete implementation. In general, the object supports a
82 <type scope="com::sun::star::lang">XSingleComponentFactory</type>
83 and the <type scope="com::sun::star::lang">XServiceInfo</type> interface. The
84 XServiceInfo interface informs about the capabilities of the
85 service implementation, not the factory itself.
87 com
::sun
::star
::uno
::XInterface activate
( [in] string implementationName
,
88 [in] string implementationLoaderUrl
,
89 [in] string locationUrl
,
90 [in] com
::sun
::star
::registry
::XRegistryKey xKey
)
91 raises
( com
::sun
::star
::loader
::CannotActivateFactoryException
);
93 //-------------------------------------------------------------------------
94 /** writes a list of all implementations hosted by this component into a registry key.
95 <p>This method is called during registering a component.
96 @param xKey The registry key, which shall be used to write for each
97 implementation the implementation name plus a list of supported
99 @param implementationLoaderUrl specification bug, ignore this parameter, please
100 pass an empty string.
101 @param locationUrl Points to the location of the file containing
102 the component (for instance a .jar-file or a shared library).
104 should be in an URL format (= protocol:protocol-dependent-part).
105 In case the string contains no
106 leading "protocol:", the implementation in general assumes,
107 that it is a relative file url. <p>Special loaders may define
108 their own protocol (for instance an executable loader may need
109 more than only one file url).
110 @see com::sun::star::registry::XImplementationRegistration
112 boolean writeRegistryInfo
( [in] com
::sun
::star
::registry
::XRegistryKey xKey
,
113 [in] string implementationLoaderUrl
,
114 [in] string locationUrl
)
115 raises
( com
::sun
::star
::registry
::CannotRegisterImplementationException
);
119 //=============================================================================