Changeset 39326 in vbox for trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkDefs.h
- Timestamp:
- Nov 16, 2011 10:44:17 AM (13 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkDefs.h
r39291 r39326 2 2 * 3 3 * VBox frontends: Qt4 GUI ("VirtualBox"): 4 * Updateroutine related declarations4 * Network routine related declarations 5 5 */ 6 6 7 7 /* 8 * Copyright (C) 20 06-2011 Oracle Corporation8 * Copyright (C) 2011 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 17 17 */ 18 18 19 #ifndef __UI UpdateDefs_h__20 #define __UI UpdateDefs_h__19 #ifndef __UINetworkDefs_h__ 20 #define __UINetworkDefs_h__ 21 21 22 /* Global includes: */ 23 #include <QDate> 24 25 /* This structure is used to store retranslated reminder values. */ 26 struct VBoxUpdateDay 22 /* Download types: */ 23 enum UIDownloadType 27 24 { 28 VBoxUpdateDay(const QString &strVal, const QString &strKey) 29 : val(strVal), key(strKey) {} 30 31 bool operator==(const VBoxUpdateDay &other) { return val == other.val || key == other.key; } 32 33 QString val; 34 QString key; 35 }; 36 typedef QList<VBoxUpdateDay> VBoxUpdateDayList; 37 38 /* This class is used to encode/decode update data. */ 39 class VBoxUpdateData 40 { 41 public: 42 43 /* Period types: */ 44 enum PeriodType 45 { 46 PeriodNever = -2, 47 PeriodUndefined = -1, 48 Period1Day = 0, 49 Period2Days = 1, 50 Period3Days = 2, 51 Period4Days = 3, 52 Period5Days = 4, 53 Period6Days = 5, 54 Period1Week = 6, 55 Period2Weeks = 7, 56 Period3Weeks = 8, 57 Period1Month = 9 58 }; 59 60 /* Branch types: */ 61 enum BranchType 62 { 63 BranchStable = 0, 64 BranchAllRelease = 1, 65 BranchWithBetas = 2 66 }; 67 68 /* Public static helpers: */ 69 static void populate(); 70 static QStringList list(); 71 72 /* Constructors: */ 73 VBoxUpdateData(const QString &strData); 74 VBoxUpdateData(PeriodType periodIndex, BranchType branchIndex); 75 76 /* Public helpers: */ 77 bool isNoNeedToCheck() const; 78 bool isNeedToCheck() const; 79 QString data() const; 80 PeriodType periodIndex() const; 81 QString date() const; 82 BranchType branchIndex() const; 83 QString branchName() const; 84 85 private: 86 87 /* Private helpers: */ 88 void decode(); 89 void encode(); 90 91 /* Private variables: */ 92 static VBoxUpdateDayList m_dayList; 93 QString m_strData; 94 PeriodType m_periodIndex; 95 QDate m_date; 96 BranchType m_branchIndex; 25 UIDownloadType_Additions, 26 UIDownloadType_UserManual, 27 UIDownloadType_ExtensionPack, 28 UIDownloadType_Max 97 29 }; 98 30 99 #endif // __UI UpdateDefs_h__31 #endif // __UINetworkDefs_h__
Note:
See TracChangeset
for help on using the changeset viewer.