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 #pragma once
21 
22 #include <sal/config.h>
23 
24 #include <com/sun/star/uno/Reference.hxx>
25 #include <rtl/ref.hxx>
26 
27 #include <vector>
28 
29 #include "dp_gui_updatedata.hxx"
30 
32 
33 namespace com::sun::star {
34  namespace task { class XInteractionRequest; }
35  namespace uno { class XComponentContext; }
36 }
37 
38 namespace dp_gui {
39 
40 class DialogHelper;
41 class TheExtensionManager;
42 
58 
59 public:
63  ExtensionCmdQueue( DialogHelper * pDialogHelper,
64  TheExtensionManager *pManager,
65  const css::uno::Reference< css::uno::XComponentContext > & rContext);
66 
68 
69  void addExtension( const OUString &rExtensionURL,
70  const OUString &rRepository,
71  const bool bWarnUser );
72  void removeExtension( const css::uno::Reference< css::deployment::XPackage > &rPackage );
73  void enableExtension( const css::uno::Reference< css::deployment::XPackage > &rPackage,
74  const bool bEnable );
75  void checkForUpdates( std::vector< css::uno::Reference< css::deployment::XPackage > > && vList );
76  void acceptLicense( const css::uno::Reference< css::deployment::XPackage > &rPackage );
77  static void syncRepositories( const css::uno::Reference< css::uno::XComponentContext > & xContext );
82  void stop();
83 
84  bool isBusy();
85 private:
86  ExtensionCmdQueue(ExtensionCmdQueue const &) = delete;
88 
89  class Thread;
90 
92 };
93 
94 void handleInteractionRequest( const css::uno::Reference< css::uno::XComponentContext > & xContext,
95  const css::uno::Reference< css::task::XInteractionRequest > & xRequest );
96 
97 }
98 
99 /* 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(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:2310
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:22
Manages installing of extensions in the GUI mode.