亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? nsdogbertprofilemigrator.cpp

?? 現在很火的郵件客戶端軟件thunderbird的源碼
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- *//* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is The Mail Profile Migrator. * * The Initial Developer of the Original Code is Scott MacGregor * Portions created by the Initial Developer are Copyright (C) 2004 * the Initial Developer. All Rights Reserved. * * Contributor(s): *  Scott MacGregor <mscott@mozilla.org> * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */// this file is mostly a copy of nsPrefMigration.cpp...old nsFileSpec warts and all#include "nsMailProfileMigratorUtils.h"#include "nsCRT.h"#include "nsDirectoryServiceDefs.h"#include "nsIObserverService.h"#include "nsIPasswordManagerInternal.h"#include "nsIPrefLocalizedString.h"#include "nsIPrefService.h"#include "nsIServiceManager.h"#include "nsISupportsArray.h"#include "nsISupportsPrimitives.h"#include "nsNetCID.h"#include "nsNetUtil.h"#include "nsDogbertProfileMigrator.h"#include "nsIRelativeFilePref.h"#include "nsAppDirectoryServiceDefs.h"#include "nsVoidArray.h"#include "prprf.h"#include "prmem.h"#include "prio.h"#include "prenv.h"#include "NSReg.h"// lots of includes required for the nsPrefMigration.cpp code that we copied:#include "nsICharsetConverterManager.h"#include "nsIPlatformCharset.h"#include "nsIPref.h"#include "nsIFileSpec.h"#include "nsFileSpec.h"#include "nsFileStream.h"static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);static NS_DEFINE_CID(kPrefServiceCID, NS_PREF_CID);static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);#define MIGRATION_PROPERTIES_URL "chrome://messenger/locale/migration/migration.properties"#ifndef MAXPATHLEN#ifdef _MAX_PATH#define MAXPATHLEN _MAX_PATH#elif defined(CCHMAXPATH)#define MAXPATHLEN CCHMAXPATH#else#define MAXPATHLEN 1024#endif#endif#if defined(XP_UNIX) && !defined(XP_MACOSX)#define PREF_FILE_NAME_IN_4x      "preferences.js"#define IMAP_MAIL_FILTER_FILE_NAME_IN_4x "mailrule"#define POP_MAIL_FILTER_FILE_NAME_IN_4x "mailrule"#define MAIL_SUMMARY_SUFFIX_IN_4x ".summary"#define NEWS_SUMMARY_SUFFIX_IN_4x ".snm"#define NEWSRC_PREFIX_IN_4x ".newsrc-"#define SNEWSRC_PREFIX_IN_4x ".snewsrc-"#define POPSTATE_FILE_IN_4x "popstate"#define PSM_CERT7_DB "cert7.db"#define PSM_KEY3_DB "key3.db"#define PSM_SECMODULE_DB "secmodule.db"#define HOME_ENVIRONMENT_VARIABLE         "HOME"#define PROFILE_HOME_ENVIRONMENT_VARIABLE "PROFILE_HOME"#define DEFAULT_UNIX_PROFILE_NAME         "default"#elif defined(XP_MAC) || defined(XP_MACOSX)#define OLDREG_NAME               "Netscape Registry"#define OLDREG_DIR                NS_MAC_PREFS_DIR#define PREF_FILE_NAME_IN_4x      "Netscape Preferences"#define MAC_RULES_FILE_ENDING_STRING_IN_4X " Rules"#define IMAP_MAIL_FILTER_FILE_NAME_IN_4x "<hostname> Rules"#define POP_MAIL_FILTER_FILE_NAME_IN_4x "Filter Rules"#define MAIL_SUMMARY_SUFFIX_IN_4x ".snm"#define NEWS_SUMMARY_SUFFIX_IN_4x ".snm"#define POPSTATE_FILE_IN_4x "Pop State"#define SECURITY_PATH "Security"#define PSM_CERT7_DB "Certificates7"#define PSM_KEY3_DB "Key Database3"#define PSM_SECMODULE_DB "Security Modules"#else /* XP_WIN || XP_OS2 */#define PREF_FILE_NAME_IN_4x      "prefs.js"#define IMAP_MAIL_FILTER_FILE_NAME_IN_4x "rules.dat"#define POP_MAIL_FILTER_FILE_NAME_IN_4x "rules.dat"#define MAIL_SUMMARY_SUFFIX_IN_4x ".snm"#define NEWS_SUMMARY_SUFFIX_IN_4x ".snm"#define OLDREG_NAME               "nsreg.dat"#ifdef XP_WIN#define OLDREG_DIR                NS_WIN_WINDOWS_DIR#else#define OLDREG_DIR                NS_OS2_DIR#endif// purposely not defined, since it was in the right place// and with the right name in 4.x//#define POPSTATE_FILE_IN_4x "popstate.dat"#define PSM_CERT7_DB "cert7.db"#define PSM_KEY3_DB "key3.db"#define PSM_SECMODULE_DB "secmod.db"#endif /* XP_UNIX */#define SUMMARY_SUFFIX_IN_5x ".msf"#define IMAP_MAIL_FILTER_FILE_NAME_IN_5x "rules.dat"#define POP_MAIL_FILTER_FILE_NAME_IN_5x "rules.dat"#define POPSTATE_FILE_IN_5x	"popstate.dat"// only UNIX had movemail in 4.x#if defined(XP_UNIX) && !defined(XP_MACOSX)#define HAVE_MOVEMAIL 1#endif /* XP_UNIX */#define PREMIGRATION_PREFIX "premigration."#define ADDRBOOK_FILE_EXTENSION_IN_4X  ".na2"#define PREF_FILE_HEADER_STRING "# Mozilla User Preferences    " #define MAX_PREF_LEN 1024// this is for the hidden preference setting in mozilla/modules/libpref/src/init/mailnews.js// pref("mail.migration.copyMailFiles", true);//// see bugzilla bug 80035 (http://bugzilla.mozilla.org/show_bug.cgi?id=80035)//// the default value for this setting is true which means when migrating from// Netscape 4.x, mozilla will copy all the contents of Local Folders and Imap// Folder to the newly created subfolders of migrated mozilla profile// when this value is set to false, mozilla will not copy these contents and// still share them with Netscape 4.x//// Advantages of forbidding copy operation://     reduce the disk usage//     quick migration// Disadvantage of forbidding copy operation://     without perfect lock mechamism, there is possibility of data corruption//     when Netscape 4.x and mozilla run at the same time and access the same//     mail file at the same time#define PREF_MIGRATION_MODE_FOR_MAIL "mail.migration.copyMailFiles"#define PREF_MAIL_DIRECTORY "mail.directory"#define PREF_NEWS_DIRECTORY "news.directory"#define PREF_MAIL_IMAP_ROOT_DIR "mail.imap.root_dir"#define PREF_NETWORK_HOSTS_POP_SERVER "network.hosts.pop_server"#define PREF_4X_NETWORK_HOSTS_IMAP_SERVER "network.hosts.imap_servers"  #define PREF_MAIL_SERVER_TYPE	"mail.server_type"#define PREF_BROWSER_CACHE_DIRECTORY "browser.cache.directory"#define POP_4X_MAIL_TYPE 0#define IMAP_4X_MAIL_TYPE 1#ifdef HAVE_MOVEMAIL#define MOVEMAIL_4X_MAIL_TYPE 2#define NEW_MOVEMAIL_DIR_NAME "movemail"#endif /* HAVE_MOVEMAIL */#if defined(XP_UNIX) && !defined(XP_MACOSX)/* a 4.x profile on UNIX is rooted at something like * "/u/sspitzer/.netscape" * profile + OLD_MAIL_DIR_NAME = "/u/sspitzer/.netscape/../nsmail" = "/u/sspitzer/nsmail" * profile + OLD_NEWS_DIR_NAME = "/u/sspitzer/.netscape/xover-cache" * profile + OLD_IMAPMAIL_DIR_NAME = "/u/sspitzer/.netscape/../ns_imap" = "/u/sspitzer/ns_imap" * which is as good as we're going to get for defaults on UNIX. */#define OLD_MAIL_DIR_NAME "/../nsmail"#define OLD_NEWS_DIR_NAME "/xover-cache"#define OLD_IMAPMAIL_DIR_NAME "/../ns_imap"#else#define OLD_MAIL_DIR_NAME "Mail"#define OLD_NEWS_DIR_NAME "News"#define OLD_IMAPMAIL_DIR_NAME "ImapMail"#endif /* XP_UNIX */#define NEW_MAIL_DIR_NAME "Mail"#define NEW_NEWS_DIR_NAME "News"#define NEW_IMAPMAIL_DIR_NAME "ImapMail"#define NEW_LOCAL_MAIL_DIR_NAME "Local Folders"#define NEW_DIR_SUFFIX "5"#define PREF_FILE_NAME_IN_5x "prefs.js"static PRBool nsCStringEndsWith(nsCString& name, const char *ending);#ifdef NEED_TO_COPY_AND_RENAME_NEWSRC_FILESstatic PRBool nsCStringStartsWith(nsCString& name, const char *starting);#endif///////////////////////////////////////////////////////////////////////////////// nsDogbertProfileMigratorstruct PrefBranchStruct {  char*         prefName;  PRInt32       type;  union {    char*       stringValue;    PRInt32     intValue;    PRBool      boolValue;    PRUnichar*  wstringValue;  };};NS_IMPL_ISUPPORTS2(nsDogbertProfileMigrator, nsIMailProfileMigrator, nsITimerCallback)nsDogbertProfileMigrator::nsDogbertProfileMigrator(){  mObserverService = do_GetService("@mozilla.org/observer-service;1");  mMaxProgress = LL_ZERO;  mCurrentProgress = LL_ZERO;}nsDogbertProfileMigrator::~nsDogbertProfileMigrator(){           }///////////////////////////////////////////////////////////////////////////////// nsITimerCallbackNS_IMETHODIMPnsDogbertProfileMigrator::Notify(nsITimer *timer){  CopyNextFolder();  return NS_OK;}void nsDogbertProfileMigrator::CopyNextFolder() {  if (mFileCopyTransactionIndex < mFileCopyTransactions->Count())  {    PRUint32 percentage = 0;    fileTransactionEntry* fileTransaction = (fileTransactionEntry*) mFileCopyTransactions->SafeElementAt(mFileCopyTransactionIndex++);    if (fileTransaction) // copy the file    {      fileTransaction->srcFile->CopyTo(fileTransaction->destFile, fileTransaction->newName);      // add to our current progress      PRInt64 fileSize;      fileTransaction->srcFile->GetFileSize(&fileSize);      LL_ADD(mCurrentProgress, mCurrentProgress, fileSize);      PRInt64 percentDone;      LL_MUL(percentDone, mCurrentProgress, 100);      LL_DIV(percentDone, percentDone, mMaxProgress);            LL_L2UI(percentage, percentDone);      nsAutoString index;      index.AppendInt( percentage );       NOTIFY_OBSERVERS(MIGRATION_PROGRESS, index.get());    }    // fire a timer to handle the next one.     mFileIOTimer = do_CreateInstance("@mozilla.org/timer;1");    if (mFileIOTimer)      mFileIOTimer->InitWithCallback(NS_STATIC_CAST(nsITimerCallback *, this), percentage == 100 ? 500 : 0, nsITimer::TYPE_ONE_SHOT);  } else    EndCopyFolders();    return;}void nsDogbertProfileMigrator::EndCopyFolders() {  // clear out the file transaction array  if (mFileCopyTransactions)  {    PRUint32 count = mFileCopyTransactions->Count();    for (PRUint32 i = 0; i < count; ++i)     {      fileTransactionEntry* fileTransaction = (fileTransactionEntry*) mFileCopyTransactions->ElementAt(i);      if (fileTransaction)      {        fileTransaction->srcFile = nsnull;        fileTransaction->destFile = nsnull;        delete fileTransaction;      }    }      mFileCopyTransactions->Clear();    delete mFileCopyTransactions;  }  // notify the UI that we are done with the migration process  nsAutoString index;  index.AppendInt(nsIMailProfileMigrator::MAILDATA);   NOTIFY_OBSERVERS(MIGRATION_ITEMAFTERMIGRATE, index.get());  NOTIFY_OBSERVERS(MIGRATION_ENDED, nsnull);}///////////////////////////////////////////////////////////////////////////////// nsIMailProfileMigratorNS_IMETHODIMPnsDogbertProfileMigrator::Migrate(PRUint16 aItems, nsIProfileStartup* aStartup, const PRUnichar* aProfile){  nsresult rv = NS_OK;  PRBool aReplace = aStartup ? PR_TRUE : PR_FALSE;  if (!mTargetProfile) {    GetProfilePath(aStartup, mTargetProfile);    if (!mTargetProfile) return NS_ERROR_FAILURE;  }  if (!mSourceProfile)    GetSourceProfile(aProfile);  NOTIFY_OBSERVERS(MIGRATION_STARTED, nsnull);  rv = CopyPreferences();  return rv;}NS_IMETHODIMPnsDogbertProfileMigrator::GetMigrateData(const PRUnichar* aProfile,                                            PRBool aReplace,                                            PRUint16* aResult){  // add some extra migration fields for things we also migrate  *aResult |= nsIMailProfileMigrator::ACCOUNT_SETTINGS            | nsIMailProfileMigrator::MAILDATA            | nsIMailProfileMigrator::NEWSDATA           | nsIMailProfileMigrator::ADDRESSBOOK_DATA;  return NS_OK;}NS_IMETHODIMPnsDogbertProfileMigrator::GetSourceExists(PRBool* aResult){  nsCOMPtr<nsISupportsArray> profiles;  GetSourceProfiles(getter_AddRefs(profiles));  if (profiles) {     PRUint32 count;    profiles->Count(&count);    *aResult = count > 0;  }  else    *aResult = PR_FALSE;  return NS_OK;}NS_IMETHODIMPnsDogbertProfileMigrator::GetSourceHasMultipleProfiles(PRBool* aResult){  nsCOMPtr<nsISupportsArray> profiles;  GetSourceProfiles(getter_AddRefs(profiles));  if (profiles) {    PRUint32 count;    profiles->Count(&count);    *aResult = count > 1;  }  else    *aResult = PR_FALSE;  return NS_OK;}#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_MACOSX)NS_IMETHODIMPnsDogbertProfileMigrator::GetSourceProfiles(nsISupportsArray** aResult){  if (!mProfiles) {    nsresult rv;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人精品一区二| 亚洲自拍偷拍麻豆| 51午夜精品国产| 欧美亚一区二区| 日本高清视频一区二区| 99精品久久只有精品| 白白色 亚洲乱淫| 91一区在线观看| 99re这里只有精品视频首页| 99热精品一区二区| 日本韩国视频一区二区| 欧美在线你懂得| 7777精品伊人久久久大香线蕉经典版下载 | 欧美一级精品在线| 欧美在线短视频| 91精品国产综合久久福利软件| 91麻豆精品国产91久久久资源速度 | 成人爱爱电影网址| av电影天堂一区二区在线 | 欧美在线观看18| 91精品国产黑色紧身裤美女| 91精品在线麻豆| 国产日韩精品一区二区三区在线| 国产亚洲欧洲997久久综合| 亚洲图片激情小说| 视频一区在线播放| 国产成人午夜视频| 在线免费观看日韩欧美| 91麻豆精品国产| 国产精品久久久久久久蜜臀| 亚洲乱码一区二区三区在线观看| 天堂一区二区在线| 成人久久18免费网站麻豆| 欧美天堂亚洲电影院在线播放| 日韩精品中文字幕在线一区| 中文字幕av不卡| 亚洲成人自拍一区| 国产成人免费视频| 欧美精品久久久久久久多人混战 | 欧美一级理论片| 亚洲欧洲精品一区二区三区| 午夜精品免费在线观看| 国产盗摄精品一区二区三区在线| 欧美亚洲综合在线| 中文字幕欧美日韩一区| 欧美aa在线视频| 欧美性猛交xxxx黑人交| 国产亚洲精品bt天堂精选| 日韩有码一区二区三区| www.在线欧美| 中文字幕高清不卡| 久久se这里有精品| 欧美情侣在线播放| 亚洲精品视频一区| 成人免费视频网站在线观看| 欧美一级欧美一级在线播放| 亚洲精品菠萝久久久久久久| 国产精品一区二区三区乱码 | 欧美国产国产综合| 秋霞午夜av一区二区三区| 色呦呦一区二区三区| 国产欧美1区2区3区| 精品一区中文字幕| 日韩三级伦理片妻子的秘密按摩| 亚洲制服欧美中文字幕中文字幕| 成人精品视频一区二区三区尤物| 欧美成人精品1314www| 成人av在线观| 国产亚洲一区二区三区在线观看| 日本欧美大码aⅴ在线播放| 91在线视频免费观看| 亚洲区小说区图片区qvod| 91在线观看下载| 亚洲精品成人天堂一二三| 成人中文字幕在线| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 中文字幕色av一区二区三区| 精品在线一区二区三区| 精品国产免费久久| 国产一区二区三区免费看| 欧美xxxxxxxx| 国产凹凸在线观看一区二区| 久久青草欧美一区二区三区| 国产精品一二三四五| 国产精品色婷婷久久58| 一本色道久久综合亚洲aⅴ蜜桃 | 国产亚洲成av人在线观看导航| 久久er99精品| 中文天堂在线一区| 色婷婷av一区二区三区软件| 五月婷婷激情综合| 欧美一二三四在线| 国产精品538一区二区在线| 中文字幕欧美激情一区| 欧美综合一区二区三区| 亚洲国产日产av| 日韩欧美区一区二| 国产精品原创巨作av| 亚洲另类春色校园小说| 欧美日韩国产在线观看| 精品系列免费在线观看| 国产精品免费久久| 在线电影院国产精品| 国产一区二区三区高清播放| 亚洲手机成人高清视频| 91麻豆精品国产自产在线 | 3d动漫精品啪啪| 国产成人精品亚洲日本在线桃色 | 毛片av一区二区| 国产亚洲一区二区三区| 欧美在线短视频| 国产精品亚洲视频| 婷婷夜色潮精品综合在线| 国产亚洲精品久| 欧美日韩视频在线第一区 | 一区二区三区精品视频在线| 欧美喷潮久久久xxxxx| 国产精品77777| 日本视频一区二区三区| 国产精品对白交换视频| 日韩三级精品电影久久久| 99视频一区二区三区| 老汉av免费一区二区三区| 亚洲一级不卡视频| 国产精品久久久久久妇女6080| 制服丝袜日韩国产| 色综合久久88色综合天天| 日韩亚洲欧美高清| 91在线免费播放| 懂色av一区二区三区免费观看| 日韩不卡一二三区| 一区二区三区精品在线| 中文字幕免费不卡在线| 日韩精品最新网址| 欧美电影影音先锋| 在线看一区二区| 97久久超碰精品国产| 国产高清精品在线| 国内精品免费在线观看| 日韩影视精彩在线| 天堂成人国产精品一区| 亚洲精品精品亚洲| 亚洲女子a中天字幕| 国产精品不卡在线| 中文字幕乱码一区二区免费| 久久婷婷国产综合精品青草| 日韩欧美亚洲国产精品字幕久久久| 欧美日韩在线精品一区二区三区激情| 成人福利视频网站| 国产精品综合在线视频| 精品一区二区在线视频| 免费日本视频一区| 精品中文字幕一区二区| 久久精品国产久精国产| 韩日精品视频一区| 风间由美一区二区av101| 国产又黄又大久久| 国产91色综合久久免费分享| 国产精品一区三区| 91小视频免费观看| 91国模大尺度私拍在线视频| 在线视频一区二区三区| 欧美日本视频在线| 日韩写真欧美这视频| 精品日韩在线观看| 国产精品区一区二区三区| 国产精品毛片高清在线完整版| 国产精品久久久久久户外露出| 亚洲婷婷国产精品电影人久久| 亚洲欧洲制服丝袜| 亚洲国产精品影院| 麻豆成人久久精品二区三区红| 国模无码大尺度一区二区三区| 国产成人av一区二区三区在线观看| 国产成人高清视频| 欧美日韩中文字幕精品| 91精品国产一区二区| 久久精品在线观看| 夜夜精品浪潮av一区二区三区| 午夜欧美一区二区三区在线播放| 久久精品国产第一区二区三区| 国产99久久久久| 欧美日韩免费一区二区三区视频| 5566中文字幕一区二区电影| 国产欧美一区二区精品久导航 | 国产在线观看一区二区| 成人av电影在线| 精品污污网站免费看| 精品国产凹凸成av人网站| 国产精品护士白丝一区av| 午夜精品一区在线观看| 成人午夜精品在线| 555www色欧美视频| 亚洲欧洲中文日韩久久av乱码| 老色鬼精品视频在线观看播放| 99久久婷婷国产综合精品电影| 91精品国产91久久综合桃花| 欧美国产日韩亚洲一区| 蜜臀av性久久久久蜜臀aⅴ流畅 | www.视频一区|