LibreOffice Module desktop (master) 1
|
#include <dp_extensionmanager.hxx>
Public Member Functions | |
ExtensionManager (css::uno::Reference< css::uno::XComponentContext >const &xContext) | |
virtual | ~ExtensionManager () override |
void | check () |
void | fireModified () |
virtual OUString SAL_CALL | getImplementationName () override |
virtual sal_Bool SAL_CALL | supportsService (const OUString &ServiceName) override |
virtual css::uno::Sequence< OUString > SAL_CALL | getSupportedServiceNames () 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 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 | addExtension (OUString const &url, css::uno::Sequence< css::beans::NamedValue > const &properties, OUString const &repository, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override |
virtual void SAL_CALL | removeExtension (OUString const &identifier, OUString const &filename, OUString const &repository, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override |
virtual void SAL_CALL | enableExtension (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 | disableExtension (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 sal_Int32 SAL_CALL | checkPrerequisitesAndEnable (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 css::uno::Sequence< css::uno::Reference< css::deployment::XPackage > > SAL_CALL | getDeployedExtensions (OUString const &repository, css::uno::Reference< css::task::XAbortChannel > const &, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override |
virtual css::uno::Reference< css::deployment::XPackage > SAL_CALL | getDeployedExtension (OUString const &repository, OUString const &identifier, OUString const &filename, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override |
virtual css::uno::Sequence< css::uno::Reference< css::deployment::XPackage > > SAL_CALL | getExtensionsWithSameIdentifier (OUString const &identifier, OUString const &filename, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override |
virtual css::uno::Sequence< css::uno::Sequence< css::uno::Reference< css::deployment::XPackage > > > SAL_CALL | getAllExtensions (css::uno::Reference< css::task::XAbortChannel > const &, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override |
virtual void SAL_CALL | reinstallDeployedExtensions (sal_Bool force, OUString const &repository, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) 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 (OUString const &repository, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) override |
virtual sal_Bool SAL_CALL | isReadOnlyRepository (OUString const &repository) override |
Private Member Functions | |
css::uno::Reference< css::deployment::XPackageManager > | getUserRepository () |
css::uno::Reference< css::deployment::XPackageManager > | getSharedRepository () |
css::uno::Reference< css::deployment::XPackageManager > | getBundledRepository () |
css::uno::Reference< css::deployment::XPackageManager > | getTmpRepository () |
css::uno::Reference< css::deployment::XPackageManager > | getBakRepository () |
bool | isUserDisabled (OUString const &identifier, OUString const &filename) |
void | activateExtension (OUString const &identifier, OUString const &fileName, bool bUserDisabled, bool bStartup, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) |
std::vector< css::uno::Reference< css::deployment::XPackage > > | getExtensionsWithSameId (OUString const &identifier, OUString const &fileName) |
css::uno::Reference< css::deployment::XPackage > | backupExtension (OUString const &identifier, OUString const &fileName, css::uno::Reference< css::deployment::XPackageManager > const &xPackageManager, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) |
void | checkInstall (OUString const &displayName, css::uno::Reference< css::ucb::XCommandEnvironment > const &cmdEnv) |
void | checkUpdate (OUString const &newVersion, OUString const &newDisplayName, css::uno::Reference< css::deployment::XPackage > const &oldExtension, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) |
void | addExtensionsToMap (id2extensions &mapExt, css::uno::Sequence< css::uno::Reference< css::deployment::XPackage > > const &seqExt, std::u16string_view repository) |
css::uno::Reference< css::deployment::XPackageManager > | getPackageManager (std::u16string_view repository) |
bool | doChecksForAddExtension (css::uno::Reference< css::deployment::XPackageManager > const &xPackageMgr, css::uno::Sequence< css::beans::NamedValue > const &properties, css::uno::Reference< css::deployment::XPackage > const &xTmpExtension, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv, css::uno::Reference< css::deployment::XPackage > &out_existingExtension) |
Static Private Member Functions | |
static OUString | StrSyncRepository () |
static bool | isUserDisabled (css::uno::Sequence< css::uno::Reference< css::deployment::XPackage > > const &seqExtSameId) |
static void | activateExtension (css::uno::Sequence< css::uno::Reference< css::deployment::XPackage > > const &seqExt, bool bUserDisabled, bool bStartup, css::uno::Reference< css::task::XAbortChannel > const &xAbortChannel, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv) |
Private Attributes | |
css::uno::Reference< css::uno::XComponentContext > | m_xContext |
css::uno::Reference< css::deployment::XPackageManagerFactory > | m_xPackageManagerFactory |
std::mutex | m_addMutex |
std::vector< OUString > | m_repositoryNames |
Private Attributes inherited from cppu::BaseMutex | |
mutable::osl::Mutex | m_aMutex |
Definition at line 41 of file dp_extensionmanager.hxx.
|
explicit |
Definition at line 160 of file dp_extensionmanager.cxx.
References m_aMutex, m_repositoryNames, m_xContext, and m_xPackageManagerFactory.
|
overridevirtual |
Definition at line 172 of file dp_extensionmanager.cxx.
|
staticprivate |
|
private |
|
overridevirtual |
Definition at line 611 of file dp_extensionmanager.cxx.
References activateExtension(), doChecksForAddExtension(), fireModified(), getBakRepository(), dp_misc::getIdentifier(), getSharedRepository(), getTmpRepository(), getUserRepository(), uno::Any::hasValue(), isUserDisabled(), m_addMutex, and cppu::BaseMutex::m_aMutex.
|
private |
Definition at line 247 of file dp_extensionmanager.cxx.
References dp_misc::getIdentifier(), index, and m_repositoryNames.
Referenced by getAllExtensions().
|
overridevirtual |
Definition at line 1386 of file dp_extensionmanager.cxx.
References check().
|
private |
Definition at line 479 of file dp_extensionmanager.cxx.
References getTmpRepository(), and identifier.
Referenced by removeExtension().
void dp_manager::ExtensionManager::check | ( | ) |
Definition at line 1401 of file dp_extensionmanager.cxx.
References cppu::BaseMutex::m_aMutex.
Referenced by addModifyListener(), and removeModifyListener().
|
private |
Definition at line 1308 of file dp_extensionmanager.cxx.
References DpResId(), and dp_misc::interactContinuation().
Referenced by doChecksForAddExtension().
|
overridevirtual |
Definition at line 974 of file dp_extensionmanager.cxx.
References activateExtension(), dp_misc::getIdentifier(), getPackageManager(), isUserDisabled(), and cppu::BaseMutex::m_aMutex.
|
private |
Definition at line 1337 of file dp_extensionmanager.cxx.
References DpResId(), and dp_misc::interactContinuation().
Referenced by doChecksForAddExtension().
|
overridevirtual |
Definition at line 214 of file dp_extensionmanager.cxx.
|
overridevirtual |
Definition at line 1018 of file dp_extensionmanager.cxx.
References activateExtension(), dp_misc::getIdentifier(), uno::Any::hasValue(), isUserDisabled(), and cppu::BaseMutex::m_aMutex.
|
private |
css::deployment::DeploymentException | |
css::ucb::CommandFailedException | |
css::ucb::CommandAbortedException | |
css::lang::IllegalArgumentException | |
css::uno::RuntimeException |
Definition at line 519 of file dp_extensionmanager.cxx.
References checkInstall(), checkUpdate(), dp_misc::getDescriptionInfoset(), dp_misc::getIdentifier(), dp_misc::DescriptionInfoset::getSimpleLicenseAttributes(), m_xContext, props, and sDisplayName.
Referenced by addExtension().
|
overridevirtual |
Definition at line 916 of file dp_extensionmanager.cxx.
References activateExtension(), dp_misc::getIdentifier(), uno::Any::hasValue(), isUserDisabled(), and cppu::BaseMutex::m_aMutex.
void dp_manager::ExtensionManager::fireModified | ( | ) |
Definition at line 1411 of file dp_extensionmanager.cxx.
References cppu::OInterfaceContainerHelper::forEach().
Referenced by addExtension(), and removeExtension().
|
overridevirtual |
Definition at line 1097 of file dp_extensionmanager.cxx.
References addExtensionsToMap(), comphelper::containerToSequence(), getBundledRepository(), getSharedRepository(), getTmpRepository(), getUserRepository(), and u.
Referenced by synchronize().
|
private |
Definition at line 209 of file dp_extensionmanager.cxx.
References m_xPackageManagerFactory.
Referenced by addExtension(), and getPackageManager().
|
private |
Definition at line 201 of file dp_extensionmanager.cxx.
References m_xPackageManagerFactory.
Referenced by getAllExtensions(), getExtensionsWithSameId(), getPackageManager(), and synchronize().
|
overridevirtual |
Definition at line 1086 of file dp_extensionmanager.cxx.
References getPackageManager(), and identifier.
|
overridevirtual |
Definition at line 1076 of file dp_extensionmanager.cxx.
References getPackageManager().
|
private |
Definition at line 292 of file dp_extensionmanager.cxx.
References getBundledRepository(), getSharedRepository(), getUserRepository(), i, and identifier.
Referenced by getExtensionsWithSameIdentifier(), and isUserDisabled().
|
overridevirtual |
Definition at line 318 of file dp_extensionmanager.cxx.
References comphelper::containerToSequence(), getExtensionsWithSameId(), and identifier.
|
overridevirtual |
Definition at line 1368 of file dp_extensionmanager.cxx.
References getPackageManager(), and cppu::BaseMutex::m_aMutex.
|
overridevirtual |
Definition at line 177 of file dp_extensionmanager.cxx.
|
private |
css::lang::IllegalArgumentException | |
css::uno::RuntimeException |
Definition at line 220 of file dp_extensionmanager.cxx.
References getBakRepository(), getBundledRepository(), getSharedRepository(), getTmpRepository(), getUserRepository(), and u.
Referenced by checkPrerequisitesAndEnable(), getDeployedExtension(), getDeployedExtensions(), getExtensionsWithUnacceptedLicenses(), isReadOnlyRepository(), and reinstallDeployedExtensions().
|
private |
Definition at line 197 of file dp_extensionmanager.cxx.
References m_xPackageManagerFactory.
Referenced by addExtension(), getAllExtensions(), getExtensionsWithSameId(), getPackageManager(), removeExtension(), and synchronize().
|
overridevirtual |
Definition at line 510 of file dp_extensionmanager.cxx.
References getUserRepository().
|
overridevirtual |
Definition at line 187 of file dp_extensionmanager.cxx.
|
private |
Definition at line 205 of file dp_extensionmanager.cxx.
References m_xPackageManagerFactory.
Referenced by addExtension(), backupExtension(), getAllExtensions(), getPackageManager(), and removeExtension().
|
private |
Definition at line 193 of file dp_extensionmanager.cxx.
References m_xPackageManagerFactory.
Referenced by addExtension(), getAllExtensions(), getExtensionsWithSameId(), getPackageManager(), getSupportedPackageTypes(), and removeExtension().
|
overridevirtual |
Definition at line 1378 of file dp_extensionmanager.cxx.
References getPackageManager().
|
staticprivate |
|
private |
Definition at line 360 of file dp_extensionmanager.cxx.
References getExtensionsWithSameId(), identifier, and isUserDisabled().
Referenced by addExtension(), checkPrerequisitesAndEnable(), disableExtension(), enableExtension(), isUserDisabled(), removeExtension(), and synchronize().
|
overridevirtual |
Definition at line 1157 of file dp_extensionmanager.cxx.
References activateExtension(), dp_misc::getIdentifier(), getPackageManager(), cppu::BaseMutex::m_aMutex, and dp_misc::syncRepositories().
|
overridevirtual |
Definition at line 821 of file dp_extensionmanager.cxx.
References activateExtension(), backupExtension(), fireModified(), dp_misc::getIdentifier(), getSharedRepository(), getTmpRepository(), getUserRepository(), uno::Any::hasValue(), identifier, isUserDisabled(), and cppu::BaseMutex::m_aMutex.
|
overridevirtual |
Definition at line 1394 of file dp_extensionmanager.cxx.
References check().
|
inlinestaticprivate |
Definition at line 143 of file dp_extensionmanager.hxx.
References DpResId().
Referenced by synchronize().
|
overridevirtual |
Definition at line 182 of file dp_extensionmanager.cxx.
References ServiceName, and cppu::supportsService().
|
overridevirtual |
Definition at line 1234 of file dp_extensionmanager.cxx.
References activateExtension(), getAllExtensions(), getBundledRepository(), getSharedRepository(), isUserDisabled(), cppu::BaseMutex::m_aMutex, m_xContext, StrSyncRepository(), and dp_misc::ProgressLevel::update().
|
private |
Definition at line 149 of file dp_extensionmanager.hxx.
Referenced by addExtension().
|
private |
Definition at line 154 of file dp_extensionmanager.hxx.
Referenced by addExtensionsToMap(), and ExtensionManager().
|
private |
Definition at line 145 of file dp_extensionmanager.hxx.
Referenced by doChecksForAddExtension(), ExtensionManager(), and synchronize().
|
private |
Definition at line 146 of file dp_extensionmanager.hxx.
Referenced by ExtensionManager(), getBakRepository(), getBundledRepository(), getSharedRepository(), getTmpRepository(), and getUserRepository().