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