LibreOffice Module desktop (master)  1
dp_gui_updatedata.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 #pragma once
20 
21 #include <sal/config.h>
22 #include <rtl/ustring.hxx>
23 #include <com/sun/star/uno/Reference.hxx>
24 
26  class XPackage;
27 }
28 namespace com::sun::star::xml::dom {
29  class XNode;
30 }
31 
32 
33 namespace dp_gui {
34 
35 struct UpdateData
36 {
37  explicit UpdateData( css::uno::Reference< css::deployment::XPackage > const & aExt):
38  bIsShared(false), aInstalledPackage(aExt) {};
39 
40  //When entries added to the listbox then there can be one for the user update and one
41  //for the shared update. However, both list entries will contain the same UpdateData.
42  //isShared is used to indicate which one is used for the shared entry.
43  bool bIsShared;
44 
45  //The currently installed extension which is going to be updated. If the extension exist in
46  //multiple repositories then it is the one with the highest version.
47  css::uno::Reference< css::deployment::XPackage > aInstalledPackage;
48 
49  //The version of the update
50  OUString updateVersion;
51 
52  //For online update
53 
54  // The content of the update information.
55  //Only if aUpdateInfo is set then there is an online update available with a better version
56  //than any of the currently installed extensions with the same identifier.
57  css::uno::Reference< css::xml::dom::XNode > aUpdateInfo;
58  //The URL of the locally downloaded extension. It will only be set if there were no errors
59  //during the download
60  OUString sLocalURL;
61  //The URL of the website where the download can be obtained.
62  OUString sWebsiteURL;
63 
64  //For local update
65 
66  //The locale extension which is used as update for the user or shared repository.
67  //If set then the data for the online update (aUpdateInfo, sLocalURL, sWebsiteURL)
68  //are to be ignored.
69  css::uno::Reference< css::deployment::XPackage > aUpdateSource;
70 };
71 }
72 
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::deployment::XPackage > aInstalledPackage
css::uno::Reference< css::xml::dom::XNode > aUpdateInfo
UpdateData(css::uno::Reference< css::deployment::XPackage > const &aExt)
Definition: dp_gui.h:22
css::uno::Reference< css::deployment::XPackage > aUpdateSource