LibreOffice Module desktop (master) 1
|
Manages installing of extensions in the GUI mode. More...
#include <dp_gui_extensioncmdqueue.hxx>
Classes | |
class | Thread |
Public Member Functions | |
ExtensionCmdQueue (DialogHelper *pDialogHelper, TheExtensionManager *pManager, const css::uno::Reference< css::uno::XComponentContext > &rContext) | |
Create an instance. More... | |
~ExtensionCmdQueue () | |
void | addExtension (const OUString &rExtensionURL, const OUString &rRepository, const bool bWarnUser) |
void | removeExtension (const css::uno::Reference< css::deployment::XPackage > &rPackage) |
void | enableExtension (const css::uno::Reference< css::deployment::XPackage > &rPackage, const bool bEnable) |
void | checkForUpdates (std::vector< css::uno::Reference< css::deployment::XPackage > > &&vList) |
void | acceptLicense (const css::uno::Reference< css::deployment::XPackage > &rPackage) |
bool | isBusy () |
Static Public Member Functions | |
static void | syncRepositories (const css::uno::Reference< css::uno::XComponentContext > &xContext) |
Private Member Functions | |
ExtensionCmdQueue (ExtensionCmdQueue const &)=delete | |
ExtensionCmdQueue & | operator= (ExtensionCmdQueue const &)=delete |
Private Attributes | |
rtl::Reference< Thread > | m_thread |
Manages installing of extensions in the GUI mode.
Requests for installing Extensions can be asynchronous. For example, the Extension Manager is running in an office process and someone uses the system integration to install an Extension. That is, the user double clicks an extension symbol in a file browser, which then causes an invocation of "unopkg gui ext". When at that time the Extension Manager already performs a task, triggered by the user (for example, add, update, disable, enable) then adding of the extension will be postponed until the user has finished the task.
This class also ensures that the extensions are not installed in the main thread. Doing so would cause a deadlock because of the progress bar which needs to be constantly updated.
Definition at line 57 of file dp_gui_extensioncmdqueue.hxx.
dp_gui::ExtensionCmdQueue::ExtensionCmdQueue | ( | DialogHelper * | pDialogHelper, |
TheExtensionManager * | pManager, | ||
const css::uno::Reference< css::uno::XComponentContext > & | rContext | ||
) |
Create an instance.
dp_gui::ExtensionCmdQueue::~ExtensionCmdQueue | ( | ) |
Definition at line 1063 of file dp_gui_extensioncmdqueue.cxx.
References m_thread.
|
privatedelete |
void dp_gui::ExtensionCmdQueue::acceptLicense | ( | const css::uno::Reference< css::deployment::XPackage > & | rPackage | ) |
Definition at line 1091 of file dp_gui_extensioncmdqueue.cxx.
References m_thread.
Referenced by dp_gui::ExtMgrDialog::acceptLicense().
void dp_gui::ExtensionCmdQueue::addExtension | ( | const OUString & | rExtensionURL, |
const OUString & | rRepository, | ||
const bool | bWarnUser | ||
) |
Definition at line 1068 of file dp_gui_extensioncmdqueue.cxx.
References m_thread.
void dp_gui::ExtensionCmdQueue::checkForUpdates | ( | std::vector< css::uno::Reference< css::deployment::XPackage > > && | vList | ) |
Definition at line 1086 of file dp_gui_extensioncmdqueue.cxx.
References m_thread.
Referenced by dp_gui::ExtMgrDialog::updatePackage().
void dp_gui::ExtensionCmdQueue::enableExtension | ( | const css::uno::Reference< css::deployment::XPackage > & | rPackage, |
const bool | bEnable | ||
) |
Definition at line 1080 of file dp_gui_extensioncmdqueue.cxx.
References m_thread.
Referenced by dp_gui::UpdateRequiredDialog::disableAllEntries(), and dp_gui::ExtMgrDialog::enablePackage().
bool dp_gui::ExtensionCmdQueue::isBusy | ( | ) |
Definition at line 1101 of file dp_gui_extensioncmdqueue.cxx.
References m_thread.
|
privatedelete |
void dp_gui::ExtensionCmdQueue::removeExtension | ( | const css::uno::Reference< css::deployment::XPackage > & | rPackage | ) |
Definition at line 1075 of file dp_gui_extensioncmdqueue.cxx.
References m_thread.
Referenced by dp_gui::ExtMgrDialog::removePackage().
|
static |
Definition at line 1096 of file dp_gui_extensioncmdqueue.cxx.
References dp_misc::syncRepositories(), and xContext.
|
private |
Definition at line 86 of file dp_gui_extensioncmdqueue.hxx.
Referenced by acceptLicense(), addExtension(), checkForUpdates(), enableExtension(), isBusy(), removeExtension(), and ~ExtensionCmdQueue().