VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateDefs.h@ 43138

Last change on this file since 43138 was 41143, checked in by vboxsync, 13 years ago

FE/Qt: Network/Update Managers stuff: Defines: Cleanup.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1/** @file
2 *
3 * VBox frontends: Qt4 GUI ("VirtualBox"):
4 * Update routine related declarations
5 */
6
7/*
8 * Copyright (C) 2006-2012 Oracle Corporation
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 */
18
19#ifndef ___UIUpdateDefs_h___
20#define ___UIUpdateDefs_h___
21
22/* Global includes: */
23#include <QDate>
24
25/* Local includes: */
26#include "VBoxVersion.h"
27
28/* This structure is used to store retranslated reminder values. */
29struct VBoxUpdateDay
30{
31 VBoxUpdateDay(const QString &strVal, const QString &strKey)
32 : val(strVal), key(strKey) {}
33
34 bool operator==(const VBoxUpdateDay &other) { return val == other.val || key == other.key; }
35
36 QString val;
37 QString key;
38};
39typedef QList<VBoxUpdateDay> VBoxUpdateDayList;
40
41/* This class is used to encode/decode update data. */
42class VBoxUpdateData
43{
44public:
45
46 /* Period types: */
47 enum PeriodType
48 {
49 PeriodNever = -2,
50 PeriodUndefined = -1,
51 Period1Day = 0,
52 Period2Days = 1,
53 Period3Days = 2,
54 Period4Days = 3,
55 Period5Days = 4,
56 Period6Days = 5,
57 Period1Week = 6,
58 Period2Weeks = 7,
59 Period3Weeks = 8,
60 Period1Month = 9
61 };
62
63 /* Branch types: */
64 enum BranchType
65 {
66 BranchStable = 0,
67 BranchAllRelease = 1,
68 BranchWithBetas = 2
69 };
70
71 /* Public static helpers: */
72 static void populate();
73 static QStringList list();
74
75 /* Constructors: */
76 VBoxUpdateData(const QString &strData);
77 VBoxUpdateData(PeriodType periodIndex, BranchType branchIndex);
78
79 /* Public helpers: */
80 bool isNoNeedToCheck() const;
81 bool isNeedToCheck() const;
82 QString data() const;
83 PeriodType periodIndex() const;
84 QString date() const;
85 BranchType branchIndex() const;
86 QString branchName() const;
87 VBoxVersion version() const;
88
89private:
90
91 /* Private helpers: */
92 void decode();
93 void encode();
94
95 /* Private variables: */
96 static VBoxUpdateDayList m_dayList;
97 QString m_strData;
98 PeriodType m_periodIndex;
99 QDate m_date;
100 BranchType m_branchIndex;
101 VBoxVersion m_version;
102};
103
104#endif // !___UIUpdateDefs_h___
105
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette