summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2007-07-06 13:38:45 +0000
committerRüdiger Timm <rt@openoffice.org>2007-07-06 13:38:45 +0000
commit25e0c0c74a75db50131265fdbf56e770952a0d06 (patch)
treed3343364011f49f94a1fea219b536ce319b49938
parentf588f9d71d3c92aeea77d9b5470f4dd9176e9973 (diff)
INTEGRATION: CWS updchk06 (1.1.2); FILE ADDED
2007/06/29 10:39:57 obr 1.1.2.5: #i72386# finalized release note support 2007/06/28 23:42:03 obr 1.1.2.4: #i72386# reworked locking code and added support for description 2007/06/27 12:40:15 obr 1.1.2.3: #i72386# added initial support for release notes 2007/06/26 08:22:45 obr 1.1.2.2: #i72386# fixed proxy issue with curl 2007/06/25 05:48:20 obr 1.1.2.1: #i72386# DownloadThread added
-rw-r--r--extensions/source/update/check/updateinfo.hxx94
1 files changed, 94 insertions, 0 deletions
diff --git a/extensions/source/update/check/updateinfo.hxx b/extensions/source/update/check/updateinfo.hxx
new file mode 100644
index 000000000000..b68cd23fe81d
--- /dev/null
+++ b/extensions/source/update/check/updateinfo.hxx
@@ -0,0 +1,94 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: updateinfo.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-06 14:38:45 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef _UPDATE_INFO_INCLUDED_
+#define _UPDATE_INFO_INCLUDED_
+
+#include <rtl/ustring.hxx>
+#include <vector>
+
+struct DownloadSource
+{
+ bool IsDirect;
+ rtl::OUString URL;
+
+ DownloadSource(bool bIsDirect, const rtl::OUString& aURL) : IsDirect(bIsDirect), URL(aURL) {};
+ DownloadSource(const DownloadSource& ds) : IsDirect(ds.IsDirect), URL(ds.URL) {};
+
+ DownloadSource & operator=( const DownloadSource & ds ) { IsDirect = ds.IsDirect; URL = ds.URL; return *this; };
+};
+
+struct ReleaseNote
+{
+ sal_uInt8 Pos;
+ rtl::OUString URL;
+ sal_uInt8 Pos2;
+ rtl::OUString URL2;
+
+ ReleaseNote(sal_uInt8 pos, const rtl::OUString aURL) : Pos(pos), URL(aURL), Pos2(0), URL2() {};
+ ReleaseNote(sal_uInt8 pos, const rtl::OUString aURL, sal_uInt8 pos2, const rtl::OUString aURL2) : Pos(pos), URL(aURL), Pos2(pos2), URL2(aURL2) {};
+
+ ReleaseNote(const ReleaseNote& rn) :Pos(rn.Pos), URL(rn.URL), Pos2(rn.Pos2), URL2(rn.URL2) {};
+ ReleaseNote & operator=( const ReleaseNote& rn) { Pos=rn.Pos; URL=rn.URL; Pos2=rn.Pos2; URL2=rn.URL2; return *this; };
+};
+
+struct UpdateInfo
+{
+ rtl::OUString BuildId;
+ rtl::OUString Version;
+ rtl::OUString Description;
+ std::vector< DownloadSource > Sources;
+ std::vector< ReleaseNote > ReleaseNotes;
+
+ UpdateInfo() : BuildId(), Version(), Description(), Sources(), ReleaseNotes() {};
+ UpdateInfo(const UpdateInfo& ui) : BuildId(ui.BuildId), Version(ui.Version), Description(ui.Description), Sources(ui.Sources), ReleaseNotes(ui.ReleaseNotes) {};
+ inline UpdateInfo & operator=( const UpdateInfo& ui );
+};
+
+UpdateInfo & UpdateInfo::operator=( const UpdateInfo& ui )
+{
+ BuildId = ui.BuildId;
+ Version = ui.Version;
+ Description = ui.Description;
+ Sources = ui.Sources;
+ ReleaseNotes = ui.ReleaseNotes;
+ return *this;
+}
+
+
+// Returns the URL of the release note for the given position
+rtl::OUString getReleaseNote(const UpdateInfo& rInfo, sal_uInt8 pos, bool autoDownloadEnabled=false);
+
+#endif