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 /** Objects of this interface reflect a bound package and are issued by a
24 PackageRegistryBackend.
30 /** implemented to notify that the package has been removed
32 interface com
::sun
::star
::lang
::XComponent
;
34 /** notifies changes of the registration state of the package
36 interface com
::sun
::star
::util
::XModifyBroadcaster
;
39 /** creates a command channel to be used to asynchronously abort a command.
44 com
::sun
::star
::task
::XAbortChannel createAbortChannel
();
46 /** checks if the package can be installed.
48 Only if the return value is `TRUE` the package is allowed to be installed.
49 In case of `FALSE` or in case of an exception, the package must be removed
51 After return of this function no code from the extension may be used
52 anymore, so that the extension can be safely removed from the hard disk.
55 abort channel to asynchronously abort the registration process,
58 command environment for error handling and other interaction.
59 @param alreadyInstalled
60 indicates that an extension with the same identifier is already installed.
63 `NULL` - all prerequisites are met. Otherwise, a value from
64 Prerequisites indicating what prerequisites are missing.
66 long checkPrerequisites
(
67 [in] com
::sun
::star
::task
::XAbortChannel xAbortChannel
,
68 [in] com
::sun
::star
::ucb
::XCommandEnvironment xCmdEnv
,
69 [in] boolean alreadyInstalled
)
70 raises
(DeploymentException
,
71 ExtensionRemovedException
,
72 com
::sun
::star
::ucb
::CommandFailedException
,
73 com
::sun
::star
::ucb
::CommandAbortedException
);
75 /** checks if the dependencies for this package are still satisfied
77 After updating the OpenOffice.org, some dependencies for packages might
78 no longer be satisfied.
83 command environment for error handling and other interaction.
86 `TRUE` - all dependencies are satisfied
87 `FALSE` - at least one dependency failed.
89 boolean checkDependencies
(
90 [in] com
::sun
::star
::ucb
::XCommandEnvironment xCmdEnv
)
91 raises
(DeploymentException
,
92 ExtensionRemovedException
,
93 com
::sun
::star
::ucb
::CommandFailedException
);
96 /** determines whether the package is currently registered, i.e.
100 abort channel to asynchronously abort the registration process,
103 command environment for error and progress handling
105 status whether the package is registered (`TRUE`, `FALSE`) or
106 the status is ambiguous. Additionally, a registration status
107 may not apply, e.g. in case of an empty package bundle.
109 com
::sun
::star
::beans
::Optional<
110 com
::sun
::star
::beans
::Ambiguous
<boolean> > isRegistered
(
111 [in] com
::sun
::star
::task
::XAbortChannel xAbortChannel
,
112 [in] com
::sun
::star
::ucb
::XCommandEnvironment xCmdEnv
)
113 raises
(DeploymentException
,
114 com
::sun
::star
::ucb
::CommandFailedException
,
115 com
::sun
::star
::ucb
::CommandAbortedException
);
117 /** registers this XPackage.
119 NEVER call this directly. This is done by the extension manager if necessary.
122 indicates that registration is adapted to the particular
123 startup scenario. That is, it is set to `TRUE`, when called
124 from XExtensionManager::synchronize()
126 abort channel to asynchronously abort the registration process,
129 command environment for error and progress handling
131 void registerPackage
(
132 [in] boolean startup
,
133 [in] com
::sun
::star
::task
::XAbortChannel xAbortChannel
,
134 [in] com
::sun
::star
::ucb
::XCommandEnvironment xCmdEnv
)
135 raises
(DeploymentException
,
136 ExtensionRemovedException
,
137 com
::sun
::star
::ucb
::CommandFailedException
,
138 com
::sun
::star
::ucb
::CommandAbortedException
,
139 com
::sun
::star
::lang
::IllegalArgumentException
);
141 /** revokes this XPackage.
143 NEVER call this directly. This is done by the extension manager if necessary.
146 indicates that registration is adapted to the particular
147 startup scenario. That is, it is set to `TRUE`, when called
148 from XExtensionManager::synchronize()
150 abort channel to asynchronously abort the registration process,
153 command environment for error and progress handling
156 [in] boolean startup
,
157 [in] com
::sun
::star
::task
::XAbortChannel xAbortChannel
,
158 [in] com
::sun
::star
::ucb
::XCommandEnvironment xCmdEnv
)
159 raises
(DeploymentException
,
160 com
::sun
::star
::ucb
::CommandFailedException
,
161 com
::sun
::star
::ucb
::CommandAbortedException
,
162 com
::sun
::star
::lang
::IllegalArgumentException
);
164 /** reflects whether this package is a bundle of one or more packages,
165 e.g. a zip (legacy) package file or a document hosting script packages.
168 `TRUE` if this package is a package bundle, `FALSE` otherwise
172 /** Gets packages of the bundle.
174 If isRemoved() returns `TRUE` then getBundle may return an
175 empty sequence in case the object is not registered.
178 abort channel to asynchronously abort the registration process,
181 command environment for error and progress handling
183 set of packages enclosed in this package
185 sequence
<XPackage
> getBundle
(
186 [in] com
::sun
::star
::task
::XAbortChannel xAbortChannel
,
187 [in] com
::sun
::star
::ucb
::XCommandEnvironment xCmdEnv
)
188 raises
(DeploymentException
,
189 com
::sun
::star
::ucb
::CommandFailedException
,
190 com
::sun
::star
::ucb
::CommandAbortedException
,
191 com
::sun
::star
::lang
::IllegalArgumentException
);
193 /** returns the file name of the package.
196 file name of the package
200 /** returns the unique extension identifier.
203 the extension identifier (a
204 <code>"org.openoffice.legacy."</code> one if the extension does not
205 explicitly specify one), or an empty <code>Optional</code> if this
206 package does not represent an extension
208 com
::sun
::star
::beans
::Optional<string> getIdentifier
();
210 /** returns the textual version representation of the package.
212 A textual version representation is a finite string following the
214 version ::= [element ("." element)*]<br/>
215 element ::= ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9")+
218 the textual version representation
221 raises
(ExtensionRemovedException
);
223 /** returns the location of the package.
230 /** returns the display name of the package, e.g. for graphical user
234 display name of the package
236 string getDisplayName
()
237 raises
(ExtensionRemovedException
);
239 /** returns a description string to describe the package.
244 string getDescription
()
245 raises
(ExtensionRemovedException
);
247 /** returns a string containing the license text.
252 string getLicenseText
()
253 raises
(DeploymentException
,
254 ExtensionRemovedException
);
256 /** returns a sequence of update information URLs.
258 The sequence may be empty in case no update information is available.
259 If the sequence contains more than one URL, the extra URLs must mirror
260 the information available at the first URL.
263 update information URLs
265 sequence
<string> getUpdateInformationURLs
()
266 raises
(ExtensionRemovedException
);
267 /** returns the publisher info for the package, the strings
268 might be empty, if there is no publisher
270 ::com::sun::star::beans::StringPair::First
271 represents the publisher name and
272 ::com::sun::star::beans::StringPair::Second
273 represents the URL to the publisher.
276 ::com
::sun
::star
::beans
::StringPair getPublisherInfo
()
277 raises
(ExtensionRemovedException
);
278 /** returns the XPackageTypeInfo, e.g. media-type etc.
281 media type of package
283 XPackageTypeInfo getPackageType
();
285 /** exports package to given destination URL.
288 package destination folder URL, must be UCB conforming
291 @param nameClashAction
292 one of com::sun::star::ucb::NameClash
294 command environment for error and progress handling
296 void exportTo
( [in] string destFolderURL
,
297 [in] string newTitle
,
298 [in] long nameClashAction
,
299 [in] com
::sun
::star
::ucb
::XCommandEnvironment xCmdEnv
)
301 ExtensionRemovedException
,
302 com
::sun
::star
::ucb
::CommandFailedException
,
303 com
::sun
::star
::ucb
::CommandAbortedException
,
304 com
::sun
::star
::ucb
::ContentCreationException
);
306 /** returns an icon for a package.
309 return high contrast icon
311 the icon which should be used to represent the table in the
312 database application window, or `NULL` if the default icon
315 com
::sun
::star
::graphic
::XGraphic getIcon
( [in] boolean highContrast
)
316 raises
(ExtensionRemovedException
);
318 /** returns the name of the repository where this object comes from.
320 string getRepositoryName
();
322 /** return a URL to a directory which contains the registration data.
324 This data may be created when calling
325 XPackage::registerPackage(). If this is the case is
327 com::sun::star::beans::Optional::IsPresent of the return
329 If registration data are created during registration, but the package is
330 currently not registered, for example after calling
331 XPackage::revokePackage(), then
332 com::sun::star::beans::Optional::IsPresent is `TRUE` and
333 the com::sun::star::beans::Optional::Value may
336 com
::sun
::star
::beans
::Optional<string> getRegistrationDataURL
()
337 raises
(DeploymentException
, ExtensionRemovedException
);
339 /** indicates if this object represents a removed extension or extension
340 item. This is the case when it was created by providing
341 `TRUE` for the <code>removed</code> parameter in the function
342 XPackageRegistry::bindPackage().
350 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */