📄 synchronizationmessages.cpp
字号:
/*
* 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 General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY, TITLE, NONINFRINGEMENT or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307 USA
*/
#include "stdafx.h"
#include "SynchronizationMessages.h"
#include "ui.h"
CString SyncErrorMsg(long code)
{
CString s1("");
switch(code)
{
case 0:
s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_OK_0); break;
case -10:
s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_NOSOURCE_10); break;
case -6:
s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_SYNC_STOPPED);break;
case 402:
s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_AUTH_EXPIRED_402); break;
case 404:
s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_NOTFOUND_404); break;
//case 10003:
// s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_NOSOURCE_1003); break;
case 407:
case 401:
s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_INVALID_CREDENTIALS_401); break;
case 503:
s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_SERVER_BUSY_503); break;
// TODO: get the message from the server?
// case 506:
// s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_BACKEND_ERROR_506); break;
case 588:
s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_ERROR_EMAIL_588);break;
case 2001:
s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_ERROR_CONNECT_2001); break;
case 2002:
s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_ERROR_READING_CONTENT_2002); break;
case 2003:
s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_SERVER_NOT_FOUND_2003); break;
case 2005:
s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_INTERNET_CONNECTION_MISSING_2005); break;
case 2007:
s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_NETWORK_ERROR_2007); break;
case 2052:
s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_SERVER_ERROR_2052); break;
case 12029: //ERROR_INTERNET_CANNOT_CONNECT *** deprecated: use only code 2001 ***
s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_ERROR_INTERNET_CANNOT_CONNECT_12019); break;
// TODO: add a message for this.
// case 12007:
// s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_ERROR_RESOLVE_NAME);
// break;
case -30:
s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_SYNC_STOPPED);break;
case -40:
s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_OUT_OF_MEMORY);break;
case -50:
s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_LOW_STORAGE_MEMORY);break;
case -25:
s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_BRIEFCASE_DIR_DOESNT_EXIST);break;
case -26:
s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_NOTE_DIR_DOESNT_EXIST);break;
//case 10003:
//s1.LoadString(getLocalizationUtils()->getLocaleResource(), IDS_CODE_NO_SOURCES_10003); break;
}
return s1;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -