1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #ifndef _UPDATE_INFO_INCLUDED_
29 #define _UPDATE_INFO_INCLUDED_
31 #include <rtl/ustring.hxx>
39 DownloadSource(bool bIsDirect
, const rtl::OUString
& aURL
) : IsDirect(bIsDirect
), URL(aURL
) {};
40 DownloadSource(const DownloadSource
& ds
) : IsDirect(ds
.IsDirect
), URL(ds
.URL
) {};
42 DownloadSource
& operator=( const DownloadSource
& ds
) { IsDirect
= ds
.IsDirect
; URL
= ds
.URL
; return *this; };
52 ReleaseNote(sal_uInt8 pos
, const rtl::OUString aURL
) : Pos(pos
), URL(aURL
), Pos2(0), URL2() {};
53 ReleaseNote(sal_uInt8 pos
, const rtl::OUString aURL
, sal_uInt8 pos2
, const rtl::OUString aURL2
) : Pos(pos
), URL(aURL
), Pos2(pos2
), URL2(aURL2
) {};
55 ReleaseNote(const ReleaseNote
& rn
) :Pos(rn
.Pos
), URL(rn
.URL
), Pos2(rn
.Pos2
), URL2(rn
.URL2
) {};
56 ReleaseNote
& operator=( const ReleaseNote
& rn
) { Pos
=rn
.Pos
; URL
=rn
.URL
; Pos2
=rn
.Pos2
; URL2
=rn
.URL2
; return *this; };
61 rtl::OUString BuildId
;
62 rtl::OUString Version
;
63 rtl::OUString Description
;
64 std::vector
< DownloadSource
> Sources
;
65 std::vector
< ReleaseNote
> ReleaseNotes
;
67 UpdateInfo() : BuildId(), Version(), Description(), Sources(), ReleaseNotes() {};
68 UpdateInfo(const UpdateInfo
& ui
) : BuildId(ui
.BuildId
), Version(ui
.Version
), Description(ui
.Description
), Sources(ui
.Sources
), ReleaseNotes(ui
.ReleaseNotes
) {};
69 inline UpdateInfo
& operator=( const UpdateInfo
& ui
);
72 UpdateInfo
& UpdateInfo::operator=( const UpdateInfo
& ui
)
76 Description
= ui
.Description
;
78 ReleaseNotes
= ui
.ReleaseNotes
;
83 // Returns the URL of the release note for the given position
84 rtl::OUString
getReleaseNote(const UpdateInfo
& rInfo
, sal_uInt8 pos
, bool autoDownloadEnabled
=false);