LibreOffice Module desktop (master)  1
dp_gui_extensioncmdqueue.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_EXTENSIONCMDQUEUE_HXX
21 #define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_EXTENSIONCMDQUEUE_HXX
22 
23 #include <sal/config.h>
24 
25 #include <com/sun/star/uno/Reference.hxx>
26 #include <rtl/ref.hxx>
27 
28 #include <vector>
29 
30 #include "dp_gui_updatedata.hxx"
31 
33 
34 namespace com { namespace sun { namespace star {
35  namespace task { class XInteractionRequest; }
36  namespace uno { class XComponentContext; }
37 } } }
38 
39 namespace dp_gui {
40 
41 class DialogHelper;
42 class TheExtensionManager;
43 
59 
60 public:
64  ExtensionCmdQueue( DialogHelper * pDialogHelper,
65  TheExtensionManager *pManager,
66  const css::uno::Reference< css::uno::XComponentContext > & rContext);
67 
69 
70  void addExtension( const OUString &rExtensionURL,
71  const OUString &rRepository,
72  const bool bWarnUser );
73  void removeExtension( const css::uno::Reference< css::deployment::XPackage > &rPackage );
74  void enableExtension( const css::uno::Reference< css::deployment::XPackage > &rPackage,
75  const bool bEnable );
76  void checkForUpdates(const std::vector< css::uno::Reference<
77  css::deployment::XPackage > > &vList );
78  void acceptLicense( const css::uno::Reference< css::deployment::XPackage > &rPackage );
79  static void syncRepositories( const css::uno::Reference< css::uno::XComponentContext > & xContext );
84  void stop();
85 
86  bool isBusy();
87 private:
88  ExtensionCmdQueue(ExtensionCmdQueue const &) = delete;
90 
91  class Thread;
92 
94 };
95 
96 void handleInteractionRequest( const css::uno::Reference< css::uno::XComponentContext > & xContext,
97  const css::uno::Reference< css::task::XInteractionRequest > & xRequest );
98 
99 }
100 
101 #endif
102 
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void removeExtension(const css::uno::Reference< css::deployment::XPackage > &rPackage)
void addExtension(const OUString &rExtensionURL, const OUString &rRepository, const bool bWarnUser)
void checkForUpdates(const std::vector< css::uno::Reference< css::deployment::XPackage > > &vList)
rtl::Reference< Thread > m_thread
static void syncRepositories(const css::uno::Reference< css::uno::XComponentContext > &xContext)
static uno::Reference< css::uno::XComponentContext > xContext
Definition: init.cxx:1858
void handleInteractionRequest(const uno::Reference< uno::XComponentContext > &xContext, const uno::Reference< task::XInteractionRequest > &xRequest)
ExtensionCmdQueue(DialogHelper *pDialogHelper, TheExtensionManager *pManager, const css::uno::Reference< css::uno::XComponentContext > &rContext)
Create an instance.
void stop()
This call does not block.
void acceptLicense(const css::uno::Reference< css::deployment::XPackage > &rPackage)
void enableExtension(const css::uno::Reference< css::deployment::XPackage > &rPackage, const bool bEnable)
ExtensionCmdQueue & operator=(ExtensionCmdQueue const &)=delete
Definition: dp_gui.h:50
Manages installing of extensions in the GUI mode.