27#include <com/sun/star/deployment/XPackageRegistry.hpp>
28#include <com/sun/star/deployment/XPackageManager.hpp>
36typedef ::cppu::WeakComponentImplHelper<
54 css::uno::Reference<css::ucb::XProgressHandler>
m_xLogFile;
55 inline void logIntern( css::uno::Any
const & status );
58 css::uno::Reference<css::deployment::XPackageRegistry>
m_xRegistry;
62 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv );
66 css::uno::Sequence<css::beans::NamedValue>
const &
properties,
67 OUString
const & mediaType,
74 css::uno::Reference<css::deployment::XPackage>
const & xPackage,
75 OUString
const & destFolder );
78 css::uno::Reference<css::deployment::XPackage>
const &
package);
81 css::uno::Reference<css::task::XAbortChannel>
const & xAbortChannel,
82 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv);
85 css::uno::Reference<css::task::XAbortChannel>
const & xAbortChannel,
86 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv);
89 :
public ::cppu::WeakImplHelper< css::ucb::XCommandEnvironment,
90 css::ucb::XProgressHandler >
92 css::uno::Reference<css::ucb::XProgressHandler>
m_xLogFile;
94 css::uno::Reference<css::task::XInteractionHandler>
100 css::uno::Reference<css::ucb::XCommandEnvironment>
102 css::uno::Reference<css::ucb::XProgressHandler>
const & xLogFile );
105 virtual css::uno::Reference<css::task::XInteractionHandler> SAL_CALL
107 virtual css::uno::Reference<css::ucb::XProgressHandler> SAL_CALL
111 virtual void SAL_CALL
push( css::uno::Any
const &
Status )
override;
112 virtual void SAL_CALL
update( css::uno::Any
const &
Status )
override;
113 virtual void SAL_CALL
pop()
override;
117 virtual void SAL_CALL
disposing()
override;
121 css::uno::Reference<css::uno::XComponentContext> xComponentContext, OUString context )
129 static css::uno::Reference<css::deployment::XPackageManager>
create(
130 css::uno::Reference<css::uno::XComponentContext>
131 const & xComponentContext, OUString
const & context );
134 virtual void SAL_CALL
dispose()
override;
136 css::uno::Reference<css::lang::XEventListener>
const & xListener )
override;
138 css::uno::Reference<css::lang::XEventListener>
const & xListener )
override;
142 css::uno::Reference<css::util::XModifyListener>
const & xListener )
override;
144 css::uno::Reference<css::util::XModifyListener>
const & xListener )
override;
147 virtual OUString SAL_CALL
getContext()
override;
148 virtual css::uno::Sequence<
149 css::uno::Reference<css::deployment::XPackageTypeInfo> > SAL_CALL
152 virtual css::uno::Reference<css::task::XAbortChannel> SAL_CALL
155 virtual css::uno::Reference<css::deployment::XPackage> SAL_CALL
addPackage(
156 OUString
const & url,
157 css::uno::Sequence<css::beans::NamedValue>
const &
properties,
158 OUString
const & mediaType,
159 css::uno::Reference<css::task::XAbortChannel>
const & xAbortChannel,
160 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv )
override;
162 virtual css::uno::Reference<css::deployment::XPackage> SAL_CALL
importExtension(
163 css::uno::Reference<css::deployment::XPackage>
const & extension,
164 css::uno::Reference<css::task::XAbortChannel>
const & xAbortChannel,
165 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv )
override;
168 OUString
const &
id, OUString
const & fileName,
169 css::uno::Reference<css::task::XAbortChannel>
const & xAbortChannel,
170 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv )
override;
174 OUString
const &
id, OUString
const & fileName,
175 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv );
178 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv,
179 bool ignoreAlienPlatforms =
false );
180 virtual css::uno::Reference<css::deployment::XPackage> SAL_CALL
182 OUString
const &
id, OUString
const & fileName,
183 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv )
override;
185 css::uno::Sequence< css::uno::Reference<css::deployment::XPackage> >
187 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv );
188 virtual css::uno::Sequence< css::uno::Reference<css::deployment::XPackage> >
190 css::uno::Reference<css::task::XAbortChannel>
const & xAbortChannel,
191 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv )
override;
195 css::uno::Reference<css::task::XAbortChannel>
const & xAbortChannel,
196 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv )
override;
198 virtual ::sal_Bool SAL_CALL
isReadOnly( )
override;
201 css::uno::Reference<css::task::XAbortChannel>
const & xAbortChannel,
202 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv )
override;
204 virtual css::uno::Sequence<css::uno::Reference<css::deployment::XPackage> > SAL_CALL
206 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv)
override;
209 css::uno::Reference<css::deployment::XPackage>
const & extension,
210 css::uno::Reference<css::task::XAbortChannel>
const & xAbortChannel,
211 css::uno::Reference<css::ucb::XCommandEnvironment>
const & xCmdEnv )
override;
217 ::osl::MutexGuard guard(
m_aMutex );
218 if (rBHelper.bInDispose || rBHelper.bDisposed)
219 throw css::lang::DisposedException(
220 "PackageManager instance has already been disposed!",
mutable::osl::Mutex m_aMutex
virtual css::uno::Reference< css::task::XInteractionHandler > SAL_CALL getInteractionHandler() override
virtual css::uno::Reference< css::ucb::XProgressHandler > SAL_CALL getProgressHandler() override
virtual void SAL_CALL push(css::uno::Any const &Status) override
virtual void SAL_CALL update(css::uno::Any const &Status) override
css::uno::Reference< css::ucb::XProgressHandler > m_xLogFile
css::uno::Reference< css::task::XInteractionHandler > m_xUserInteractionHandler
CmdEnvWrapperImpl(css::uno::Reference< css::ucb::XCommandEnvironment > const &xUserCmdEnv, css::uno::Reference< css::ucb::XProgressHandler > const &xLogFile)
virtual void SAL_CALL pop() override
css::uno::Reference< css::ucb::XProgressHandler > m_xUserProgress
virtual ~CmdEnvWrapperImpl() override
virtual css::uno::Reference< css::deployment::XPackage > SAL_CALL importExtension(css::uno::Reference< css::deployment::XPackage > const &extension, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
static void deletePackageFromCache(css::uno::Reference< css::deployment::XPackage > const &xPackage, OUString const &destFolder)
virtual void SAL_CALL reinstallDeployedPackages(sal_Bool force, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
OUString m_registrationData_expanded
virtual void SAL_CALL addModifyListener(css::uno::Reference< css::util::XModifyListener > const &xListener) override
virtual css::uno::Sequence< css::uno::Reference< css::deployment::XPackage > > SAL_CALL getDeployedPackages(css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
virtual void SAL_CALL removeEventListener(css::uno::Reference< css::lang::XEventListener > const &xListener) override
bool synchronizeRemovedExtensions(css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv)
css::uno::Reference< css::deployment::XPackage > getDeployedPackage_(std::u16string_view id, ActivePackages::Data const &data, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv, bool ignoreAlienPlatforms=false)
OUString m_activePackages
virtual void SAL_CALL addEventListener(css::uno::Reference< css::lang::XEventListener > const &xListener) override
css::uno::Reference< css::uno::XComponentContext > m_xComponentContext
OUString getDeployPath(ActivePackages::Data const &data)
void initRegistryBackends()
OUString m_registrationData
bool synchronizeAddedExtensions(css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv)
void insertToActivationLayerDB(OUString const &id, ActivePackages::Data const &dbData)
virtual void SAL_CALL removePackage(OUString const &id, OUString const &fileName, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
virtual css::uno::Sequence< css::uno::Reference< css::deployment::XPackageTypeInfo > > SAL_CALL getSupportedPackageTypes() override
virtual css::uno::Reference< css::deployment::XPackage > SAL_CALL getDeployedPackage(OUString const &id, OUString const &fileName, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
virtual void SAL_CALL disposing() override
css::uno::Reference< css::deployment::XPackage > getDeployedPackage_(OUString const &id, OUString const &fileName, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv)
virtual css::uno::Sequence< css::uno::Reference< css::deployment::XPackage > > SAL_CALL getExtensionsWithUnacceptedLicenses(css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
virtual ::sal_Bool SAL_CALL isReadOnly() override
std::unique_ptr< ActivePackages > m_activePackagesDB
OUString insertToActivationLayer(css::uno::Sequence< css::beans::NamedValue > const &properties, OUString const &mediaType, ::ucbhelper::Content const &sourceContent, OUString const &title, ActivePackages::Data *dbData)
virtual sal_Int32 SAL_CALL checkPrerequisites(css::uno::Reference< css::deployment::XPackage > const &extension, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
css::uno::Reference< css::ucb::XProgressHandler > m_xLogFile
virtual css::uno::Reference< css::deployment::XPackage > SAL_CALL addPackage(OUString const &url, css::uno::Sequence< css::beans::NamedValue > const &properties, OUString const &mediaType, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
virtual OUString SAL_CALL getContext() override
css::uno::Reference< css::deployment::XPackageRegistry > m_xRegistry
OUString detectMediaType(::ucbhelper::Content const &ucbContent, bool throw_exc=true)
virtual ::sal_Bool SAL_CALL synchronize(css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
void initActivationLayer(css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv)
bool isInstalled(css::uno::Reference< css::deployment::XPackage > const &package)
OUString m_activePackages_expanded
css::uno::Sequence< css::uno::Reference< css::deployment::XPackage > > getDeployedPackages_(css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv)
void logIntern(css::uno::Any const &status)
virtual css::uno::Reference< css::task::XAbortChannel > SAL_CALL createAbortChannel() override
virtual ~PackageManagerImpl() override
static css::uno::Reference< css::deployment::XPackageManager > create(css::uno::Reference< css::uno::XComponentContext > const &xComponentContext, OUString const &context)
PackageManagerImpl(css::uno::Reference< css::uno::XComponentContext > xComponentContext, OUString context)
virtual void SAL_CALL removeModifyListener(css::uno::Reference< css::util::XModifyListener > const &xListener) override
virtual void SAL_CALL dispose() override
::cppu::WeakComponentImplHelper< css::deployment::XPackageManager > t_pm_helper