LibreOffice Module desktop (master) 1
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
dp_manager::PackageManagerImpl Class Referencefinal

#include <dp_manager.h>

Inheritance diagram for dp_manager::PackageManagerImpl:
[legend]
Collaboration diagram for dp_manager::PackageManagerImpl:
[legend]

Classes

class  CmdEnvWrapperImpl
 

Public Member Functions

virtual void SAL_CALL dispose () override
 
virtual void SAL_CALL addEventListener (css::uno::Reference< css::lang::XEventListener > const &xListener) override
 
virtual void SAL_CALL removeEventListener (css::uno::Reference< css::lang::XEventListener > const &xListener) override
 
virtual void SAL_CALL addModifyListener (css::uno::Reference< css::util::XModifyListener > const &xListener) override
 
virtual void SAL_CALL removeModifyListener (css::uno::Reference< css::util::XModifyListener > const &xListener) override
 
virtual OUString SAL_CALL getContext () override
 
virtual css::uno::Sequence< css::uno::Reference< css::deployment::XPackageTypeInfo > > SAL_CALL getSupportedPackageTypes () override
 
virtual css::uno::Reference< css::task::XAbortChannel > SAL_CALL createAbortChannel () override
 
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 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
 
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
 
OUString getDeployPath (ActivePackages::Data const &data)
 
css::uno::Reference< css::deployment::XPackage > getDeployedPackage_ (OUString const &id, OUString const &fileName, 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)
 
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
 
css::uno::Sequence< css::uno::Reference< css::deployment::XPackage > > getDeployedPackages_ (css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv)
 
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 reinstallDeployedPackages (sal_Bool force, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
 
virtual ::sal_Bool SAL_CALL isReadOnly () override
 
virtual ::sal_Bool SAL_CALL synchronize (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::XPackage > > SAL_CALL getExtensionsWithUnacceptedLicenses (css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override
 
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
 

Static Public Member Functions

static css::uno::Reference< css::deployment::XPackageManager > create (css::uno::Reference< css::uno::XComponentContext > const &xComponentContext, OUString const &context)
 

Private Member Functions

void logIntern (css::uno::Any const &status)
 
void fireModified ()
 
void initRegistryBackends ()
 
void initActivationLayer (css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv)
 
OUString detectMediaType (::ucbhelper::Content const &ucbContent, bool throw_exc=true)
 
OUString insertToActivationLayer (css::uno::Sequence< css::beans::NamedValue > const &properties, OUString const &mediaType, ::ucbhelper::Content const &sourceContent, OUString const &title, ActivePackages::Data *dbData)
 
void insertToActivationLayerDB (OUString const &id, ActivePackages::Data const &dbData)
 
bool isInstalled (css::uno::Reference< css::deployment::XPackage > const &package)
 
bool synchronizeRemovedExtensions (css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv)
 
bool synchronizeAddedExtensions (css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv)
 
void check ()
 
virtual void SAL_CALL disposing () override
 
virtual ~PackageManagerImpl () override
 
 PackageManagerImpl (css::uno::Reference< css::uno::XComponentContext > xComponentContext, OUString context)
 

Static Private Member Functions

static void deletePackageFromCache (css::uno::Reference< css::deployment::XPackage > const &xPackage, OUString const &destFolder)
 

Private Attributes

css::uno::Reference< css::uno::XComponentContext > m_xComponentContext
 
OUString m_context
 
OUString m_registrationData
 
OUString m_registrationData_expanded
 
OUString m_registryCache
 
bool m_readOnly
 
OUString m_activePackages
 
OUString m_activePackages_expanded
 
std::unique_ptr< ActivePackagesm_activePackagesDB
 
::osl::Mutex m_addMutex
 
css::uno::Reference< css::ucb::XProgressHandler > m_xLogFile
 
css::uno::Reference< css::deployment::XPackageRegistry > m_xRegistry
 
- Private Attributes inherited from cppu::BaseMutex
mutable::osl::Mutex m_aMutex
 

Detailed Description

Definition at line 39 of file dp_manager.h.

Constructor & Destructor Documentation

◆ ~PackageManagerImpl()

dp_manager::PackageManagerImpl::~PackageManagerImpl ( )
overrideprivatevirtual

Definition at line 453 of file dp_manager.cxx.

◆ PackageManagerImpl()

dp_manager::PackageManagerImpl::PackageManagerImpl ( css::uno::Reference< css::uno::XComponentContext >  xComponentContext,
OUString  context 
)
inlineprivate

Definition at line 119 of file dp_manager.h.

Referenced by create().

Member Function Documentation

◆ addEventListener()

void dp_manager::PackageManagerImpl::addEventListener ( css::uno::Reference< css::lang::XEventListener > const &  xListener)
overridevirtual

Definition at line 506 of file dp_manager.cxx.

◆ addModifyListener()

void dp_manager::PackageManagerImpl::addModifyListener ( css::uno::Reference< css::util::XModifyListener > const &  xListener)
overridevirtual

Definition at line 548 of file dp_manager.cxx.

References check().

◆ addPackage()

Reference< deployment::XPackage > dp_manager::PackageManagerImpl::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 
)
overridevirtual

◆ check()

void dp_manager::PackageManagerImpl::check ( )
inlineprivate

◆ checkPrerequisites()

sal_Int32 dp_manager::PackageManagerImpl::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 
)
overridevirtual

◆ create()

Reference< deployment::XPackageManager > dp_manager::PackageManagerImpl::create ( css::uno::Reference< css::uno::XComponentContext > const &  xComponentContext,
OUString const &  context 
)
static

◆ createAbortChannel()

Reference< task::XAbortChannel > dp_manager::PackageManagerImpl::createAbortChannel ( )
overridevirtual

Definition at line 540 of file dp_manager.cxx.

References check().

◆ deletePackageFromCache()

void dp_manager::PackageManagerImpl::deletePackageFromCache ( css::uno::Reference< css::deployment::XPackage > const &  xPackage,
OUString const &  destFolder 
)
staticprivate

Definition at line 843 of file dp_manager.cxx.

References dp_misc::erase_path(), and dp_misc::try_dispose().

Referenced by addPackage().

◆ detectMediaType()

OUString dp_manager::PackageManagerImpl::detectMediaType ( ::ucbhelper::Content const &  ucbContent,
bool  throw_exc = true 
)
private

◆ dispose()

void dp_manager::PackageManagerImpl::dispose ( void  )
overridevirtual

Definition at line 498 of file dp_manager.cxx.

◆ disposing()

void dp_manager::PackageManagerImpl::disposing ( )
overrideprivatevirtual

◆ fireModified()

void dp_manager::PackageManagerImpl::fireModified ( )
private

Definition at line 458 of file dp_manager.cxx.

References cppu::OInterfaceContainerHelper::forEach().

Referenced by addPackage(), and removePackage().

◆ getContext()

OUString dp_manager::PackageManagerImpl::getContext ( )
overridevirtual

Definition at line 525 of file dp_manager.cxx.

References check(), and m_context.

◆ getDeployedPackage()

Reference< deployment::XPackage > dp_manager::PackageManagerImpl::getDeployedPackage ( OUString const &  id,
OUString const &  fileName,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
overridevirtual

◆ getDeployedPackage_() [1/2]

css::uno::Reference< css::deployment::XPackage > dp_manager::PackageManagerImpl::getDeployedPackage_ ( OUString const &  id,
OUString const &  fileName,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)

◆ getDeployedPackage_() [2/2]

css::uno::Reference< css::deployment::XPackage > dp_manager::PackageManagerImpl::getDeployedPackage_ ( std::u16string_view  id,
ActivePackages::Data const &  data,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv,
bool  ignoreAlienPlatforms = false 
)

◆ getDeployedPackages()

Sequence< Reference< deployment::XPackage > > dp_manager::PackageManagerImpl::getDeployedPackages ( css::uno::Reference< css::task::XAbortChannel > const &  xAbortChannel,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
overridevirtual

◆ getDeployedPackages_()

Sequence< Reference< deployment::XPackage > > dp_manager::PackageManagerImpl::getDeployedPackages_ ( css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv)

◆ getDeployPath()

OUString dp_manager::PackageManagerImpl::getDeployPath ( ActivePackages::Data const &  data)

◆ getExtensionsWithUnacceptedLicenses()

Sequence< Reference< deployment::XPackage > > dp_manager::PackageManagerImpl::getExtensionsWithUnacceptedLicenses ( css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv)
overridevirtual

◆ getSupportedPackageTypes()

Sequence< Reference< deployment::XPackageTypeInfo > > dp_manager::PackageManagerImpl::getSupportedPackageTypes ( )
overridevirtual

Definition at line 533 of file dp_manager.cxx.

References m_xRegistry.

◆ importExtension()

Reference< deployment::XPackage > dp_manager::PackageManagerImpl::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 
)
overridevirtual

Definition at line 696 of file dp_manager.cxx.

References addPackage().

◆ initActivationLayer()

void dp_manager::PackageManagerImpl::initActivationLayer ( css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv)
private

◆ initRegistryBackends()

void dp_manager::PackageManagerImpl::initRegistryBackends ( )
private

◆ insertToActivationLayer()

OUString dp_manager::PackageManagerImpl::insertToActivationLayer ( css::uno::Sequence< css::beans::NamedValue > const &  properties,
OUString const &  mediaType,
::ucbhelper::Content const &  sourceContent,
OUString const &  title,
ActivePackages::Data dbData 
)
private

◆ insertToActivationLayerDB()

void dp_manager::PackageManagerImpl::insertToActivationLayerDB ( OUString const &  id,
ActivePackages::Data const &  dbData 
)
private

◆ isInstalled()

bool dp_manager::PackageManagerImpl::isInstalled ( css::uno::Reference< css::deployment::XPackage > const &  package)
private

Definition at line 681 of file dp_manager.cxx.

References dp_misc::getIdentifier(), and m_activePackagesDB.

Referenced by addPackage().

◆ isReadOnly()

sal_Bool SAL_CALL dp_manager::PackageManagerImpl::isReadOnly ( )
override

Definition at line 1181 of file dp_manager.cxx.

References m_readOnly.

◆ logIntern()

void dp_manager::PackageManagerImpl::logIntern ( css::uno::Any const &  status)
inlineprivate

◆ reinstallDeployedPackages()

void dp_manager::PackageManagerImpl::reinstallDeployedPackages ( sal_Bool  force,
css::uno::Reference< css::task::XAbortChannel > const &  xAbortChannel,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
overridevirtual

◆ removeEventListener()

void dp_manager::PackageManagerImpl::removeEventListener ( css::uno::Reference< css::lang::XEventListener > const &  xListener)
overridevirtual

Definition at line 515 of file dp_manager.cxx.

◆ removeModifyListener()

void dp_manager::PackageManagerImpl::removeModifyListener ( css::uno::Reference< css::util::XModifyListener > const &  xListener)
overridevirtual

Definition at line 556 of file dp_manager.cxx.

References check().

◆ removePackage()

void dp_manager::PackageManagerImpl::removePackage ( OUString const &  id,
OUString const &  fileName,
css::uno::Reference< css::task::XAbortChannel > const &  xAbortChannel,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
overridevirtual

◆ synchronize()

sal_Bool dp_manager::PackageManagerImpl::synchronize ( css::uno::Reference< css::task::XAbortChannel > const &  xAbortChannel,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
override

◆ synchronizeAddedExtensions()

bool dp_manager::PackageManagerImpl::synchronizeAddedExtensions ( css::uno::Reference< css::task::XAbortChannel > const &  xAbortChannel,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
private

◆ synchronizeRemovedExtensions()

bool dp_manager::PackageManagerImpl::synchronizeRemovedExtensions ( css::uno::Reference< css::task::XAbortChannel > const &  xAbortChannel,
css::uno::Reference< css::ucb::XCommandEnvironment > const &  xCmdEnv 
)
private

Member Data Documentation

◆ m_activePackages

OUString dp_manager::PackageManagerImpl::m_activePackages
private

◆ m_activePackages_expanded

OUString dp_manager::PackageManagerImpl::m_activePackages_expanded
private

◆ m_activePackagesDB

std::unique_ptr< ActivePackages > dp_manager::PackageManagerImpl::m_activePackagesDB
private

◆ m_addMutex

::osl::Mutex dp_manager::PackageManagerImpl::m_addMutex
private

Definition at line 52 of file dp_manager.h.

Referenced by addPackage().

◆ m_context

OUString dp_manager::PackageManagerImpl::m_context
private

◆ m_readOnly

bool dp_manager::PackageManagerImpl::m_readOnly
private

Definition at line 46 of file dp_manager.h.

Referenced by addPackage(), initActivationLayer(), isReadOnly(), and removePackage().

◆ m_registrationData

OUString dp_manager::PackageManagerImpl::m_registrationData
private

Definition at line 43 of file dp_manager.h.

Referenced by initActivationLayer().

◆ m_registrationData_expanded

OUString dp_manager::PackageManagerImpl::m_registrationData_expanded
private

Definition at line 44 of file dp_manager.h.

Referenced by initActivationLayer().

◆ m_registryCache

OUString dp_manager::PackageManagerImpl::m_registryCache
private

◆ m_xComponentContext

css::uno::Reference<css::uno::XComponentContext> dp_manager::PackageManagerImpl::m_xComponentContext
private

◆ m_xLogFile

css::uno::Reference<css::ucb::XProgressHandler> dp_manager::PackageManagerImpl::m_xLogFile
private

◆ m_xRegistry

css::uno::Reference<css::deployment::XPackageRegistry> dp_manager::PackageManagerImpl::m_xRegistry
private

The documentation for this class was generated from the following files: