updateparams.h
来自「funambol window mobile客户端源代码」· C头文件 代码 · 共 214 行
H
214 行
/*
* Funambol is a mobile platform developed by Funambol, Inc.
* Copyright (C) 2003 - 2007 Funambol, Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by
* the Free Software Foundation with the addition of the following permission
* added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED
* WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE
* WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program 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 General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program; if not, see http://www.gnu.org/licenses or write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA.
*
* You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite
* 305, Redwood City, CA 94063, USA, or at email address info@funambol.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License
* version 3, these Appropriate Legal Notices must retain the display of the
* "Powered by Funambol" logo. If the display of the logo is not reasonably
* feasible for technical reasons, the Appropriate Legal Notices must display
* the words "Powered by Funambol".
*/
#ifndef INCL_UPDATE_PARAMS
#define INCL_UPDATE_PARAMS
#include <string>
using namespace std;
#define UP_MANDATORY "type="
#define UP_RELEASE_DATE "delivery_date="
#define UP_SIZE "size="
#define UP_VERSION "version="
#define UP_URL_UPDATE "url="
#define UP_URL_COMMENT "url_description="
class UpdateParams {
private:
/**
* The new version to update to. This parameter is used also in the case
* no version was never done or the update values are not in the registry.
* In this case the values are not evaluable we should ask the server
*/
string version;
/**
* mandatory flag. It is 0 if no mandatory. It is the version number
* if the mandatory is set
*/
string mandatory;
/**
* the release date of the update package
*/
string releaseDate;
/**
* the url of the package to update to
*/
string urlUpdate;
/**
* the url to find some comments about the new version
*/
string urlComment;
/**
* the url that could be set to check where ask for a new update
* i.e. a sort of update center
*/
string urlCheck;
/**
* the size of the new package
*/
string size;
/**
* the latest time when the check update was performed
*/
string lastCheckUpdate;
/**
* the interval after that the check for update on server side has to be performed
* (default 24 hours)
*/
string intervalCheckUpdateHttp;
/**
* the interval after that the remind popup has to be showed to the user
* (default 2 hours)
*/
string intervalRemind;
/**
* if the user has choosen to skip the latest optional update this is set with the
* release number skipped. "0" otherwise
*/
string skipped;
/**
* the last time the client was updated. Initialized to 0.
*/
string lastUpdated;
/**
* the user has choosed later. this is useful for the UI handling to show the menu item.
* it is 1 if the user has choosen later. 0 otherwise
*/
string later;
/**
* the user has choosed to update now. The flag needs to be set because if the user
* cancel the download from the explorer it could also see the "Update Software" menu
*/
string now;
/**
* Is is possible that there is an update available. The startsync has tested that there is
* a possible available update
*/
string isAnUpdateAvailable;
/****************************/
// field retrieved from current configuration to perform tests
/****************************/
/**
* the current version of the installed device. This is a property read from the
* current configuration. Read only parameters.
*/
string currentVersion;
public:
UpdateParams(bool readFromRegistry = true);
~UpdateParams();
UpdateParams(const UpdateParams& up);
void setVersion(string v) {version = v; }
string getVersion() {return version; }
void setMandatory(string v) {mandatory = v; }
string getMandatory() {return mandatory; }
void setReleaseDate(string v) {releaseDate = v; }
string getReleaseDate() {return releaseDate; }
void setUrlUpdate(string v) {urlUpdate = v; }
string getUrlUpdate() {return urlUpdate; }
void setUrlComment(string v) {urlComment = v; }
string getUrlComment() {return urlComment; }
void setUrlCheck(string v) {urlCheck = v; }
string getUrlCheck() {return urlCheck; }
void setSize(string v) {size = v; }
string getSize() {return size; }
void setLastCheckUpdate(string v) {lastCheckUpdate = v; }
string getLastCheckUpdate() {return lastCheckUpdate; }
void setIntervalCheckUpdateHttp(string v) {intervalCheckUpdateHttp = v; }
string getIntervalCheckUpdateHttp() {return intervalCheckUpdateHttp; }
void setIntervalRemind(string v) {intervalRemind = v; }
string getIntervalRemind() {return intervalRemind; }
void setSkipped(string v) {skipped = v; }
string getSkipped() {return skipped; }
void setLastUpdated(string v) {lastUpdated = v; }
string getLastUpdated() {return lastUpdated; }
string getCurrentVersion() {return currentVersion; }
void setCurrentVersion(string v) {currentVersion = v; }
string getLater() {return later; }
void setLater(string v) {later = v; }
string getNow() {return now; }
void setNow(string v) {now = v; }
string getIsAnUpdateAvailable() {return isAnUpdateAvailable; }
void setIsAnUpdateAvailable(string v) {isAnUpdateAvailable = v; }
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?