1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #if ! defined INCLUDED_DP_GUI_UPDATEDATA_HXX 28 #define INCLUDED_DP_GUI_UPDATEDATA_HXX 29 30 #include "sal/config.h" 31 #include "tools/solar.h" 32 #include "rtl/ustring.hxx" 33 #include "com/sun/star/uno/Reference.hxx" 34 35 #include <boost/shared_ptr.hpp> 36 37 38 namespace com { namespace sun { namespace star { namespace deployment { 39 class XPackage; 40 }}}} 41 namespace com { namespace sun { namespace star { namespace xml { namespace dom { 42 class XNode; 43 }}}}} 44 45 46 namespace dp_gui { 47 48 struct UpdateData 49 { 50 UpdateData( ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > const & aExt): 51 bIsShared(false), aInstalledPackage(aExt){}; 52 53 //When entries added to the listbox then there can be one for the user update and one 54 //for the shared update. However, both list entries will contain the same UpdateData. 55 //isShared is used to indicate which one is used for the shared entry. 56 bool bIsShared; 57 58 //The currently installed extension which is going to be updated. If the extension exist in 59 //multiple repositories then it is the one with the highest version. 60 ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > aInstalledPackage; 61 62 //The version of the update 63 ::rtl::OUString updateVersion; 64 65 //For online update 66 // ====================== 67 // The content of the update information. 68 //Only if aUpdateInfo is set then there is an online update available with a better version 69 //than any of the currently installed extensions with the same identifier. 70 ::com::sun::star::uno::Reference< ::com::sun::star::xml::dom::XNode > aUpdateInfo; 71 //The URL of the locally downloaded extension. It will only be set if there were no errors 72 //during the download 73 ::rtl::OUString sLocalURL; 74 //The URL of the website wher the download can be obtained. 75 ::rtl::OUString sWebsiteURL; 76 77 //For local update 78 //===================== 79 //The locale extension which is used as update for the user or shared repository. 80 //If set then the data for the online update (aUpdateInfo, sLocalURL, sWebsiteURL) 81 //are to be ignored. 82 ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > 83 aUpdateSource; 84 85 // ID to find this entry in the update listbox 86 sal_uInt16 m_nID; 87 bool m_bIgnored; 88 }; 89 } 90 91 #endif 92