LibreOffice Module desktop (master)  1
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
dp_gui::ExtensionCmdQueue Class Reference

Manages installing of extensions in the GUI mode. More...

#include <dp_gui_extensioncmdqueue.hxx>

Collaboration diagram for dp_gui::ExtensionCmdQueue:
[legend]

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 (const std::vector< css::uno::Reference< css::deployment::XPackage > > &vList)
 
void acceptLicense (const css::uno::Reference< css::deployment::XPackage > &rPackage)
 
void stop ()
 This call does not block. More...
 
bool isBusy ()
 

Static Public Member Functions

static void syncRepositories (const css::uno::Reference< css::uno::XComponentContext > &xContext)
 

Private Member Functions

 ExtensionCmdQueue (ExtensionCmdQueue const &)=delete
 
ExtensionCmdQueueoperator= (ExtensionCmdQueue const &)=delete
 

Private Attributes

rtl::Reference< Threadm_thread
 

Detailed Description

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 58 of file dp_gui_extensioncmdqueue.hxx.

Constructor & Destructor Documentation

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 1035 of file dp_gui_extensioncmdqueue.cxx.

References stop().

dp_gui::ExtensionCmdQueue::ExtensionCmdQueue ( ExtensionCmdQueue const &  )
privatedelete

Member Function Documentation

void dp_gui::ExtensionCmdQueue::acceptLicense ( const css::uno::Reference< css::deployment::XPackage > &  rPackage)

Definition at line 1062 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 1039 of file dp_gui_extensioncmdqueue.cxx.

References m_thread.

void dp_gui::ExtensionCmdQueue::checkForUpdates ( const std::vector< css::uno::Reference< css::deployment::XPackage > > &  vList)

Definition at line 1057 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 
)
bool dp_gui::ExtensionCmdQueue::isBusy ( )

Definition at line 1077 of file dp_gui_extensioncmdqueue.cxx.

References m_thread.

ExtensionCmdQueue& dp_gui::ExtensionCmdQueue::operator= ( ExtensionCmdQueue const &  )
privatedelete
void dp_gui::ExtensionCmdQueue::removeExtension ( const css::uno::Reference< css::deployment::XPackage > &  rPackage)

Definition at line 1046 of file dp_gui_extensioncmdqueue.cxx.

References m_thread.

Referenced by dp_gui::ExtMgrDialog::removePackage().

void dp_gui::ExtensionCmdQueue::stop ( )

This call does not block.

It signals the internal thread that it should install the remaining extensions and then terminate.

Definition at line 1072 of file dp_gui_extensioncmdqueue.cxx.

References m_thread.

Referenced by ~ExtensionCmdQueue().

void dp_gui::ExtensionCmdQueue::syncRepositories ( const css::uno::Reference< css::uno::XComponentContext > &  xContext)
static

Member Data Documentation

rtl::Reference< Thread > dp_gui::ExtensionCmdQueue::m_thread
private

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