1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: updateinfo.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _UPDATE_INFO_INCLUDED_
32 #define _UPDATE_INFO_INCLUDED_
34 #include <rtl/ustring.hxx>
42 DownloadSource(bool bIsDirect
, const rtl::OUString
& aURL
) : IsDirect(bIsDirect
), URL(aURL
) {};
43 DownloadSource(const DownloadSource
& ds
) : IsDirect(ds
.IsDirect
), URL(ds
.URL
) {};
45 DownloadSource
& operator=( const DownloadSource
& ds
) { IsDirect
= ds
.IsDirect
; URL
= ds
.URL
; return *this; };
55 ReleaseNote(sal_uInt8 pos
, const rtl::OUString aURL
) : Pos(pos
), URL(aURL
), Pos2(0), URL2() {};
56 ReleaseNote(sal_uInt8 pos
, const rtl::OUString aURL
, sal_uInt8 pos2
, const rtl::OUString aURL2
) : Pos(pos
), URL(aURL
), Pos2(pos2
), URL2(aURL2
) {};
58 ReleaseNote(const ReleaseNote
& rn
) :Pos(rn
.Pos
), URL(rn
.URL
), Pos2(rn
.Pos2
), URL2(rn
.URL2
) {};
59 ReleaseNote
& operator=( const ReleaseNote
& rn
) { Pos
=rn
.Pos
; URL
=rn
.URL
; Pos2
=rn
.Pos2
; URL2
=rn
.URL2
; return *this; };
64 rtl::OUString BuildId
;
65 rtl::OUString Version
;
66 rtl::OUString Description
;
67 std::vector
< DownloadSource
> Sources
;
68 std::vector
< ReleaseNote
> ReleaseNotes
;
70 UpdateInfo() : BuildId(), Version(), Description(), Sources(), ReleaseNotes() {};
71 UpdateInfo(const UpdateInfo
& ui
) : BuildId(ui
.BuildId
), Version(ui
.Version
), Description(ui
.Description
), Sources(ui
.Sources
), ReleaseNotes(ui
.ReleaseNotes
) {};
72 inline UpdateInfo
& operator=( const UpdateInfo
& ui
);
75 UpdateInfo
& UpdateInfo::operator=( const UpdateInfo
& ui
)
79 Description
= ui
.Description
;
81 ReleaseNotes
= ui
.ReleaseNotes
;
86 // Returns the URL of the release note for the given position
87 rtl::OUString
getReleaseNote(const UpdateInfo
& rInfo
, sal_uInt8 pos
, bool autoDownloadEnabled
=false);