1*0a1e2f0eSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*0a1e2f0eSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*0a1e2f0eSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*0a1e2f0eSAndrew Rist  * distributed with this work for additional information
6*0a1e2f0eSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*0a1e2f0eSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*0a1e2f0eSAndrew Rist  * "License"); you may not use this file except in compliance
9*0a1e2f0eSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*0a1e2f0eSAndrew Rist  *
11*0a1e2f0eSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*0a1e2f0eSAndrew Rist  *
13*0a1e2f0eSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*0a1e2f0eSAndrew Rist  * software distributed under the License is distributed on an
15*0a1e2f0eSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*0a1e2f0eSAndrew Rist  * KIND, either express or implied.  See the License for the
17*0a1e2f0eSAndrew Rist  * specific language governing permissions and limitations
18*0a1e2f0eSAndrew Rist  * under the License.
19*0a1e2f0eSAndrew Rist  *
20*0a1e2f0eSAndrew Rist  *************************************************************/
21*0a1e2f0eSAndrew Rist 
22*0a1e2f0eSAndrew Rist 
23cdf0e10cSrcweir #if ! defined INCLUDED_DP_GUI_UPDATEDATA_HXX
24cdf0e10cSrcweir #define INCLUDED_DP_GUI_UPDATEDATA_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include "sal/config.h"
27cdf0e10cSrcweir #include "tools/solar.h"
28cdf0e10cSrcweir #include "rtl/ustring.hxx"
29cdf0e10cSrcweir #include "com/sun/star/uno/Reference.hxx"
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #include <boost/shared_ptr.hpp>
32cdf0e10cSrcweir 
33cdf0e10cSrcweir 
34cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace deployment {
35cdf0e10cSrcweir         class XPackage;
36cdf0e10cSrcweir }}}}
37cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace xml { namespace dom {
38cdf0e10cSrcweir         class XNode;
39cdf0e10cSrcweir }}}}}
40cdf0e10cSrcweir 
41cdf0e10cSrcweir 
42cdf0e10cSrcweir namespace dp_gui {
43cdf0e10cSrcweir 
44cdf0e10cSrcweir struct UpdateData
45cdf0e10cSrcweir {
UpdateDatadp_gui::UpdateData46cdf0e10cSrcweir     UpdateData( ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > const & aExt):
47cdf0e10cSrcweir         bIsShared(false), aInstalledPackage(aExt){};
48cdf0e10cSrcweir 
49cdf0e10cSrcweir     //When entries added to the listbox then there can be one for the user update and one
50cdf0e10cSrcweir     //for the shared update. However, both list entries will contain the same UpdateData.
51cdf0e10cSrcweir     //isShared is used to indicate which one is used for the shared entry.
52cdf0e10cSrcweir     bool bIsShared;
53cdf0e10cSrcweir 
54cdf0e10cSrcweir     //The currently installed extension which is going to be updated. If the extension exist in
55cdf0e10cSrcweir     //multiple repositories then it is the one with the highest version.
56cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > aInstalledPackage;
57cdf0e10cSrcweir 
58cdf0e10cSrcweir     //The version of the update
59cdf0e10cSrcweir     ::rtl::OUString updateVersion;
60cdf0e10cSrcweir 
61cdf0e10cSrcweir     //For online update
62cdf0e10cSrcweir     // ======================
63cdf0e10cSrcweir     // The content of the update information.
64cdf0e10cSrcweir     //Only if aUpdateInfo is set then there is an online update available with a better version
65cdf0e10cSrcweir     //than any of the currently installed extensions with the same identifier.
66cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::xml::dom::XNode > aUpdateInfo;
67cdf0e10cSrcweir     //The URL of the locally downloaded extension. It will only be set if there were no errors
68cdf0e10cSrcweir     //during the download
69cdf0e10cSrcweir     ::rtl::OUString sLocalURL;
70cdf0e10cSrcweir     //The URL of the website wher the download can be obtained.
71cdf0e10cSrcweir     ::rtl::OUString sWebsiteURL;
72cdf0e10cSrcweir 
73cdf0e10cSrcweir     //For local update
74cdf0e10cSrcweir     //=====================
75cdf0e10cSrcweir     //The locale extension which is used as update for the user or shared repository.
76cdf0e10cSrcweir     //If set then the data for the online update (aUpdateInfo, sLocalURL, sWebsiteURL)
77cdf0e10cSrcweir     //are to be ignored.
78cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage >
79cdf0e10cSrcweir     aUpdateSource;
80cdf0e10cSrcweir 
81cdf0e10cSrcweir     // ID to find this entry in the update listbox
82cdf0e10cSrcweir     sal_uInt16  m_nID;
83cdf0e10cSrcweir     bool    m_bIgnored;
84cdf0e10cSrcweir };
85cdf0e10cSrcweir }
86cdf0e10cSrcweir 
87cdf0e10cSrcweir #endif
88