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 .
21 module com
{ module sun
{ module star
{ module deployment
{
23 /** Interface to bind a UNO package.
27 interface XPackageRegistry
29 /** binds a package URL to a XPackage handle.
30 The returned UNO package handle ought to late-initialize itself,
31 thus the process of binding must not be an expensive operation, because
34 Calling the function several time with the same parameters must result
35 in returning the same object.
37 The file or folder at the location where url points to may not exist or
38 it was replaced. This can happen, for example, when a bundled extension
39 was removed by the setup and a user later starts OOo. Then the user data
40 may still contain all registration data of that extension, but the
41 actual extension files do not exist anymore. The registration data must
42 then be cleaned of all the remains of that extension. To do that one
43 creates an XPackage object on behalf of that extension and
44 calls XPackage::revokePackage(). The parameter
45 <code>removed</code> indicates this case. The returned object may not
46 rely on the file or folder to which refers <code>url</code>. Instead it
47 must use previously saved data to successfully carry out the revocation
48 of this object (XPackage::revokePackage()).
50 The implementation must ensure that there is only one instance of
51 XPackage for the same <code>url</code> at any
52 time. Therefore calling bindPackage() again with the same
53 <code>url</code> but different <code>mediaType</code> (the exception is,
54 if previously an empty string was provided to cause the determination
55 of the media type) or <code>removed</code> parameters will cause an
56 exception. A com::sun::star::lang::IllegalArgumentException will be
57 thrown in case of a different <code>mediaType</code> parameter and a
58 InvalidRemovedParameterException is thrown if the
59 <code>removed</code> parameter is different.
61 The <code>identifier</code> parameter must be provided when
62 <code>removed</code> = true. If not, then an
63 com::sun::star::lang::IllegalArgumentException will be thrown.
66 package URL, must be UCB conform
68 media type of package, empty string if to be detected
71 the identifier of the extension
73 command environment for error and progress handling
79 [in] string mediaType
,
81 [in] string identifier
,
82 [in] com
::sun
::star
::ucb
::XCommandEnvironment xCmdEnv
)
83 raises
(DeploymentException
,
84 InvalidRemovedParameterException
,
85 com
::sun
::star
::ucb
::CommandFailedException
,
86 com
::sun
::star
::lang
::IllegalArgumentException
);
88 /** gets the supported XPackageTypeInfos.
91 supported XPackageTypeInfos.
93 sequence
<XPackageTypeInfo
> getSupportedPackageTypes
();
97 [in] string mediaType
)
98 raises
(DeploymentException
,
99 com
::sun
::star
::lang
::IllegalArgumentException
);
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */