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_XPackage_idl
21 #define _com_sun_star_deployment_XPackage_idl
23 #include
<com
/sun
/star
/beans
/Optional.idl
>
24 #include
<com
/sun
/star
/beans
/Ambiguous.idl
>
25 #include
<com
/sun
/star
/beans
/StringPair.idl
>
26 #include
<com
/sun
/star
/deployment
/DeploymentException.idl
>
27 #include
<com
/sun
/star
/deployment
/XPackageTypeInfo.idl
>
28 #include
<com
/sun
/star
/deployment
/ExtensionRemovedException.idl
>
29 #include
<com
/sun
/star
/graphic
/XGraphic.idl
>
30 #include
<com
/sun
/star
/lang
/XComponent.idl
>
31 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
32 #include
<com
/sun
/star
/task
/XAbortChannel.idl
>
33 #include
<com
/sun
/star
/ucb
/CommandFailedException.idl
>
34 #include
<com
/sun
/star
/ucb
/CommandAbortedException.idl
>
35 #include
<com
/sun
/star
/ucb
/XCommandEnvironment.idl
>
36 #include
<com
/sun
/star
/util
/XModifyBroadcaster.idl
>
39 module com
{ module sun
{ module star
{ module deployment
{
41 /** Objects of this interface reflect a bound package and are issued by a
42 PackageRegistryBackend.
48 /** implemented to notify that the package has been removed
50 interface com
::sun
::star
::lang
::XComponent
;
52 /** notifies changes of the registration state of the package
54 interface com
::sun
::star
::util
::XModifyBroadcaster
;
57 /** creates a command channel to be used to asynchronously abort a command.
62 com
::sun
::star
::task
::XAbortChannel createAbortChannel
();
64 /** checks if the package can be installed.
66 Only if the return value is `TRUE` the package is allowed to be installed.
67 In case of `FALSE` or in case of an exception, the package must be removed
69 After return of this function no code from the extension may be used
70 anymore, so that the extension can be safely removed from the hard disk.
73 abort channel to asynchronously abort the registration process,
76 command environment for error handling and other interaction.
77 @param alreadyInstalled
78 indicates that an extension with the same identifier is already installed.
81 `NULL` - all prerequisites are met. Otherwise, a value from
82 Prerequisites indicating what prerequisites are missing.
84 long checkPrerequisites
(
85 [in] com
::sun
::star
::task
::XAbortChannel xAbortChannel
,
86 [in] com
::sun
::star
::ucb
::XCommandEnvironment xCmdEnv
,
87 [in] boolean alreadyInstalled
)
88 raises
(DeploymentException
,
89 ExtensionRemovedException
,
90 com
::sun
::star
::ucb
::CommandFailedException
,
91 com
::sun
::star
::ucb
::CommandAbortedException
);
93 /** checks if the dependencies for this package are still satisfied
95 After updating the OpenOffice.org, some dependencies for packages might
96 no longer be satisfied.
101 command environment for error handling and other interaction.
104 `TRUE` - all dependencies are satisfied
105 `FALSE` - at least one dependency failed.
107 boolean checkDependencies
(
108 [in] com
::sun
::star
::ucb
::XCommandEnvironment xCmdEnv
)
109 raises
(DeploymentException
,
110 ExtensionRemovedException
,
111 com
::sun
::star
::ucb
::CommandFailedException
);
114 /** determines whether the package is currently registered, i.e.
115 whether it is active.
118 abort channel to asynchronously abort the registration process,
121 command environment for error and progress handling
123 status whether the package is registered (`TRUE`, `FALSE`) or
124 the status is ambiguous. Additionally, a registration status
125 may not apply, e.g. in case of an empty package bundle.
127 com
::sun
::star
::beans
::Optional<
128 com
::sun
::star
::beans
::Ambiguous
<boolean> > isRegistered
(
129 [in] com
::sun
::star
::task
::XAbortChannel xAbortChannel
,
130 [in] com
::sun
::star
::ucb
::XCommandEnvironment xCmdEnv
)
131 raises
(DeploymentException
,
132 com
::sun
::star
::ucb
::CommandFailedException
,
133 com
::sun
::star
::ucb
::CommandAbortedException
);
135 /** registers this XPackage.
137 NEVER call this directly. This is done by the extension manager if necessary.
140 indicates that registration is adapted to the particular
141 startup scenario. That is, it is set to `TRUE`, when called
142 from XExtensionManager::synchronize()
144 abort channel to asynchronously abort the registration process,
147 command environment for error and progress handling
149 void registerPackage
(
150 [in] boolean startup
,
151 [in] com
::sun
::star
::task
::XAbortChannel xAbortChannel
,
152 [in] com
::sun
::star
::ucb
::XCommandEnvironment xCmdEnv
)
153 raises
(DeploymentException
,
154 ExtensionRemovedException
,
155 com
::sun
::star
::ucb
::CommandFailedException
,
156 com
::sun
::star
::ucb
::CommandAbortedException
,
157 com
::sun
::star
::lang
::IllegalArgumentException
);
159 /** revokes this XPackage.
161 NEVER call this directly. This is done by the extension manager if necessary.
164 indicates that registration is adapted to the particular
165 startup scenario. That is, it is set to `TRUE`, when called
166 from XExtensionManager::synchronize()
168 abort channel to asynchronously abort the registration process,
171 command environment for error and progress handling
174 [in] boolean startup
,
175 [in] com
::sun
::star
::task
::XAbortChannel xAbortChannel
,
176 [in] com
::sun
::star
::ucb
::XCommandEnvironment xCmdEnv
)
177 raises
(DeploymentException
,
178 com
::sun
::star
::ucb
::CommandFailedException
,
179 com
::sun
::star
::ucb
::CommandAbortedException
,
180 com
::sun
::star
::lang
::IllegalArgumentException
);
182 /** reflects whether this package is a bundle of one or more packages,
183 e.g. a zip (legacy) package file or a document hosting script packages.
186 `TRUE` if this package is a package bundle, `FALSE` otherwise
190 /** Gets packages of the bundle.
192 If isRemoved() returns `TRUE` then getBundle may return an
193 empty sequence in case the object is not registered.
196 abort channel to asynchronously abort the registration process,
199 command environment for error and progress handling
201 set of packages enclosed in this package
203 sequence
<XPackage
> getBundle
(
204 [in] com
::sun
::star
::task
::XAbortChannel xAbortChannel
,
205 [in] com
::sun
::star
::ucb
::XCommandEnvironment xCmdEnv
)
206 raises
(DeploymentException
,
207 com
::sun
::star
::ucb
::CommandFailedException
,
208 com
::sun
::star
::ucb
::CommandAbortedException
,
209 com
::sun
::star
::lang
::IllegalArgumentException
);
211 /** returns the file name of the package.
214 file name of the package
218 /** returns the unique extension identifier.
221 the extension identifier (a
222 <code>"org.openoffice.legacy."</code> one if the extension does not
223 explicitly specify one), or an empty <code>Optional</code> if this
224 package does not represent an extension
226 com
::sun
::star
::beans
::Optional<string> getIdentifier
();
228 /** returns the textual version representation of the package.
230 A textual version representation is a finite string following the
232 version ::= [element ("." element)*]<br/>
233 element ::= ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9")+
236 the textual version representation
239 raises
(ExtensionRemovedException
);
241 /** returns the location of the package.
248 /** returns the display name of the package, e.g. for graphical user
252 display name of the package
254 string getDisplayName
()
255 raises
(ExtensionRemovedException
);
257 /** returns a description string to describe the package.
262 string getDescription
()
263 raises
(ExtensionRemovedException
);
265 /** returns a string containing the license text.
270 string getLicenseText
()
271 raises
(DeploymentException
,
272 ExtensionRemovedException
);
274 /** returns a sequence of update information URLs.
276 The sequence may be empty in case no update information is available.
277 If the sequence contains more than one URL, the extra URLs must mirror
278 the information available at the first URL.
281 update information URLs
283 sequence
<string> getUpdateInformationURLs
()
284 raises
(ExtensionRemovedException
);
285 /** returns the publisher info for the package, the strings
286 might be empty, if there is no publisher
288 ::com::sun::star::beans::StringPair::First
289 represents the publisher name and
290 ::com::sun::star::beans::StringPair::Second
291 represents the URL to the publisher.
294 ::com
::sun
::star
::beans
::StringPair getPublisherInfo
()
295 raises
(ExtensionRemovedException
);
296 /** returns the XPackageTypeInfo, e.g. media-type etc.
299 media type of package
301 XPackageTypeInfo getPackageType
();
303 /** exports package to given destination URL.
306 package destination folder URL, must be UCB conforming
309 @param nameClashAction
310 one of com::sun::star::ucb::NameClash
312 command environment for error and progress handling
314 void exportTo
( [in] string destFolderURL
,
315 [in] string newTitle
,
316 [in] long nameClashAction
,
317 [in] com
::sun
::star
::ucb
::XCommandEnvironment xCmdEnv
)
319 ExtensionRemovedException
,
320 com
::sun
::star
::ucb
::CommandFailedException
,
321 com
::sun
::star
::ucb
::CommandAbortedException
,
322 com
::sun
::star
::ucb
::ContentCreationException
);
324 /** returns an icon for a package.
327 return high contrast icon
329 the icon which should be used to represent the table in the
330 database application window, or `NULL` if the default icon
333 com
::sun
::star
::graphic
::XGraphic getIcon
( [in] boolean highContrast
)
334 raises
(ExtensionRemovedException
);
336 /** returns the name of the repository where this object comes from.
338 string getRepositoryName
();
340 /** return a URL to a directory which contains the registration data.
342 This data may be created when calling
343 XPackage::registerPackage(). If this is the case is
345 com::sun::star::beans::Optional::IsPresent of the return
347 If registration data are created during registration, but the package is
348 currently not registered, for example after calling
349 XPackage::revokePackage(), then
350 com::sun::star::beans::Optional::IsPresent is `TRUE` and
351 the com::sun::star::beans::Optional::Value may
354 com
::sun
::star
::beans
::Optional<string> getRegistrationDataURL
()
355 raises
(DeploymentException
, ExtensionRemovedException
);
357 /** indicates if this object represents a removed extension or extension
358 item. This is the case when it was created by providing
359 `TRUE` for the <code>removed</code> parameter in the function
360 XPackageRegistry::bindPackage().
370 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */