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

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

?? nsseamonkeyprofilemigrator.cpp

?? 現在很火的郵件客戶端軟件thunderbird的源碼
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
/* -*- 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 Ben Goodger. * Portions created by the Initial Developer are Copyright (C) 2004 * the Initial Developer. All Rights Reserved. * * Contributor(s): *  Ben Goodger <ben@bengoodger.com> *  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 ***** */#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 "nsSeamonkeyProfileMigrator.h"#include "nsIRelativeFilePref.h"#include "nsAppDirectoryServiceDefs.h"#include "prprf.h"#include "nsVoidArray.h"static PRUint32 StringHash(const char *ubuf);nsresult NS_MsgHashIfNecessary(nsCString &name);// Mail specific folder paths#define MAIL_DIR_50_NAME             NS_LITERAL_STRING("Mail")#define IMAP_MAIL_DIR_50_NAME        NS_LITERAL_STRING("ImapMail")#define NEWS_DIR_50_NAME             NS_LITERAL_STRING("News")///////////////////////////////////////////////////////////////////////////////// nsSeamonkeyProfileMigrator#define FILE_NAME_JUNKTRAINING    NS_LITERAL_STRING("training.dat")#define FILE_NAME_PERSONALDICTIONARY NS_LITERAL_STRING("persdict.dat")#define FILE_NAME_PERSONAL_ADDRESSBOOK NS_LITERAL_STRING("abook.mab")#define FILE_NAME_MAILVIEWS       NS_LITERAL_STRING("mailviews.dat")#define FILE_NAME_CERT8DB         NS_LITERAL_STRING("cert8.db")#define FILE_NAME_KEY3DB          NS_LITERAL_STRING("key3.db")#define FILE_NAME_SECMODDB        NS_LITERAL_STRING("secmod.db")#define FILE_NAME_MIMETYPES       NS_LITERAL_STRING("mimeTypes.rdf")#define FILE_NAME_PREFS           NS_LITERAL_STRING("prefs.js")#define FILE_NAME_USER_PREFS      NS_LITERAL_STRING("user.js")struct PrefBranchStruct {  char*         prefName;  PRInt32       type;  union {    char*       stringValue;    PRInt32     intValue;    PRBool      boolValue;    PRUnichar*  wstringValue;  };};NS_IMPL_ISUPPORTS2(nsSeamonkeyProfileMigrator, nsIMailProfileMigrator, nsITimerCallback)nsSeamonkeyProfileMigrator::nsSeamonkeyProfileMigrator(){  mObserverService = do_GetService("@mozilla.org/observer-service;1");  mMaxProgress = LL_ZERO;  mCurrentProgress = LL_ZERO;}nsSeamonkeyProfileMigrator::~nsSeamonkeyProfileMigrator(){           }///////////////////////////////////////////////////////////////////////////////// nsITimerCallbackNS_IMETHODIMPnsSeamonkeyProfileMigrator::Notify(nsITimer *timer){  CopyNextFolder();  return NS_OK;}void nsSeamonkeyProfileMigrator::CopyNextFolder() {  if (mFileCopyTransactionIndex < mFileCopyTransactions->Count())  {    PRUint32 percentage = 0;    fileTransactionEntry* fileTransaction = (fileTransactionEntry*) mFileCopyTransactions->SafeElementAt(mFileCopyTransactionIndex++);    if (fileTransaction) // copy the file    {      fileTransaction->srcFile->CopyTo(fileTransaction->destFile, EmptyString());      // 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 nsSeamonkeyProfileMigrator::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_IMETHODIMPnsSeamonkeyProfileMigrator::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);  COPY_DATA(CopyPreferences,  aReplace, nsIMailProfileMigrator::SETTINGS);  // fake notifications for things we've already imported as part of CopyPreferences  COPY_DATA(DummyCopyRoutine, aReplace, nsIMailProfileMigrator::ACCOUNT_SETTINGS);    COPY_DATA(DummyCopyRoutine, aReplace, nsIMailProfileMigrator::NEWSDATA);  // copy junk mail training file  COPY_DATA(CopyJunkTraining, aReplace, nsIMailProfileMigrator::JUNKTRAINING);  COPY_DATA(CopyPasswords,    aReplace, nsIMailProfileMigrator::PASSWORDS);  // the last thing to do is to actually copy over any mail folders we have marked for copying  // we want to do this last and it will be asynchronous so the UI doesn't freeze up while we perform   // this potentially very long operation.     nsAutoString index;  index.AppendInt(nsIMailProfileMigrator::MAILDATA);   NOTIFY_OBSERVERS(MIGRATION_ITEMBEFOREMIGRATE, index.get());  // Generate the max progress value now that we know all of the files we need to copy  PRUint32 count = mFileCopyTransactions->Count();  for (PRUint32 i = 0; i < count; ++i)   {    fileTransactionEntry* fileTransaction = (fileTransactionEntry*) mFileCopyTransactions->ElementAt(i);    if (fileTransaction)    {      PRInt64 fileSize;       fileTransaction->srcFile->GetFileSize(&fileSize);      LL_ADD(mMaxProgress, mMaxProgress, fileSize);    }  }  CopyNextFolder();  return rv;}NS_IMETHODIMPnsSeamonkeyProfileMigrator::GetMigrateData(const PRUnichar* aProfile,                                            PRBool aReplace,                                            PRUint16* aResult){  *aResult = 0;  if (!mSourceProfile) {    GetSourceProfile(aProfile);    if (!mSourceProfile)      return NS_ERROR_FILE_NOT_FOUND;  }  MigrationData data[] = { { ToNewUnicode(FILE_NAME_PREFS),                             nsIMailProfileMigrator::SETTINGS,                             PR_TRUE },                           { ToNewUnicode(FILE_NAME_JUNKTRAINING),                             nsIMailProfileMigrator::JUNKTRAINING,                             PR_TRUE },                          };                                                                    // Frees file name strings allocated above.  GetMigrateDataFromArray(data, sizeof(data)/sizeof(MigrationData),                           aReplace, mSourceProfile, aResult);  // Now locate passwords  nsXPIDLCString signonsFileName;  GetSignonFileName(aReplace, getter_Copies(signonsFileName));  if (!signonsFileName.IsEmpty()) {    nsAutoString fileName; fileName.AssignWithConversion(signonsFileName);    nsCOMPtr<nsIFile> sourcePasswordsFile;    mSourceProfile->Clone(getter_AddRefs(sourcePasswordsFile));    sourcePasswordsFile->Append(fileName);        PRBool exists;    sourcePasswordsFile->Exists(&exists);    if (exists)      *aResult |= nsIMailProfileMigrator::PASSWORDS;  }  // 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_IMETHODIMPnsSeamonkeyProfileMigrator::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_IMETHODIMPnsSeamonkeyProfileMigrator::GetSourceHasMultipleProfiles(PRBool* aResult){  nsCOMPtr<nsISupportsArray> profiles;  GetSourceProfiles(getter_AddRefs(profiles));  if (profiles) {    PRUint32 count;    profiles->Count(&count);    *aResult = count > 1;  }  else

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日欧美一区二区| 精品国产伦理网| 亚洲欧美日韩电影| 欧美日韩国产成人在线91| 午夜久久电影网| 欧美一区二区美女| 国内精品不卡在线| 久久精品男人天堂av| 不卡一卡二卡三乱码免费网站| 国产欧美在线观看一区| 99这里都是精品| 亚洲一卡二卡三卡四卡五卡| 欧美另类高清zo欧美| 国产自产高清不卡| 亚洲欧洲日韩综合一区二区| 欧美亚洲免费在线一区| 青青草精品视频| 精品美女被调教视频大全网站| 国产99久久久国产精品| 一区二区三区中文在线| 国产精品免费人成网站| 91麻豆swag| 捆绑调教一区二区三区| 国产欧美一区二区三区在线看蜜臀| 色av综合在线| 久久精品国产成人一区二区三区| 国产精品福利一区二区| 91 com成人网| 成人性生交大片免费看在线播放 | 正在播放一区二区| 懂色中文一区二区在线播放| 亚洲高清视频在线| 亚洲国产高清在线观看视频| 欧美日韩免费电影| 风间由美中文字幕在线看视频国产欧美| 亚洲人成网站色在线观看| 日韩三级免费观看| 欧美系列日韩一区| 国产盗摄一区二区| 国产精品一区在线| 丝瓜av网站精品一区二区| 欧美激情在线一区二区三区| 欧美人牲a欧美精品| 99精品桃花视频在线观看| 韩国女主播成人在线| 亚洲高清不卡在线| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆 | 91精品国产综合久久香蕉麻豆| 成人av资源站| 精品午夜一区二区三区在线观看| 一区二区三区欧美在线观看| 国产欧美日韩三级| 日韩欧美精品三级| 91精选在线观看| 一本色道久久综合亚洲91| 欧美私人免费视频| 成人免费看黄yyy456| 国产一区二区在线视频| 欧美96一区二区免费视频| 一区二区三区在线看| 中文字幕第一页久久| 久久美女艺术照精彩视频福利播放 | 亚洲一区国产视频| 中文字幕一区不卡| 中文字幕av一区二区三区免费看| 精品国产一区二区国模嫣然| 91精品视频网| 欧美日产国产精品| 欧美亚洲丝袜传媒另类| 色欧美日韩亚洲| 91丨porny丨中文| 成人免费毛片aaaaa**| 成人精品电影在线观看| 欧美日韩国产精选| 欧美色视频在线观看| 色婷婷综合中文久久一本| av电影天堂一区二区在线 | 91免费在线视频观看| 99久久精品国产毛片| 成人精品高清在线| 99精品偷自拍| 欧美性大战久久久久久久| 91理论电影在线观看| 色菇凉天天综合网| 欧美性大战xxxxx久久久| 欧美日韩国产成人在线免费| 欧美日本在线看| 日韩欧美一区二区三区在线| 精品日韩一区二区| 欧美国产精品一区二区| 日本一区二区免费在线| 最新国产成人在线观看| 一区二区免费在线| 婷婷久久综合九色综合伊人色| 成人午夜视频免费看| 成人高清免费观看| 在线视频一区二区三区| 欧美日韩精品福利| 精品国产一区二区三区四区四 | 日韩欧美中文字幕公布| 久久天天做天天爱综合色| 国产精品麻豆99久久久久久| 亚洲欧美一区二区三区孕妇| 亚洲第一电影网| 极品少妇xxxx精品少妇| 成人深夜视频在线观看| 欧美写真视频网站| 欧美刺激脚交jootjob| 中文文精品字幕一区二区| 一区二区三区免费看视频| 日韩精品午夜视频| 成人黄页在线观看| 精品久久久久久久久久久久久久久 | 欧美性猛交xxxx乱大交退制版| 欧美一区二区三区视频免费播放| 精品不卡在线视频| 亚洲精品美腿丝袜| 精品一区二区三区免费视频| 波多野结衣亚洲| 日韩丝袜情趣美女图片| 国产精品理论片在线观看| 亚洲成在人线在线播放| 国产成人免费高清| 91精品国产综合久久香蕉的特点| 国产精品污网站| 天天操天天色综合| 波多野结衣中文字幕一区二区三区| 欧美日韩午夜影院| 天天爽夜夜爽夜夜爽精品视频| 国产麻豆日韩欧美久久| 欧美剧情片在线观看| 亚洲欧洲色图综合| 国产一区二区美女| 欧美一卡二卡三卡| 亚洲一区二区在线播放相泽| 国产成人精品影院| 日韩限制级电影在线观看| 中文字幕一区二区三区精华液| 免费人成黄页网站在线一区二区| 日本黄色一区二区| 国产香蕉久久精品综合网| 日本欧美一区二区三区| 欧美自拍偷拍一区| 亚洲人成精品久久久久久| 国产成人午夜精品5599| 日韩精品中文字幕在线一区| 亚洲福利一区二区| 色婷婷精品大在线视频| 国产精品久久久久久户外露出| 激情综合色丁香一区二区| 久久久精品中文字幕麻豆发布| 日本中文字幕一区| 欧美日韩高清一区二区不卡| 亚洲视频一二三| a4yy欧美一区二区三区| 26uuu精品一区二区三区四区在线| 性欧美疯狂xxxxbbbb| 欧美色倩网站大全免费| 尤物在线观看一区| 91伊人久久大香线蕉| 国产精品卡一卡二卡三| 粗大黑人巨茎大战欧美成人| 久久久久久久久久久久久女国产乱| 日韩高清不卡一区二区| 欧美一区在线视频| 午夜欧美2019年伦理| 欧美日本在线播放| 日本在线不卡视频| 日韩一二在线观看| 精品影视av免费| 2024国产精品| 国产.精品.日韩.另类.中文.在线.播放| 欧美成人猛片aaaaaaa| 久久99精品久久久久久久久久久久| 欧美电影一区二区三区| av成人免费在线| 亚洲免费资源在线播放| 欧洲亚洲精品在线| 亚洲成人综合视频| 日韩欧美中文字幕精品| 国产一区欧美日韩| 国产精品久久久久久久久晋中| 成人国产精品免费观看| 亚洲尤物视频在线| 欧美另类z0zxhd电影| 久久不见久久见免费视频7| 久久伊人中文字幕| 成人精品国产一区二区4080| 一个色在线综合| 日韩免费电影一区| 国产不卡视频在线观看| 亚洲精品亚洲人成人网| 91精品国产综合久久久久久久| 国内精品免费**视频| 国产精品嫩草影院av蜜臀| 色婷婷激情综合| 久久精品国产一区二区三区免费看| 欧美韩国日本不卡| 欧美性猛交xxxxxxxx| 国产一区二区毛片|