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

Constructor & Destructor Documentation

◆ ExtensionCmdQueue() [1/2]

dp_gui::ExtensionCmdQueue::ExtensionCmdQueue ( DialogHelper pDialogHelper,
TheExtensionManager pManager,
const css::uno::Reference< css::uno::XComponentContext > &  rContext 
)

Create an instance.

◆ ~ExtensionCmdQueue()

dp_gui::ExtensionCmdQueue::~ExtensionCmdQueue ( )

Definition at line 1063 of file dp_gui_extensioncmdqueue.cxx.

References m_thread.

◆ ExtensionCmdQueue() [2/2]

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

Member Function Documentation

◆ acceptLicense()

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().

◆ addExtension()

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.

◆ checkForUpdates()

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().

◆ enableExtension()

void dp_gui::ExtensionCmdQueue::enableExtension ( const css::uno::Reference< css::deployment::XPackage > &  rPackage,
const bool  bEnable 
)

◆ isBusy()

bool dp_gui::ExtensionCmdQueue::isBusy ( )

Definition at line 1101 of file dp_gui_extensioncmdqueue.cxx.

References m_thread.

◆ operator=()

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

◆ removeExtension()

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().

◆ syncRepositories()

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

Definition at line 1096 of file dp_gui_extensioncmdqueue.cxx.

References dp_misc::syncRepositories(), and xContext.

Member Data Documentation

◆ m_thread

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

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