1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _com_sun_star_deployment_XPackageRegistry_idl
21 #define _com_sun_star_deployment_XPackageRegistry_idl
23 #include
<com
/sun
/star
/deployment
/XPackage.idl
>
24 #include
<com
/sun
/star
/deployment
/XPackageTypeInfo.idl
>
25 #include
<com
/sun
/star
/deployment
/InvalidRemovedParameterException.idl
>
26 #include
<com
/sun
/star
/beans
/StringPair.idl
>
29 module com
{ module sun
{ module star
{ module deployment
{
31 /** Interface to bind an UNO package.
35 interface XPackageRegistry
37 /** binds a package URL to a XPackage handle.
38 The returned UNO package handle ought to late-initialize itself,
39 thus the process of binding must not be an expensive operation, because
42 Calling the function several time with the same parameters must result
43 in returning the same object.
45 The file or folder at the location where url points to may not exist or
46 it was replaced. This can happen, for example, when a bundled extension
47 was removed by the setup and a user later starts OOo. Then the user data
48 may still contain all registration data of that extension, but the
49 actual extension files do not exist anymore. The registration data must
50 then be cleaned of all the remains of that extension. To do that one
51 creates an XPackage object on behalf of that extension and
52 calls XPackage::revokePakage(). The parameter
53 <code>removed</code> indicates this case. The returned object may not
54 rely on the file or folder to which refers <code>url</code>. Instead it
55 must use previously saved data to successfully carry out the revocation
56 of this object (XPackage::revokePackage()).
58 The implementation must ensure that there is only one instance of
59 XPackage for the same <code>url</code> at any
60 time. Therefore calling bindPackage() again with the same
61 <code>url</code> but different <code>mediaType</code> (the exception is,
62 if previously an empty string was provided to cause the determination
63 of the media type) or <code>removed</code> parameters will cause an
64 exception. An com::sun::star::lang::IllegalArgumentException will be
65 thrown in case of a different <code>mediaType</code> parameter and a
66 InvalidRemovedParameterException is thrown if the
67 <code>removed</code> parameter is different.
69 The <code>identifier</code> parameter must be provided when
70 <code>removed</code> = true. If not, then an
71 com::sun::star::lang::IllegalArgumentException will be thrown.
74 package URL, must be UCB conform
76 media type of package, empty string if to be detected
79 the identifier of the extension
81 command environment for error and progress handling
87 [in] string mediaType
,
89 [in] string identifier
,
90 [in] com
::sun
::star
::ucb
::XCommandEnvironment xCmdEnv
)
91 raises
(DeploymentException
,
92 InvalidRemovedParameterException
,
93 com
::sun
::star
::ucb
::CommandFailedException
,
94 com
::sun
::star
::lang
::IllegalArgumentException
);
96 /** gets the supported XPackageTypeInfos.
99 supported XPackageTypeInfos.
101 sequence
<XPackageTypeInfo
> getSupportedPackageTypes
();
105 [in] string mediaType
)
106 raises
(DeploymentException
,
107 com
::sun
::star
::lang
::IllegalArgumentException
);
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */