--- a/mail/components/build/Makefile.in
+++ b/mail/components/build/Makefile.in
@@ -80,23 +80,21 @@ SHARED_LIBRARY_LIBS += ../shell/$(LIB_PR
endif
ifneq (,$(filter windows, $(MOZ_WIDGET_TOOLKIT)))
SHARED_LIBRARY_LIBS += ../search/$(LIB_PREFIX)winsearch_s.$(LIB_SUFFIX)
endif
ifdef MOZILLA_INTERNAL_API
EXTRA_DSO_LDOPTS += \
- $(LIBXUL_DIST)/../modules/libreg/src/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX) \
$(MOZ_COMPONENT_LIBS) \
$(MOZ_UNICHARUTIL_LIBS) \
$(NULL)
else
EXTRA_DSO_LDOPTS += \
- $(LIBXUL_DIST)/../modules/libreg/src/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX) \
$(LIBXUL_DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
$(MOZ_COMPONENT_LIBS) \
$(NULL)
endif
# Mac: Need to link to CoreFoundation for Mac shell service
# GTK2: Need to link with glib for GNOME shell service
ifneq (,$(filter cocoa gtk2,$(MOZ_WIDGET_TOOLKIT)))
--- a/mail/components/migration/src/nsNetscapeProfileMigratorBase.cpp
+++ b/mail/components/migration/src/nsNetscapeProfileMigratorBase.cpp
@@ -39,17 +39,16 @@
#include "nsAppDirectoryServiceDefs.h"
#include "nsIFile.h"
#include "nsIInputStream.h"
#include "nsILineInputStream.h"
#include "nsIPrefBranch.h"
#include "nsIPrefLocalizedString.h"
#include "nsIPrefService.h"
#include "nsIRDFService.h"
-#include "NSReg.h"
#include "nsIServiceManager.h"
#include "nsIMutableArray.h"
#include "nsISupportsPrimitives.h"
#include "nsIURL.h"
#include "nsNetscapeProfileMigratorBase.h"
#include "nsNetUtil.h"
#include "prtime.h"
#include "prprf.h"
@@ -68,31 +67,16 @@ nsNetscapeProfileMigratorBase::nsNetscap
mMaxProgress = LL_ZERO;
mCurrentProgress = LL_ZERO;
mFileCopyTransactionIndex = 0;
}
NS_IMPL_ISUPPORTS2(nsNetscapeProfileMigratorBase, nsIMailProfileMigrator,
nsITimerCallback)
-static nsresult
-regerr2nsresult(REGERR errCode)
-{
- switch (errCode) {
- case REGERR_PARAM:
- case REGERR_BADTYPE:
- case REGERR_BADNAME:
- return NS_ERROR_INVALID_ARG;
-
- case REGERR_MEMORY:
- return NS_ERROR_OUT_OF_MEMORY;
- }
- return NS_ERROR_FAILURE;
-}
-
nsresult
nsNetscapeProfileMigratorBase::GetProfileDataFromProfilesIni(nsILocalFile* aDataDir,
nsIMutableArray* aProfileNames,
nsIMutableArray* aProfileLocations)
{
nsCOMPtr<nsIFile> dataDir;
nsresult rv = aDataDir->Clone(getter_AddRefs(dataDir));
NS_ENSURE_SUCCESS(rv, rv);
@@ -160,119 +144,16 @@ nsNetscapeProfileMigratorBase::GetProfil
profileNameString->SetData(NS_ConvertUTF8toUTF16(buffer));
aProfileNames->AppendElement(profileNameString, PR_FALSE);
}
}
return NS_OK;
}
-nsresult
-nsNetscapeProfileMigratorBase::GetProfileDataFromRegistry(nsILocalFile* aRegistryFile,
- nsIMutableArray* aProfileNames,
- nsIMutableArray* aProfileLocations)
-{
- REGERR errCode;
-
- // Ensure aRegistryFile exists before opening it
- bool regFileExists = false;
- nsresult rv = aRegistryFile->Exists(®FileExists);
- NS_ENSURE_SUCCESS(rv, rv);
-
- if (!regFileExists)
- return NS_ERROR_FILE_NOT_FOUND;
-
- // Open It
- nsCAutoString regPath;
- rv = aRegistryFile->GetNativePath(regPath);
- NS_ENSURE_SUCCESS(rv, rv);
-
- if ((errCode = NR_StartupRegistry()))
- return regerr2nsresult(errCode);
-
- HREG reg;
- if ((errCode = NR_RegOpen(regPath.get(), ®))) {
- NR_ShutdownRegistry();
-
- return regerr2nsresult(errCode);
- }
-
- RKEY profilesTree;
- if ((errCode = NR_RegGetKey(reg, ROOTKEY_COMMON, "Profiles", &profilesTree))) {
- NR_RegClose(reg);
- NR_ShutdownRegistry();
-
- return regerr2nsresult(errCode);
- }
-
- char profileStr[MAXREGPATHLEN];
- REGENUM enumState = nsnull;
-
- while (!NR_RegEnumSubkeys(reg, profilesTree, &enumState, profileStr,
- sizeof(profileStr), REGENUM_CHILDREN))
- {
- RKEY profileKey;
- if (NR_RegGetKey(reg, profilesTree, profileStr, &profileKey))
- continue;
-
- // "migrated" is "yes" for all valid Seamonkey profiles. It is only "no"
- // for 4.x profiles.
- char migratedStr[3];
- errCode = NR_RegGetEntryString(reg, profileKey, "migrated",
- migratedStr, sizeof(migratedStr));
- if ((errCode != REGERR_OK && errCode != REGERR_BUFTOOSMALL) ||
- strcmp(migratedStr, "no") == 0)
- continue;
-
- // Get the profile location and add it to the locations array
- REGINFO regInfo;
- regInfo.size = sizeof(REGINFO);
-
- if (NR_RegGetEntryInfo(reg, profileKey, "directory", ®Info))
- continue;
-
- nsCAutoString dirStr;
- dirStr.SetLength(regInfo.entryLength);
-
- errCode = NR_RegGetEntryString(reg, profileKey, "directory",
- dirStr.BeginWriting(), regInfo.entryLength);
- // Remove trailing \0
- dirStr.SetLength(regInfo.entryLength-1);
-
- nsCOMPtr<nsILocalFile> dir;
-#ifdef XP_MACOSX
- rv = NS_NewNativeLocalFile(EmptyCString(), PR_TRUE, getter_AddRefs(dir));
- if (NS_FAILED(rv)) break;
- dir->SetPersistentDescriptor(dirStr);
-#else
- rv = NS_NewLocalFile(NS_ConvertUTF8toUTF16(dirStr), PR_TRUE,
- getter_AddRefs(dir));
- if (NS_FAILED(rv)) break;
-#endif
-
- bool exists;
- dir->Exists(&exists);
-
- if (exists) {
- aProfileLocations->AppendElement(dir, PR_FALSE);
-
- // Add the profile name to the names array
- nsCOMPtr<nsISupportsString> profileNameString(
- do_CreateInstance("@mozilla.org/supports-string;1"));
-
- profileNameString->SetData(NS_ConvertUTF8toUTF16(profileStr));
- aProfileNames->AppendElement(profileNameString, PR_FALSE);
- }
- }
- NR_RegClose(reg);
- NR_ShutdownRegistry();
-
- return rv;
-}
-
#define GETPREF(xform, method, value) \
nsresult rv = aBranch->method(xform->sourcePrefName, value); \
if (NS_SUCCEEDED(rv)) \
xform->prefHasValue = PR_TRUE; \
return rv;
#define SETPREF(xform, method, value) \
if (xform->prefHasValue) { \
--- a/mail/components/migration/src/nsNetscapeProfileMigratorBase.h
+++ b/mail/components/migration/src/nsNetscapeProfileMigratorBase.h
@@ -117,19 +117,16 @@ public:
protected:
void CopyNextFolder();
void EndCopyFolders();
nsresult GetProfileDataFromProfilesIni(nsILocalFile* aDataDir,
nsIMutableArray* aProfileNames,
nsIMutableArray* aProfileLocations);
- nsresult GetProfileDataFromRegistry(nsILocalFile* aRegistryFile,
- nsIMutableArray* aProfileNames,
- nsIMutableArray* aProfileLocations);
nsresult CopyFile(const nsAString& aSourceFileName, const nsAString& aTargetFileName);
nsresult GetSignonFileName(bool aReplace, char** aFileName);
nsresult LocateSignonsFile(char** aResult);
nsCOMPtr<nsILocalFile> mSourceProfile;
nsCOMPtr<nsIFile> mTargetProfile;
--- a/mail/components/migration/src/nsProfileMigrator.cpp
+++ b/mail/components/migration/src/nsProfileMigrator.cpp
@@ -48,35 +48,22 @@
#include "nsIMutableArray.h"
#include "nsComponentManagerUtils.h"
#include "nsServiceManagerUtils.h"
#include "nsIProperties.h"
#include "nsDirectoryServiceDefs.h"
#include "nsProfileMigrator.h"
#include "nsMailMigrationCID.h"
-#include "NSReg.h"
#ifdef XP_WIN
#include <windows.h>
#else
#include <limits.h>
#endif
-#ifndef MAXPATHLEN
-#ifdef PATH_MAX
-#define MAXPATHLEN PATH_MAX
-#elif defined(_MAX_PATH)
-#define MAXPATHLEN _MAX_PATH
-#elif defined(CCHMAXPATH)
-#define MAXPATHLEN CCHMAXPATH
-#else
-#define MAXPATHLEN 1024
-#endif
-#endif
-
NS_IMPL_ISUPPORTS1(nsProfileMigrator, nsIProfileMigrator)
#define MIGRATION_WIZARD_FE_URL "chrome://messenger/content/migration/migration.xul"
#define MIGRATION_WIZARD_FE_FEATURES "chrome,dialog,modal,centerscreen"
NS_IMETHODIMP
nsProfileMigrator::Migrate(nsIProfileStartup* aStartup)
{
@@ -176,129 +163,8 @@ nsProfileMigrator::GetDefaultMailMigrato
{
mailMigrator = nsnull;
return NS_OK;
}
}
return NS_ERROR_NOT_AVAILABLE;
}
-
-NS_IMETHODIMP
-nsProfileMigrator::Import()
-{
- if (ImportRegistryProfiles(NS_LITERAL_CSTRING("Thunderbird")))
- return NS_OK;
-
- return NS_ERROR_FAILURE;
-}
-
-bool
-nsProfileMigrator::ImportRegistryProfiles(const nsACString& aAppName)
-{
- nsresult rv;
-
- nsCOMPtr<nsIToolkitProfileService> profileSvc
- (do_GetService(NS_PROFILESERVICE_CONTRACTID));
- NS_ENSURE_TRUE(profileSvc, PR_FALSE);
-
- nsCOMPtr<nsIProperties> dirService
- (do_GetService("@mozilla.org/file/directory_service;1"));
- NS_ENSURE_TRUE(dirService, PR_FALSE);
-
- nsCOMPtr<nsILocalFile> regFile;
-#ifdef XP_WIN
- rv = dirService->Get(NS_WIN_APPDATA_DIR, NS_GET_IID(nsILocalFile),
- getter_AddRefs(regFile));
- NS_ENSURE_SUCCESS(rv, PR_FALSE);
- regFile->AppendNative(aAppName);
- regFile->AppendNative(NS_LITERAL_CSTRING("registry.dat"));
-#elif defined(XP_MACOSX)
- rv = dirService->Get(NS_MAC_USER_LIB_DIR, NS_GET_IID(nsILocalFile),
- getter_AddRefs(regFile));
- NS_ENSURE_SUCCESS(rv, PR_FALSE);
- regFile->AppendNative(aAppName);
- regFile->AppendNative(NS_LITERAL_CSTRING("Application Registry"));
-#elif defined(XP_OS2)
- rv = dirService->Get(NS_OS2_HOME_DIR, NS_GET_IID(nsILocalFile),
- getter_AddRefs(regFile));
- NS_ENSURE_SUCCESS(rv, PR_FALSE);
- regFile->AppendNative(aAppName);
- regFile->AppendNative(NS_LITERAL_CSTRING("registry.dat"));
-#elif defined(XP_BEOS)
- rv = dirService->Get(NS_BEOS_SETTINGS_DIR, NS_GET_IID(nsILocalFile),
- getter_AddRefs(regFile));
- NS_ENSURE_SUCCESS(rv, PR_FALSE);
- regFile->AppendNative(aAppName);
- regFile->AppendNative(NS_LITERAL_CSTRING("appreg"));
-#else
- rv = dirService->Get(NS_UNIX_HOME_DIR, NS_GET_IID(nsILocalFile),
- getter_AddRefs(regFile));
- NS_ENSURE_SUCCESS(rv, PR_FALSE);
- nsCAutoString dotAppName;
- ToLowerCase(aAppName, dotAppName);
- dotAppName.Insert('.', 0);
-
- regFile->AppendNative(dotAppName);
- regFile->AppendNative(NS_LITERAL_CSTRING("appreg"));
-#endif
-
- nsCAutoString path;
- rv = regFile->GetNativePath(path);
- NS_ENSURE_SUCCESS(rv, PR_FALSE);
-
- if (NR_StartupRegistry())
- return PR_FALSE;
-
- bool migrated = false;
- HREG reg = nsnull;
- RKEY profiles = 0;
- REGENUM enumstate = 0;
- char profileName[MAXREGNAMELEN];
-
- if (NR_RegOpen(path.get(), ®))
- goto cleanup;
-
- if (NR_RegGetKey(reg, ROOTKEY_COMMON, "Profiles", &profiles))
- goto cleanup;
-
- while (!NR_RegEnumSubkeys(reg, profiles, &enumstate,
- profileName, MAXREGNAMELEN, REGENUM_CHILDREN)) {
-#ifdef DEBUG_bsmedberg
- printf("Found profile %s.\n", profileName);
-#endif
-
- RKEY profile = 0;
- if (NR_RegGetKey(reg, profiles, profileName, &profile)) {
- NS_ERROR("Could not get the key that was enumerated.");
- continue;
- }
-
- char profilePath[MAXPATHLEN];
- if (NR_RegGetEntryString(reg, profile, "directory",
- profilePath, MAXPATHLEN))
- continue;
-
- nsCOMPtr<nsILocalFile> profileFile
- (do_CreateInstance("@mozilla.org/file/local;1"));
- if (!profileFile)
- continue;
-#if defined (XP_MACOSX)
- rv = profileFile->SetPersistentDescriptor(nsDependentCString(profilePath));
-#else
- NS_ConvertUTF8toUTF16 widePath(profilePath);
- rv = profileFile->InitWithPath(widePath);
-#endif
- if (NS_FAILED(rv)) continue;
-
- nsCOMPtr<nsIToolkitProfile> tprofile;
- profileSvc->CreateProfile(profileFile, nsnull,
- nsDependentCString(profileName),
- getter_AddRefs(tprofile));
- migrated = PR_TRUE;
- }
-
-cleanup:
- if (reg)
- NR_RegClose(reg);
- NR_ShutdownRegistry();
- return migrated;
-}
--- a/mail/components/migration/src/nsProfileMigrator.h
+++ b/mail/components/migration/src/nsProfileMigrator.h
@@ -40,33 +40,26 @@
#include "nsIProfileMigrator.h"
#include "nsIMailProfileMigrator.h"
#include "nsIServiceManager.h"
#include "nsIToolkitProfile.h"
#include "nsIToolkitProfileService.h"
#include "nsCOMPtr.h"
#include "nsDirectoryServiceDefs.h"
-#include "NSReg.h"
#include "nsStringGlue.h"
#define NS_THUNDERBIRD_PROFILEIMPORT_CID \
-{ 0xb3c78baf, 0x3a52, 0x41d2, { 0x97, 0x18, 0xc3, 0x19, 0xbe, 0xf9, 0xaf, 0xfc } }
+{ 0xea05dd97, 0xb66b, 0x4305, { 0xa6, 0x58, 0xd5, 0xde, 0x7f, 0x54, 0x0c, 0xc9 } }
class nsProfileMigrator : public nsIProfileMigrator
{
public:
NS_DECL_NSIPROFILEMIGRATOR
NS_DECL_ISUPPORTS
nsProfileMigrator() { };
protected:
~nsProfileMigrator() { };
nsresult GetDefaultMailMigratorKey(nsACString& key, nsCOMPtr<nsIMailProfileMigrator>& mailMigrator);
-
- /**
- * Import profiles from ~/.thunderbird/
- * @return PR_TRUE if any profiles imported.
- */
- bool ImportRegistryProfiles(const nsACString& aAppName);
};
--- a/mail/components/migration/src/nsSeamonkeyProfileMigrator.cpp
+++ b/mail/components/migration/src/nsSeamonkeyProfileMigrator.cpp
@@ -298,24 +298,17 @@ nsSeamonkeyProfileMigrator::FillProfileD
nsCOMPtr<nsILocalFile> newSmDataLocal(do_QueryInterface(newSeamonkeyData));
NS_ENSURE_TRUE(newSmDataLocal, NS_ERROR_FAILURE);
nsresult rv = GetProfileDataFromProfilesIni(newSmDataLocal,
mProfileNames,
mProfileLocations);
- if (rv != NS_ERROR_FILE_NOT_FOUND)
- return rv;
-
- seamonkeyData->Append(NS_LITERAL_STRING(OLD_FOLDER));
- seamonkeyData->Append(NS_LITERAL_STRING(REGISTRY_FILE));
-
- return GetProfileDataFromRegistry(seamonkeyData, mProfileNames,
- mProfileLocations);
+ return rv;
}
static
nsSeamonkeyProfileMigrator::PrefTransform gTransforms[] = {
MAKESAMETYPEPREFTRANSFORM("signon.SignonFileName", String),
MAKESAMETYPEPREFTRANSFORM("mailnews.headers.showUserAgent", Bool),
--- a/mail/installer/package-manifest.in
+++ b/mail/installer/package-manifest.in
@@ -146,17 +146,16 @@
@BINPATH@/components/msgBase.manifest
@BINPATH@/components/msgcompose.xpt
@BINPATH@/components/msgdb.xpt
@BINPATH@/components/msgimap.xpt
@BINPATH@/components/msglocal.xpt
@BINPATH@/components/msgnews.xpt
@BINPATH@/components/msgsearch.xpt
@BINPATH@/components/import.xpt
-@BINPATH@/components/impComm4xMail.xpt
@BINPATH@/components/mailview.xpt
@BINPATH@/components/mailprofilemigration.xpt
@BINPATH@/components/messageWakeupService.js
@BINPATH@/components/messageWakeupService.manifest
@BINPATH@/components/nsActivity.js
@BINPATH@/components/nsActivityManager.js
@BINPATH@/components/nsActivityManagerUI.js
@BINPATH@/components/nsAddrbook.manifest
deleted file mode 100644
--- a/mail/locales/en-US/chrome/messenger/comm4xMailImportMsgs.properties
+++ /dev/null
@@ -1,63 +0,0 @@
-# ***** 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 mozilla.org code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 2002
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-# Srilatha Moturi <srilatha@netscape.com>
-#
-# 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 *****
-
-# LOCALIZATION NOTE (comm4xImportName) : "Communicator 4.x" below is the used for previous versions of Netscape Communicator. Please translate using the brandname in respective languages for Netscape Communicator 4 releases.
-comm4xImportName=Communicator 4.x
-
-# Description of import module
-# LOCALIZATION NOTE : "Communicator 4.x" below is the used for previous versions of Netscape Communicator
-# Please translate using the brandname in respective languages for Netscape Communicator 4 releases.
-## @name COMM4XMAILIMPORT_DESCRIPTION
-## @loc None
-2001=Import Local Mail from Communicator 4.x.
-
-# Success Message
-# LOCALIZATION NOTE : Do not translate the word "%S" below.
-## @name COMM4XMAILIMPORT_MAILBOX_SUCCESS
-## @loc None
-2002=Local messages were successfully imported from %S
-
-# Error Message
-## @name COMM4XMAILIMPORT_MAILBOX_BADPARAM
-## @loc None
-2003=An internal error occurred. Importing failed. Try importing again.
-
-# Error message
-# LOCALIZATION NOTE : Do not translate the word "%S" below.
-## @name COMM4XMAILIMPORT_MAILBOX_CONVERTERROR
-## @loc None
-2004=An error occurred while importing messages from %S. Messages were not imported. Make more disk space available and try again.
--- a/mail/locales/jar.mn
+++ b/mail/locales/jar.mn
@@ -88,17 +88,16 @@
locale/@AB_CD@/messenger/mailViewList.dtd (%chrome/messenger/mailViewList.dtd)
locale/@AB_CD@/messenger/offlineStartup.properties (%chrome/messenger/offlineStartup.properties)
locale/@AB_CD@/messenger/importMsgs.properties (%chrome/messenger/importMsgs.properties)
locale/@AB_CD@/messenger/importDialog.dtd (%chrome/messenger/importDialog.dtd)
locale/@AB_CD@/messenger/fieldMapImport.dtd (%chrome/messenger/fieldMapImport.dtd)
locale/@AB_CD@/messenger/textImportMsgs.properties (%chrome/messenger/textImportMsgs.properties)
locale/@AB_CD@/messenger/vCardImportMsgs.properties (%chrome/messenger/vCardImportMsgs.properties)
locale/@AB_CD@/messenger/appleMailImportMsgs.properties (%chrome/messenger/appleMailImportMsgs.properties)
- locale/@AB_CD@/messenger/comm4xMailImportMsgs.properties (%chrome/messenger/comm4xMailImportMsgs.properties)
locale/@AB_CD@/messenger/eudoraImportMsgs.properties (%chrome/messenger/eudoraImportMsgs.properties)
locale/@AB_CD@/messenger/oeImportMsgs.properties (%chrome/messenger/oeImportMsgs.properties)
locale/@AB_CD@/messenger/wmImportMsgs.properties (%chrome/messenger/wmImportMsgs.properties)
locale/@AB_CD@/messenger/outlookImportMsgs.properties (%chrome/messenger/outlookImportMsgs.properties)
locale/@AB_CD@/messenger/shutdownWindow.properties (%chrome/messenger/shutdownWindow.properties)
locale/@AB_CD@/messenger/featureConfigurator.dtd (%chrome/messenger/featureConfigurator.dtd)
locale/@AB_CD@/messenger/configEditorOverlay.dtd (%chrome/messenger/configEditorOverlay.dtd)
locale/@AB_CD@/messenger/gloda.properties (%chrome/messenger/gloda.properties)
--- a/mailnews/build/Makefile.in
+++ b/mailnews/build/Makefile.in
@@ -85,17 +85,16 @@ SHARED_LIBRARY_LIBS = \
../extensions/mdn/src/$(LIB_PREFIX)msgmdn_s.$(LIB_SUFFIX) \
../mime/cthandlers/vcard/$(LIB_PREFIX)vcard_s.$(LIB_SUFFIX) \
../mime/cthandlers/glue/$(LIB_PREFIX)mimecthglue_s.$(LIB_SUFFIX) \
$(NULL)
ifdef MOZILLA_INTERNAL_API
EXTRA_DSO_LDOPTS = \
$(MOZDEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
- $(MOZDEPTH)/modules/libreg/src/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX) \
$(MOZ_JS_LIBS) \
$(MOZ_UNICHARUTIL_LIBS) \
$(MOZ_COMPONENT_LIBS) \
$(ZLIB_LIBS) \
$(MOZ_ZLIB_LIBS) \
$(NULL)
else
EXTRA_DSO_LDOPTS = \
--- a/mailnews/import/Makefile.in
+++ b/mailnews/import/Makefile.in
@@ -39,17 +39,17 @@ DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = import
-PARALLEL_DIRS = public src text/src vcard/src comm4x/public comm4x/src
+PARALLEL_DIRS = public src text/src vcard/src
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
PARALLEL_DIRS += eudora/src applemail/src
endif
ifeq ($(OS_ARCH),WINNT)
PARALLEL_DIRS += eudora/src
ifndef GNU_CC
--- a/mailnews/import/build/Makefile.in
+++ b/mailnews/import/build/Makefile.in
@@ -56,17 +56,16 @@ endif
MODULE_NAME = nsImportServiceModule
CPPSRCS = nsImportModule.cpp
SHARED_LIBRARY_LIBS = \
../src/$(LIB_PREFIX)import_s.$(LIB_SUFFIX) \
../text/src/$(LIB_PREFIX)imptext_s.$(LIB_SUFFIX) \
../vcard/src/$(LIB_PREFIX)impvcard_s.$(LIB_SUFFIX) \
- ../comm4x/src/$(LIB_PREFIX)imp4mail_s.$(LIB_SUFFIX) \
$(NULL)
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
SHARED_LIBRARY_LIBS += ../eudora/src/$(LIB_PREFIX)impEudra_s.$(LIB_SUFFIX)
SHARED_LIBRARY_LIBS += ../applemail/src/$(LIB_PREFIX)applmail_s.$(LIB_SUFFIX)
endif
ifeq ($(OS_ARCH),WINNT)
@@ -76,17 +75,16 @@ ifndef GNU_CC
SHARED_LIBRARY_LIBS += ../oexpress/$(LIB_PREFIX)importOE_s.$(LIB_SUFFIX)
SHARED_LIBRARY_LIBS += ../outlook/src/$(LIB_PREFIX)impOutlk_s.$(LIB_SUFFIX)
SHARED_LIBRARY_LIBS += ../winlivemail/$(LIB_PREFIX)importWM_s.$(LIB_SUFFIX)
endif
endif
LOCAL_INCLUDES += -I$(srcdir)/../src \
- -I$(srcdir)/../comm4x/src \
-I$(srcdir)/../text/src \
-I$(srcdir)/../vcard/src \
$(NULL)
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
LOCAL_INCLUDES += -I$(srcdir)/../eudora/src \
-I$(srcdir)/../applemail/src \
$(NULL)
@@ -104,29 +102,27 @@ endif
EXTRA_DSO_LDOPTS += ../../base/util/$(LIB_PREFIX)msgbsutl_s.$(LIB_SUFFIX)
ifdef MOZILLA_INTERNAL_API
EXTRA_DSO_LDOPTS += \
$(LIBS_DIR) \
$(EXTRA_DSO_LIBS) \
$(MOZ_UNICHARUTIL_LIBS) \
- $(MOZDEPTH)/modules/libreg/src/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX) \
$(MOZ_COMPONENT_LIBS) \
$(NULL)
else
EXTRA_DSO_LDOPTS += \
$(LIBS_DIR) \
$(ZLIB_LIBS) \
$(MOZ_ZLIB_LIBS) \
$(MOZ_JS_LIBS) \
$(XPCOM_GLUE_LDOPTS) \
$(call EXPAND_LIBNAME_PATH,unicharutil_external_s,$(LIBXUL_DIST)/lib) \
$(MOZDEPTH)/rdf/util/src/$(LIB_PREFIX)rdfutil_external_s.$(LIB_SUFFIX) \
- $(MOZDEPTH)/modules/libreg/src/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX) \
$(NSPR_LIBS) \
$(NULL)
endif
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
EXTRA_DSO_LDOPTS += \
-framework Cocoa \
$(TK_LIBS) \
--- a/mailnews/import/build/nsImportModule.cpp
+++ b/mailnews/import/build/nsImportModule.cpp
@@ -60,26 +60,16 @@ NS_DEFINE_NAMED_CID(NS_TEXTIMPORT_CID);
////////////////////////////////////////////////////////////////////////////////
// vCard import Include Files
////////////////////////////////////////////////////////////////////////////////
#include "nsVCardImport.h"
NS_DEFINE_NAMED_CID(NS_VCARDIMPORT_CID);
////////////////////////////////////////////////////////////////////////////////
-// nsComm4x import Include Files
-////////////////////////////////////////////////////////////////////////////////
-#include "nsComm4xProfile.h"
-#include "nsComm4xMailStringBundle.h"
-#include "nsComm4xMailImport.h"
-
-NS_DEFINE_NAMED_CID(NS_COMM4XMAILIMPORT_CID);
-NS_DEFINE_NAMED_CID(NS_ICOMM4XPROFILE_CID);
-NS_DEFINE_NAMED_CID(NS_COMM4XMAILIMPL_CID);
-////////////////////////////////////////////////////////////////////////////////
// eudora import Include Files
////////////////////////////////////////////////////////////////////////////////
#if defined(XP_WIN) || defined(XP_MACOSX)
#include "nsEudoraImport.h"
#include "nsEudoraStringBundle.h"
NS_DEFINE_NAMED_CID(NS_EUDORAIMPORT_CID);
#endif
@@ -122,23 +112,16 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsIImport
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTextImport)
////////////////////////////////////////////////////////////////////////////////
// vcard import factories
////////////////////////////////////////////////////////////////////////////////
NS_GENERIC_FACTORY_CONSTRUCTOR(nsVCardImport)
////////////////////////////////////////////////////////////////////////////////
-// nsComm4x import factories
-////////////////////////////////////////////////////////////////////////////////
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsComm4xMailImport)
-NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(ImportComm4xMailImpl, Initialize)
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsComm4xProfile)
-
-////////////////////////////////////////////////////////////////////////////////
// eudora import factories
////////////////////////////////////////////////////////////////////////////////
#if defined(XP_WIN) || defined(XP_MACOSX)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsEudoraImport)
#endif
////////////////////////////////////////////////////////////////////////////////
// apple mail import factories
@@ -157,17 +140,16 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsOutlook
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWMImport)
#endif // XP_WIN
static const mozilla::Module::CategoryEntry kMailNewsImportCategories[] = {
// XXX These CIDs should match the explicit CIDs defined in the header files,
// or be changed so that they are contract IDs (with appropriate code updates)
{ "mailnewsimport", "{A5991D01-ADA7-11d3-A9C2-00A0CC26DA63}", NS_IMPORT_ADDRESS_STR },
{ "mailnewsimport", "{0eb034a3-964a-4e2f-92eb-cc55d9ae9dd2}", NS_IMPORT_ADDRESS_STR },
- { "mailnewsimport", "{647cc990-2bdb-11d6-92a0-0010a4b26cda}", kComm4xMailSupportsString},
#if defined(XP_WIN) || defined(XP_MACOSX)
{ "mailnewsimport", "{c8448da0-8f83-11d3-a206-00a0cc26da63}", kEudoraSupportsString },
#endif
#ifdef XP_WIN
{ "mailnewsimport", "{42bc82bc-8e9f-4597-8b6e-e529daaf3af1}", kWMSupportsString },
{ "mailnewsimport", "{1DB469A0-8B00-11d3-A206-00A0CC26DA63}", kOutlookSupportsString },
{ "mailnewsimport", "{be0bc880-1742-11d3-a206-00a0cc26da63}", kOESupportsString },
#endif
@@ -177,19 +159,16 @@ static const mozilla::Module::CategoryEn
{ NULL }
};
const mozilla::Module::CIDEntry kMailNewsImportCIDs[] = {
{ &kNS_IMPORTSERVICE_CID, false, NULL, nsImportServiceConstructor },
{ &kNS_IMPORTMIMEENCODE_CID, false, NULL, nsIImportMimeEncodeImplConstructor },
{ &kNS_TEXTIMPORT_CID, false, NULL, nsTextImportConstructor },
{ &kNS_VCARDIMPORT_CID, false, NULL, nsVCardImportConstructor },
- { &kNS_COMM4XMAILIMPORT_CID, false, NULL, nsComm4xMailImportConstructor },
- { &kNS_COMM4XMAILIMPL_CID, false, NULL, ImportComm4xMailImplConstructor },
- { &kNS_ICOMM4XPROFILE_CID, false, NULL, nsComm4xProfileConstructor },
#if defined(XP_WIN) || defined(XP_MACOSX)
{ &kNS_EUDORAIMPORT_CID, false, NULL, nsEudoraImportConstructor },
#endif
#if defined(XP_MACOSX)
{ &kNS_APPLEMAILIMPORT_CID, false, NULL, nsAppleMailImportModuleConstructor },
{ &kNS_APPLEMAILIMPL_CID, false, NULL, nsAppleMailImportMailConstructor },
#endif
@@ -201,19 +180,16 @@ const mozilla::Module::CIDEntry kMailNew
{ NULL }
};
const mozilla::Module::ContractIDEntry kMailNewsImportContracts[] = {
{ NS_IMPORTSERVICE_CONTRACTID, &kNS_IMPORTSERVICE_CID },
{ "@mozilla.org/import/import-mimeencode;1", &kNS_IMPORTMIMEENCODE_CID },
{ "@mozilla.org/import/import-text;1", &kNS_TEXTIMPORT_CID },
{ "@mozilla.org/import/import-vcard;1", &kNS_VCARDIMPORT_CID },
- { "@mozilla.org/import/import-comm4xMail;1", &kNS_COMM4XMAILIMPORT_CID },
- { NS_COMM4XMAILIMPL_CONTRACTID, &kNS_COMM4XMAILIMPL_CID },
- { NS_ICOMM4XPROFILE_CONTRACTID, &kNS_ICOMM4XPROFILE_CID },
#if defined(XP_WIN) || defined(XP_MACOSX)
{ "@mozilla.org/import/import-eudora;1", &kNS_EUDORAIMPORT_CID },
#endif
#if defined(XP_MACOSX)
{ "@mozilla.org/import/import-applemail;1", &kNS_APPLEMAILIMPORT_CID },
{ NS_APPLEMAILIMPL_CONTRACTID, &kNS_APPLEMAILIMPL_CID },
#endif
deleted file mode 100644
--- a/mailnews/import/comm4x/public/Makefile.in
+++ /dev/null
@@ -1,51 +0,0 @@
-# ***** 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 mozilla.org code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 2002
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-# Srilatha Moturi <srilatha@netscape.com>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either of 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 *****
-
-DEPTH = ../../../..
-topsrcdir = @top_srcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE = impComm4xMail
-
-XPIDLSRCS = \
- nsIComm4xProfile.idl \
- $(NULL)
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/mailnews/import/comm4x/public/nsIComm4xProfile.idl
+++ /dev/null
@@ -1,63 +0,0 @@
-/* ***** 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 mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2002
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Srilatha Moturi <srilatha@netscape.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of 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 "nsISupports.idl"
-#include "nsILocalFile.idl"
-
-/**
- * This interface provides support for getting 4.x profile information
- * This interface can be used to get the existing 4.x profiles
- * and for getting the mail directory for the profile.
- *
- */
-[scriptable, uuid(c66c1060-2bdc-11d6-92a0-0010a4b26cda)]
-interface nsIComm4xProfile: nsISupports {
- /**
- * Parses the 4.x registry file and returns a list of profiles.
- */
-
- void getProfileList(out unsigned long length, [array, size_is(length), retval] out wstring selectList);
-
- /**
- * Searches the preferences file of the given profile for the pref mail.directory
- * If the pref does not exist it, returns the default value.
- * @param profileName name of the profile in the profiles array
- * @return The path to the mail directory for the profile with the name profileName
- *
- */
- wstring getMailDir(in wstring profileName);
-};
deleted file mode 100644
--- a/mailnews/import/comm4x/src/Comm4xMailDebugLog.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* ***** 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 mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2002
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Srilatha Moturi <srilatha@netscape.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of 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 ***** */
-
-#ifndef Comm4xMailDebugLog_h___
-#define Comm4xMailDebugLog_h___
-
-// Use PR_LOG for logging.
-#include "prlog.h"
-extern PRLogModuleInfo *COMM4XLOGMODULE;
-
-#define IMPORT_LOG0(x) PR_LOG(COMM4XLOGMODULE, PR_LOG_DEBUG, (x))
-#define IMPORT_LOG1(x, y) PR_LOG(COMM4XLOGMODULE, PR_LOG_DEBUG, (x, y))
-#define IMPORT_LOG2(x, y, z) PR_LOG(COMM4XLOGMODULE, PR_LOG_DEBUG, (x, y, z))
-#define IMPORT_LOG3(a, b, c, d) PR_LOG(COMM4XLOGMODULE, PR_LOG_DEBUG, (a, b, c, d))
-
-#endif /* Comm4xMailDebugLog_h___ */
deleted file mode 100644
--- a/mailnews/import/comm4x/src/Makefile.in
+++ /dev/null
@@ -1,61 +0,0 @@
-# ***** 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 mozilla.org code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 2002
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-# Srilatha Moturi <srilatha@netscape.com>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either of 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 *****
-
-DEPTH = ../../../..
-topsrcdir = @top_srcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE = impComm4xMail
-LIBRARY_NAME = imp4mail_s
-ifndef MOZ_INCOMPLETE_EXTERNAL_LINKAGE
-MOZILLA_INTERNAL_API = 1
-LIBXUL_LIBRARY = 1
-endif
-
-CPPSRCS = \
- nsComm4xMailImport.cpp \
- nsComm4xMail.cpp \
- nsComm4xProfile.cpp \
- $(NULL)
-
-# we don't want the shared lib, but we want to force the creation of a static lib.
-FORCE_STATIC_LIB = 1
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/mailnews/import/comm4x/src/nsComm4xMail.cpp
+++ /dev/null
@@ -1,202 +0,0 @@
-/* ***** 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 mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2002
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Srilatha Moturi <srilatha@netscape.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of 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 "nsCOMPtr.h"
-#include "nsIServiceManager.h"
-#include "nsMsgBaseCID.h"
-#include "nsMsgI18N.h"
-#include "nsComm4xMail.h"
-#include "nsIImportService.h"
-#include "nsIImportMailboxDescriptor.h"
-#include "nsComm4xMailStringBundle.h"
-#include "nsComm4xMailImport.h"
-#include "nsUnicharUtils.h"
-#include "Comm4xMailDebugLog.h"
-#include "prmem.h"
-#include "nsNativeCharsetUtils.h"
-#include "nsServiceManagerUtils.h"
-#include "nsComponentManagerUtils.h"
-#include "nsMsgUtils.h"
-
-#define kCopyBufferSize 8192
-#define kMailReadBufferSize 16384
-
-
-static bool
-nsShouldIgnoreFile(nsString& name)
-{
- PRUnichar firstChar=name.CharAt(0);
- if (firstChar == '.' || firstChar == '#' || name.CharAt(name.Length() - 1) == '~')
- return PR_TRUE;
-
- if (name.LowerCaseEqualsLiteral("rules.dat") || name.LowerCaseEqualsLiteral("rulesbackup.dat"))
- return PR_TRUE;
-
-
- // don't add summary files to the list of folders;
- // don't add popstate files to the list either, or rules (sort.dat).
- if (StringEndsWith(name, NS_LITERAL_STRING(".snm")) ||
- name.LowerCaseEqualsLiteral("popstate.dat") ||
- name.LowerCaseEqualsLiteral("sort.dat") ||
- name.LowerCaseEqualsLiteral("mailfilt.log") ||
- name.LowerCaseEqualsLiteral("filters.js") ||
- StringEndsWith(name, NS_LITERAL_STRING(".toc")) ||
- StringEndsWith(name, NS_LITERAL_STRING(".sbd")))
- return PR_TRUE;
-
- return PR_FALSE;
-}
-
-nsComm4xMail::nsComm4xMail()
-{
-}
-
-nsComm4xMail::~nsComm4xMail()
-{
-}
-
-nsresult nsComm4xMail::FindMailboxes(nsIFile *pRoot, nsISupportsArray **ppArray)
-{
- nsresult rv = NS_NewISupportsArray(ppArray);
- if (NS_FAILED(rv)) {
- IMPORT_LOG0("FAILED to allocate the nsISupportsArray\n");
- return rv;
- }
-
- nsCOMPtr<nsIImportService> impSvc(do_GetService(NS_IMPORTSERVICE_CONTRACTID, &rv));
- if (NS_FAILED(rv))
- return rv;
-
- m_depth = 0;
-
- return (ScanMailDir(pRoot, *ppArray, impSvc));
-}
-
-
-nsresult nsComm4xMail::ScanMailDir(nsIFile *pFolder, nsISupportsArray *pArray, nsIImportService *pImport)
-{
-
- m_depth++;
- nsresult rv = IterateMailDir(pFolder, pArray, pImport);
- m_depth--;
-
- return rv;
-}
-
-nsresult nsComm4xMail::IterateMailDir(nsIFile *pFolder, nsISupportsArray *pArray, nsIImportService *pImport)
-{
- nsCOMPtr<nsISimpleEnumerator> directoryEnumerator;
- nsresult rv = pFolder->GetDirectoryEntries(getter_AddRefs(directoryEnumerator));
- NS_ENSURE_SUCCESS(rv, rv);
-
- bool hasMore;
- directoryEnumerator->HasMoreElements(&hasMore);
- while (hasMore && NS_SUCCEEDED(rv))
- {
- nsCOMPtr<nsISupports> aSupport;
- rv = directoryEnumerator->GetNext(getter_AddRefs(aSupport));
- nsCOMPtr<nsILocalFile> currentFolderPath(do_QueryInterface(aSupport, &rv));
- directoryEnumerator->HasMoreElements(&hasMore);
-
- bool isFile;
- nsCString pName;
- nsCString dirName;
- nsAutoString currentFolderNameStr;
- bool isDirectory, exists;
- nsAutoString ext;
-
-
- rv = currentFolderPath->GetLeafName(currentFolderNameStr);
- isFile = PR_FALSE;
- currentFolderPath->IsFile(&isFile);
- if (isFile)
- {
- if (!nsShouldIgnoreFile(currentFolderNameStr))
- {
- rv = FoundMailbox(currentFolderPath, ¤tFolderNameStr, pArray, pImport);
- if (NS_FAILED(rv))
- return rv;
- currentFolderNameStr.AppendLiteral(".sbd");
- rv = currentFolderPath->SetLeafName(currentFolderNameStr);
- if (NS_FAILED(rv))
- return rv;
- exists = PR_FALSE;
- currentFolderPath->Exists(&exists);
- isDirectory = PR_FALSE;
- currentFolderPath->IsDirectory(&isDirectory);
- if (exists && isDirectory) {
- rv = ScanMailDir (currentFolderPath, pArray, pImport);
- if (NS_FAILED(rv))
- return rv;
- }
- }
- }
- }
- return rv;
-}
-
-nsresult nsComm4xMail::FoundMailbox(nsIFile *mailFile, nsAutoString *pName, nsISupportsArray *pArray, nsIImportService *pImport)
-{
- nsCOMPtr<nsIImportMailboxDescriptor> desc;
-
- nsCString pPath;
- mailFile->GetNativePath(pPath);
- if (!pPath.IsEmpty())
- IMPORT_LOG2("Found comm4x mailbox: %s, m_depth = %d\n", pPath.get(), m_depth);
- else
- IMPORT_LOG2("Can't get native path but found comm4x mailbox: %s, m_depth = %d\n", NS_ConvertUTF16toUTF8(*pName).get(), m_depth);
-
- nsresult rv = pImport->CreateNewMailboxDescriptor(getter_AddRefs(desc));
- if (NS_SUCCEEDED(rv)) {
- PRInt64 sz = 0;
- mailFile->GetFileSize(&sz);
- desc->SetDisplayName(pName->get());
- desc->SetDepth(m_depth);
- desc->SetSize((PRUint32) sz);
- nsCOMPtr <nsILocalFile> pFile;
- desc->GetFile(getter_AddRefs(pFile));
- if (pFile) {
- nsCOMPtr <nsILocalFile> localMailFile = do_QueryInterface(mailFile);
- pFile->InitWithFile(localMailFile);
- }
- nsCOMPtr <nsISupports> pInterface = do_QueryInterface(desc);
- if (pInterface)
- pArray->AppendElement(pInterface);
- }
- return NS_OK;
-}
-
deleted file mode 100644
--- a/mailnews/import/comm4x/src/nsComm4xMail.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ***** 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 mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2002
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Srilatha Moturi <srilatha@netscape.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of 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 ***** */
-#ifndef nsComm4xMail_h__
-#define nsComm4xMail_h__
-
-#include "nscore.h"
-#include "nsStringGlue.h"
-#include "nsILocalFile.h"
-#include "nsISupportsArray.h"
-
-class nsIImportService;
-class nsIMsgAccountManager;
-class nsIMsgAccount;
-
-
-class nsComm4xMail {
-public:
- nsComm4xMail();
- virtual ~nsComm4xMail();
-
- // get the list of mailboxes
- virtual nsresult FindMailboxes(nsIFile *pRoot, nsISupportsArray **ppArray);
-
-private:
- nsresult ScanMailDir(nsIFile *pFolder, nsISupportsArray *pArray, nsIImportService *pImport);
- nsresult IterateMailDir(nsIFile *pFolder, nsISupportsArray *pArray, nsIImportService *pImport);
- nsresult FoundMailbox(nsIFile *mailFile, nsAutoString *pName, nsISupportsArray *pArray, nsIImportService *pImport);
-
-private:
- PRUint32 m_depth;
-};
-
-
-#endif /* nsComm4xMail_h__ */
-
deleted file mode 100644
--- a/mailnews/import/comm4x/src/nsComm4xMailImport.cpp
+++ /dev/null
@@ -1,352 +0,0 @@
-/* ***** 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 mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2002
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Srilatha Moturi <srilatha@netscape.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of 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 ***** */
-
-
-/*
-
- Comm4xMail import mail interface
-
-*/
-#ifdef MOZ_LOGGING
-// sorry, this has to be before the pre-compiled header
-#define FORCE_PR_LOG /* Allow logging in the release build */
-#endif
-
-#include "nscore.h"
-#include "nsStringGlue.h"
-#include "nsCOMPtr.h"
-#include "nsIServiceManager.h"
-#include "nsIImportService.h"
-#include "nsIComponentManager.h"
-#include "nsComm4xMailImport.h"
-#include "nsIMemory.h"
-#include "nsXPCOM.h"
-#include "nsISupportsPrimitives.h"
-#include "nsIImportService.h"
-#include "nsIImportMailboxDescriptor.h"
-#include "nsIImportGeneric.h"
-#include "nsIImportFieldMap.h"
-#include "nsIOutputStream.h"
-#include "nsTextFormatter.h"
-#include "nsComm4xMailStringBundle.h"
-#include "nsIStringBundle.h"
-#include "Comm4xMailDebugLog.h"
-#include "nsServiceManagerUtils.h"
-#include "nsDirectoryServiceDefs.h"
-#include "nsComponentManagerUtils.h"
-
-#define COMM4XMAIL_MSGS_URL "chrome://messenger/locale/comm4xMailImportMsgs.properties"
-
-PRLogModuleInfo *COMM4XLOGMODULE = nsnull;
-
-////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////
-
-
-nsComm4xMailImport::nsComm4xMailImport()
-{
- // Init logging module.
- if (!COMM4XLOGMODULE)
- COMM4XLOGMODULE = PR_NewLogModule("IMPORT");
-
- IMPORT_LOG0("nsComm4xMailImport Module Created\n");
-
- nsCOMPtr <nsIStringBundleService> pBundleService;
- nsresult rv;
-
- m_pBundle = nsnull;
-
- pBundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
- if (NS_SUCCEEDED(rv) && (pBundleService))
- pBundleService->CreateBundle(COMM4XMAIL_MSGS_URL, getter_AddRefs(m_pBundle));
-}
-
-
-nsComm4xMailImport::~nsComm4xMailImport()
-{
-
- IMPORT_LOG0("nsComm4xMailImport Module Deleted\n");
-
-}
-
-
-
-NS_IMPL_THREADSAFE_ISUPPORTS1(nsComm4xMailImport, nsIImportModule)
-
-
-NS_IMETHODIMP nsComm4xMailImport::GetName(PRUnichar **name)
-{
- NS_ENSURE_ARG_POINTER(name);
- if (m_pBundle)
- return m_pBundle->GetStringFromName(NS_LITERAL_STRING(COMM4XMAILIMPORT_NAME).get(),
- name);
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP nsComm4xMailImport::GetDescription(PRUnichar **name)
-{
- NS_ENSURE_ARG_POINTER (name);
- nsresult rv = NS_ERROR_FAILURE;
- if (m_pBundle)
- rv = m_pBundle->GetStringFromID(COMM4XMAILIMPORT_DESCRIPTION, name);
- return rv;
-}
-
-NS_IMETHODIMP nsComm4xMailImport::GetSupports(char **supports)
-{
- NS_ENSURE_ARG_POINTER (supports);
- *supports = strdup(kComm4xMailSupportsString);
- return NS_OK;
-}
-
-NS_IMETHODIMP nsComm4xMailImport::GetSupportsUpgrade(bool *pUpgrade)
-{
- NS_ENSURE_ARG_POINTER (pUpgrade);
- *pUpgrade = PR_FALSE;
- return NS_OK;
-}
-
-
-NS_IMETHODIMP nsComm4xMailImport::GetImportInterface(const char *pImportType, nsISupports **ppInterface)
-{
- NS_ENSURE_ARG_POINTER (pImportType);
- NS_ENSURE_ARG_POINTER (ppInterface);
- *ppInterface = nsnull;
- nsresult rv;
-
- if (!strcmp(pImportType, "mail")) {
- // create the nsIImportMail interface and return it!
- nsCOMPtr <nsIImportMail> pMail = do_CreateInstance(NS_COMM4XMAILIMPL_CONTRACTID, &rv);
- if (NS_SUCCEEDED(rv)) {
- nsCOMPtr <nsIImportGeneric> pGeneric;
- nsCOMPtr<nsIImportService> impSvc(do_GetService(NS_IMPORTSERVICE_CONTRACTID, &rv));
- if (NS_SUCCEEDED(rv)) {
- rv = impSvc->CreateNewGenericMail(getter_AddRefs(pGeneric));
- if (NS_SUCCEEDED(rv)) {
- pGeneric->SetData("mailInterface", pMail);
- nsString name;
- rv = GetName(getter_Copies(name));
- NS_ENSURE_SUCCESS(rv, rv);
-
- nsCOMPtr<nsISupportsString> nameString (do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv));
- NS_ENSURE_SUCCESS(rv,rv);
- nameString->SetData(name);
- pGeneric->SetData("name", nameString);
- rv = CallQueryInterface(pGeneric, ppInterface);
- }
- }
- }
- return rv;
- }
-
- return NS_ERROR_NOT_AVAILABLE;
-}
-
-/////////////////////////////////////////////////////////////////////////////////
-
-ImportComm4xMailImpl::ImportComm4xMailImpl()
-{
-}
-
-nsresult ImportComm4xMailImpl::Initialize()
-{
- nsCOMPtr<nsIStringBundleService> pBundleService;
- nsresult rv;
-
- pBundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
- NS_ENSURE_SUCCESS(rv, rv);
- return pBundleService->CreateBundle(COMM4XMAIL_MSGS_URL, getter_AddRefs(m_pBundle));
-}
-
-ImportComm4xMailImpl::~ImportComm4xMailImpl()
-{
-}
-
-
-
-NS_IMPL_THREADSAFE_ISUPPORTS1(ImportComm4xMailImpl, nsIImportMail)
-
-NS_IMETHODIMP ImportComm4xMailImpl::GetDefaultLocation(nsIFile **ppLoc, bool *found, bool *userVerify)
-{
- NS_ENSURE_ARG_POINTER(found);
- NS_ENSURE_ARG_POINTER(ppLoc);
- NS_ENSURE_ARG_POINTER(userVerify);
-
- *ppLoc = nsnull;
- *found = PR_FALSE;
- *userVerify = PR_TRUE;
- return NS_OK;
-}
-
-
-NS_IMETHODIMP ImportComm4xMailImpl::FindMailboxes(nsIFile *pLoc, nsISupportsArray **ppArray)
-{
- NS_ENSURE_ARG_POINTER(pLoc);
- NS_ENSURE_ARG_POINTER(ppArray);
-
- bool exists = false;
- nsresult rv = pLoc->Exists(&exists);
- if (NS_FAILED(rv) || !exists)
- return NS_ERROR_FAILURE;
-
- // find mail boxes
- rv = m_mail.FindMailboxes(pLoc, ppArray);
-
- if (NS_FAILED(rv) && *ppArray) {
- NS_RELEASE(*ppArray);
- *ppArray = nsnull;
- }
-
- return rv;
-}
-
-void ImportComm4xMailImpl::ReportStatus( PRInt32 errorNum, nsString& name, nsString *pStream)
-{
- if (!pStream) return;
- nsString statusStr;
- const PRUnichar * fmtStr = name.get();
- nsresult rv = m_pBundle->FormatStringFromID(errorNum, &fmtStr, 1, getter_Copies(statusStr));
- if (NS_SUCCEEDED (rv)) {
- pStream->Append (statusStr.get());
- pStream->Append( PRUnichar('\n'));
- }
-
-}
-
-void ImportComm4xMailImpl::SetLogs(nsString& success, nsString& error, PRUnichar **pError, PRUnichar **pSuccess)
-{
- if (pError)
- *pError = ToNewUnicode(error);
- if (pSuccess)
- *pSuccess = ToNewUnicode(success);
-}
-
-NS_IMETHODIMP ImportComm4xMailImpl::ImportMailbox(nsIImportMailboxDescriptor *pSource,
- nsIFile *pDestination,
- PRUnichar **pErrorLog,
- PRUnichar **pSuccessLog,
- bool *fatalError)
-{
- NS_PRECONDITION(pSource != nsnull, "null ptr");
- NS_PRECONDITION(pDestination != nsnull, "null ptr");
- NS_PRECONDITION(fatalError != nsnull, "null ptr");
-
- nsString success;
- nsString error;
- if (!pSource || !pDestination || !fatalError) {
- nsString errorString;
- m_pBundle->GetStringFromID(COMM4XMAILIMPORT_MAILBOX_BADPARAM, getter_Copies(errorString));
- error = errorString;
- if (fatalError)
- *fatalError = PR_TRUE;
- SetLogs(success, error, pErrorLog, pSuccessLog);
- return NS_ERROR_NULL_POINTER;
- }
-
- nsString name;
- PRUnichar * pName;
- if (NS_SUCCEEDED(pSource->GetDisplayName(&pName))) {
- name.Adopt(pName);
- }
-
- PRUint32 mailSize = 0;
- pSource->GetSize(&mailSize);
- if (mailSize == 0) {
- ReportStatus(COMM4XMAILIMPORT_MAILBOX_SUCCESS, name, &success);
- SetLogs(success, error, pErrorLog, pSuccessLog);
- return NS_OK;
- }
-
- PRUint32 index = 0;
- pSource->GetIdentifier(&index);
- nsresult rv = NS_OK;
-
- m_bytesDone = 0;
-
- // copy files from 4.x to here.
- nsCOMPtr <nsILocalFile> inFile;
- if (NS_FAILED(pSource->GetFile(getter_AddRefs(inFile)))) {
- ReportStatus(COMM4XMAILIMPORT_MAILBOX_CONVERTERROR, name, &error);
- SetLogs(success, error, pErrorLog, pSuccessLog);
- return NS_ERROR_FAILURE;
- }
-
- nsCString pSrcPath, pDestPath;;
- inFile->GetNativePath(pSrcPath);
- pDestination ->GetNativePath(pDestPath);
- IMPORT_LOG2("ImportComm4xMailImpl::ImportMailbox: Copying folder from '%s' to '%s'.", pSrcPath.get(), pDestPath.get());
-
- nsCOMPtr <nsIFile> parent;
- if (NS_FAILED (pDestination->GetParent(getter_AddRefs(parent))))
- {
- ReportStatus( COMM4XMAILIMPORT_MAILBOX_CONVERTERROR, name, &error);
- SetLogs( success, error, pErrorLog, pSuccessLog);
- return( NS_ERROR_FAILURE);
- }
- bool exists = false;
- pDestination->Exists(&exists);
- if (exists)
- rv = pDestination->Remove(PR_FALSE);
- rv = inFile->CopyTo(parent, EmptyString());
-
- if (NS_SUCCEEDED(rv)) {
- m_bytesDone = mailSize;
- ReportStatus(COMM4XMAILIMPORT_MAILBOX_SUCCESS, name, &success);
- }
- else {
- ReportStatus(COMM4XMAILIMPORT_MAILBOX_CONVERTERROR, name, &error);
- }
-
- SetLogs(success, error, pErrorLog, pSuccessLog);
-
- return rv;
-}
-
-
-NS_IMETHODIMP ImportComm4xMailImpl::GetImportProgress(PRUint32 *pDoneSoFar)
-{
- NS_ENSURE_ARG_POINTER(pDoneSoFar);
-
- *pDoneSoFar = m_bytesDone;
- return NS_OK;
-}
-
-NS_IMETHODIMP ImportComm4xMailImpl::TranslateFolderName(const nsAString & aFolderName, nsAString & _retval)
-{
- _retval = aFolderName;
- return NS_OK;
-}
deleted file mode 100644
--- a/mailnews/import/comm4x/src/nsComm4xMailImport.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/* ***** 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 mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2002
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Srilatha Moturi <srilatha@netscape.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of 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 ***** */
-
-#ifndef nsComm4xMailImport_h___
-#define nsComm4xMailImport_h___
-
-#include "nsIImportModule.h"
-#include "nsCOMPtr.h"
-#include "nsIStringBundle.h"
-#include "nsIImportMail.h"
-#include "nsISupportsArray.h"
-#include "nsIFile.h"
-#include "nsComm4xMail.h"
-
-//{7792e9e0-412a-11d6-92bf-0010a4b26cda}
-#define NS_COMM4XMAILIMPL_CID \
-{ 0x7792e9e0, 0x412a, 0x11d6, { 0x92, 0xbf, 0x0, 0x10, 0xa4, 0xb2, 0x6c, 0xda } }
-#define NS_COMM4XMAILIMPL_CONTRACTID "@mozilla.org/import/import-comm4xMailImpl;1"
-// {647cc990-2bdb-11d6-92a0-0010a4b26cda}
-#define NS_COMM4XMAILIMPORT_CID \
-{ 0x647ff990, 0x2bdb, 0x11d6, { 0x92, 0xa0, 0x0, 0x10, 0xa4, 0xb2, 0x6c, 0xda } }
-
-#define kComm4xMailSupportsString NS_IMPORT_MAIL_STR
-
-class nsComm4xMailImport : public nsIImportModule
-{
-public:
-
- nsComm4xMailImport();
- virtual ~nsComm4xMailImport();
-
- NS_DECL_ISUPPORTS
-
- ////////////////////////////////////////////////////////////////////////////////////////
- // we suppport the nsIImportModule interface
- ////////////////////////////////////////////////////////////////////////////////////////
-
- NS_DECL_NSIIMPORTMODULE
-
-protected:
- nsCOMPtr<nsIStringBundle> m_pBundle;
-};
-
-class ImportComm4xMailImpl : public nsIImportMail
-{
-public:
- ImportComm4xMailImpl();
- virtual ~ImportComm4xMailImpl();
-
- // nsISupports interface
- NS_DECL_ISUPPORTS
-
- // nsIImportMail interface
-
- /* void GetDefaultLocation (out nsIFile location, out boolean found, out boolean userVerify); */
- NS_IMETHOD GetDefaultLocation(nsIFile **location, bool *found, bool *userVerify);
-
- /* nsISupportsArray FindMailboxes (in nsIFile location); */
- NS_IMETHOD FindMailboxes(nsIFile *location, nsISupportsArray **_retval);
-
- /* void ImportMailbox (in nsIImportMailboxDescriptor source, in nsIFile destination, out boolean fatalError); */
- NS_IMETHOD ImportMailbox(nsIImportMailboxDescriptor *source, nsIFile *destination,
- PRUnichar **pErrorLog, PRUnichar **pSuccessLog, bool *fatalError);
-
- /* unsigned long GetImportProgress (); */
- NS_IMETHOD GetImportProgress(PRUint32 *_retval);
-
- NS_IMETHOD TranslateFolderName(const nsAString & aFolderName, nsAString & _retval);
-
-public:
- static void SetLogs(nsString& success, nsString& error, PRUnichar **pError, PRUnichar **pSuccess);
- void ReportStatus(PRInt32 errorNum, nsString& name, nsString *pStream);
- nsresult Initialize();
-
-private:
- nsComm4xMail m_mail;
- PRUint32 m_bytesDone;
- nsCOMPtr<nsIStringBundle> m_pBundle;
-};
-
-
-#endif /* nsComm4xMailImport_h___ */
deleted file mode 100644
--- a/mailnews/import/comm4x/src/nsComm4xMailStringBundle.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* ***** 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 mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2002
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Srilatha Moturi <srilatha@netscape.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of 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 ***** */
-#ifndef nsComm4xMailStringBundle_H__
-#define nsComm4xMailStringBundle_H__
-
-#define COMM4XMAILIMPORT_NAME "comm4xImportName"
-#define COMM4XMAILIMPORT_DESCRIPTION 2001
-#define COMM4XMAILIMPORT_MAILBOX_SUCCESS 2002
-#define COMM4XMAILIMPORT_MAILBOX_BADPARAM 2003
-#define COMM4XMAILIMPORT_MAILBOX_CONVERTERROR 2004
-
-#endif /* nsComm4xMailStringBundle_H__ */
deleted file mode 100644
--- a/mailnews/import/comm4x/src/nsComm4xProfile.cpp
+++ /dev/null
@@ -1,284 +0,0 @@
-/* ***** 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 mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2002
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Srilatha Moturi <srilatha@netscape.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of 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 "nsCOMPtr.h"
-#include "nsComm4xProfile.h"
-#include "nsIFileStreams.h"
-#include "nsILineInputStream.h"
-#include "nsNetCID.h"
-#include "nsDirectoryServiceDefs.h"
-#include "nsDirectoryServiceUtils.h"
-#include "NSReg.h"
-#include "nsComponentManagerUtils.h"
-
-#ifdef XP_UNIX
-#include <limits.h>
-#endif
-
-#if defined(XP_MACOSX)
-#define PREF_FILE_NAME_IN_4x "Netscape Preferences"
-#define OLDREG_NAME "Netscape Registry"
-#define OLDREG_DIR NS_MAC_PREFS_DIR
-#elif defined(XP_UNIX) && !defined(XP_MACOSX)
-#define PREF_FILE_NAME_IN_4x "preferences.js"
-#elif defined(XP_WIN) || defined(XP_OS2)
-#define PREF_FILE_NAME_IN_4x "prefs.js"
-#define OLDREG_NAME "nsreg.dat"
-#ifdef XP_WIN
-#define OLDREG_DIR NS_WIN_WINDOWS_DIR
-#else
-#define OLDREG_DIR NS_OS2_DIR
-#endif
-#else
-/* this will cause a failure at run time, as it should, since we don't know
- how to migrate platforms other than Mac, Windows and UNIX */
-#define PREF_FILE_NAME_IN_4x ""
-#endif
-
-#ifndef MAXPATHLEN
-#ifdef PATH_MAX
-#define MAXPATHLEN PATH_MAX
-#elif defined(_MAX_PATH)
-#define MAXPATHLEN _MAX_PATH
-#elif defined(CCHMAXPATH)
-#define MAXPATHLEN CCHMAXPATH
-#else
-#define MAXPATHLEN 1024
-#endif
-#endif
-
-nsComm4xProfile::nsComm4xProfile()
-{
-}
-
-nsComm4xProfile::~nsComm4xProfile()
-{
-}
-
-NS_IMPL_ISUPPORTS1(nsComm4xProfile, nsIComm4xProfile)
-
-NS_IMETHODIMP
-nsComm4xProfile::GetProfileList(PRUint32 *length, PRUnichar ***profileNames)
-{
-// on win/mac/os2, NS4x uses a registry to determine profile locations
-#if defined(XP_WIN) || defined(XP_MACOSX) || defined(XP_OS2)
- nsresult rv;
-
- nsCOMPtr<nsIFile> regFile;
- rv = NS_GetSpecialDirectory(OLDREG_DIR, getter_AddRefs(regFile));
- NS_ENSURE_SUCCESS(rv, rv);
- regFile->AppendNative(NS_LITERAL_CSTRING(OLDREG_NAME));
-
- nsCAutoString path;
- rv = regFile->GetNativePath(path);
- NS_ENSURE_SUCCESS(rv, rv);
-
- if (NR_StartupRegistry())
- return NS_ERROR_FAILURE;
-
- HREG reg = nsnull;
- if (NR_RegOpen(path.get(), ®)) {
- NR_ShutdownRegistry();
- return NS_ERROR_FAILURE;
- }
-
- PRInt32 numProfileEntries = 0;
- REGENUM enumstate = 0;
- PRInt32 localLength = 0;
-
- char profileName[MAXREGNAMELEN];
- while (!NR_RegEnumSubkeys(reg, ROOTKEY_USERS, &enumstate,
- profileName, MAXREGNAMELEN, REGENUM_CHILDREN))
- numProfileEntries++;
-
- // reset our enumerator
- enumstate = 0;
-
- PRUnichar **outArray, **next;
- next = outArray = (PRUnichar **)NS_Alloc(numProfileEntries * sizeof(PRUnichar *));
- if (!outArray)
- return NS_ERROR_OUT_OF_MEMORY;
-
- while (!NR_RegEnumSubkeys(reg, ROOTKEY_USERS, &enumstate,
- profileName, MAXREGNAMELEN, REGENUM_CHILDREN)) {
- *next = ToNewUnicode(NS_ConvertUTF8toUTF16(profileName));
- next++;
- localLength++;
- }
-
- *profileNames = outArray;
- *length = localLength;
- return NS_OK;
-#else
- return NS_ERROR_FAILURE;
-#endif
-}
-
-#define PREF_NAME "user_pref(\"mail.directory\", \""
-#define PREF_LENGTH 29
-#define PREF_END "\")"
-NS_IMETHODIMP
-nsComm4xProfile::GetMailDir(const PRUnichar *aProfile, PRUnichar **_retval)
-{
- NS_ENSURE_ARG_POINTER(_retval);
- *_retval = nsnull;
-#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_MACOSX)
- nsresult rv;
- nsCOMPtr <nsILocalFile> resolvedLocation = do_CreateInstance("@mozilla.org/file/local;1");
- // on macos, registry entries are UTF8 encoded
- NS_ConvertUTF16toUTF8 profileName(aProfile);
-
- nsCOMPtr<nsIFile> regFile;
- rv = NS_GetSpecialDirectory(OLDREG_DIR, getter_AddRefs(regFile));
- if (NS_FAILED(rv)) return rv;
-
- regFile->AppendNative(NS_LITERAL_CSTRING(OLDREG_NAME));
-
- nsCAutoString path;
- rv = regFile->GetNativePath(path);
- if (NS_FAILED(rv)) return rv;
-
- if (NR_StartupRegistry())
- return NS_ERROR_FAILURE;
-
- HREG reg = nsnull;
- RKEY profile = nsnull;
-
- if (NR_RegOpen(path.get(), ®))
- goto cleanup;
-
- if (NR_RegGetKey(reg, ROOTKEY_USERS, profileName.get(), &profile))
- goto cleanup;
-
- char profilePath[MAXPATHLEN];
- if (NR_RegGetEntryString(reg, profile, "ProfileLocation", profilePath, MAXPATHLEN))
- goto cleanup;
-
- resolvedLocation->InitWithPath(NS_ConvertUTF8toUTF16(profilePath));
- if (resolvedLocation) {
- nsCOMPtr <nsIFile> file;
- rv = resolvedLocation->Clone(getter_AddRefs(file));
- if (NS_FAILED(rv)) return rv;
- nsCOMPtr <nsILocalFile> profileLocation;
- profileLocation = do_QueryInterface(file);
- rv = profileLocation->AppendNative(NS_LITERAL_CSTRING(PREF_FILE_NAME_IN_4x));
- if (NS_FAILED(rv)) return rv;
- bool exists = false;
- rv = profileLocation->Exists(&exists);
- if (NS_FAILED(rv)) return rv;
- if (exists) {
- nsString prefValue;
- rv = GetPrefValue(profileLocation, PREF_NAME, PREF_END, getter_Copies(prefValue));
- if (NS_FAILED(rv)) return rv;
- if (!prefValue.IsEmpty()) {
-#ifdef XP_MACOSX
- rv = profileLocation->SetPersistentDescriptor(NS_ConvertUTF16toUTF8(prefValue));
- if (NS_FAILED(rv)) return rv;
- nsAutoString path;
- rv = profileLocation->GetPath(path);
- if (NS_FAILED(rv)) return rv;
- *_retval = ToNewUnicode(path);
-#else
- *_retval = ToNewUnicode(prefValue);
-#endif
- }
-#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_MACOSX)
- else {
- nsCOMPtr <nsIFile> mailLocation;
- rv = resolvedLocation->Clone(getter_AddRefs(mailLocation));
- if (NS_FAILED(rv)) return rv;
- rv = mailLocation->AppendNative(NS_LITERAL_CSTRING("Mail"));
- if (NS_FAILED(rv)) return rv;
- nsAutoString path;
- rv = mailLocation->GetPath(path);
- if (NS_FAILED(rv)) return rv;
- *_retval = ToNewUnicode(path);
- }
-#endif
- }
- }
-
-cleanup:
- if (reg)
- NR_RegClose(reg);
- NR_ShutdownRegistry();
- return rv;
-#else
- return NS_ERROR_FAILURE;
-#endif
-}
-
-nsresult nsComm4xProfile::GetPrefValue(nsILocalFile *filePath, const char * prefName, const char * prefEnd, PRUnichar ** retval)
-{
- nsString buffer;
- bool more = true;
- nsresult rv;
- nsCOMPtr<nsIFileInputStream> fileStream(do_CreateInstance(NS_LOCALFILEINPUTSTREAM_CONTRACTID, &rv));
- if (NS_FAILED(rv))
- return rv;
- rv = fileStream->Init(filePath, -1, -1, PR_FALSE);
- if (NS_FAILED(rv))
- return rv;
-
- nsCOMPtr<nsILineInputStream> lineStream(do_QueryInterface(fileStream, &rv));
- if (NS_FAILED(rv)) {
- return rv;
- }
- bool found = false;
- PRInt32 offset;
- PRInt32 endOffset;
- while (!found && more) {
- nsCAutoString cLine;
- rv = lineStream->ReadLine(cLine, &more);
- if (NS_FAILED(rv))
- break;
- CopyASCIItoUTF16(cLine, buffer);
- offset = buffer.Find(prefName);
- if (offset != -1) {
- endOffset = buffer.Find(prefEnd);
- if (endOffset != -1) {
- *retval = ToNewUnicode(Substring(buffer, offset + PREF_LENGTH, endOffset - (offset + PREF_LENGTH)));
- found = PR_TRUE;
- break;
- }
- }
- }
-
- fileStream->Close();
- return rv;
-}
-
deleted file mode 100644
--- a/mailnews/import/comm4x/src/nsComm4xProfile.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* ***** 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 mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2002
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Srilatha Moturi <srilatha@netscape.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of 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 ***** */
-
-#ifndef nsComm4xProfile_h__
-#define nsComm4xProfile_h__
-
-#include "nsCOMPtr.h"
-#include "nsISupports.h"
-#include "nsIFile.h"
-#include "nsILocalFile.h"
-#include "nsIComm4xProfile.h"
-#include "nsStringGlue.h"
-
-/* c66c1060-2bdc-11d6-92a0-0010a4b26cda */
-#define NS_ICOMM4XPROFILE_CID \
- { 0xc66c1060, 0x2bdc, 0x11d6, {0x92, 0xa0, 0x0, 0x10, 0xa4, 0xb2, 0x6c, 0xda} }
-#define NS_ICOMM4XPROFILE_CONTRACTID "@mozilla.org/comm4xProfile;1"
-#define NS_ICOMM4XPROFILE_CLASSNAME "Communicator 4.x Profile"
-
-class nsComm4xProfile : public nsIComm4xProfile
-{
-public:
- nsComm4xProfile();
- virtual ~nsComm4xProfile();
- nsresult Get4xProfileInfo(const char *registryName);
- nsresult GetPrefValue(nsILocalFile *filePath, const char * prefName, const char * prefEnd, PRUnichar ** value);
-
- NS_DECL_ISUPPORTS
- NS_DECL_NSICOMM4XPROFILE
-
-};
-
-#endif /* nsComm4xProfile_h__ */
-
--- a/mailnews/import/content/importDialog.js
+++ b/mailnews/import/content/importDialog.js
@@ -646,72 +646,16 @@ function ImportMail( module, success, er
return( false);
}
var loc = mailInterface.GetData( "mailLocation");
if (loc == null) {
// No location found, check to see if we can ask the user.
if (mailInterface.GetStatus( "canUserSetLocation") != 0) {
- if (selectedModuleName ==
- document.getElementById("bundle_comm4xImportMsgs")
- .getString('comm4xImportName'))
- {
- var errorValue = true;
- //open the profile dialog.
- var comm4xprofile = Components.classes["@mozilla.org/comm4xProfile;1"].createInstance();
- if(comm4xprofile != null) {
- comm4xprofile = comm4xprofile.QueryInterface( Components.interfaces.nsIComm4xProfile);
- if(comm4xprofile != null) {
- var length = {value:0};
- var profileList = null;
- try {
- profileList = comm4xprofile.getProfileList(length);
- }
- catch (ex) {}
- if (length.value)
- {
- var selected = {value:0};
- if (length.value == 1)
- {
- errorValue = false;
- }
- else {
- var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
- if (promptService) {
- var clickedOk = false;
- clickedOk = promptService.select(window,
- gImportMsgsBundle.getString('profileTitle'),
- gImportMsgsBundle.getString('profileText'),
- length.value, profileList, selected);
- if (clickedOk) {
- errorValue = false;
- }
- else {
- // users cancel the pick list dialog so just return and
- // don't set error string so that current dialog can stay.
- return( false);
- }
- } // promptService
- }
- if (!errorValue) {
- var profileDir = comm4xprofile.getMailDir(profileList[selected.value]);
- var localfile = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
- localfile.initWithPath(profileDir);
- mailInterface.SetData( "mailLocation", localfile);
- }
- } // profileList
- } // comm4xprofile
- } // comm4xprofile
- if (errorValue) {
- error.data = gImportMsgsBundle.getString('ImportMailNotFound');
- return(false);
- }
- }
- else {
var filePicker = Components.classes["@mozilla.org/filepicker;1"].createInstance();
if (filePicker != null) {
filePicker = filePicker.QueryInterface( Components.interfaces.nsIFilePicker);
if (filePicker != null) {
try {
filePicker.init( top.window, gImportMsgsBundle.getString('ImportSelectMailDir'), Components.interfaces.nsIFilePicker.modeGetFolder);
filePicker.appendFilters( Components.interfaces.nsIFilePicker.filterAll);
filePicker.show();
@@ -728,17 +672,16 @@ function ImportMail( module, success, er
error.data = gImportMsgsBundle.getString('ImportMailNotFound');
return( false);
}
}
else {
error.data = gImportMsgsBundle.getString('ImportMailNotFound');
return( false);
}
- }
}
else {
error.data = gImportMsgsBundle.getString('ImportMailNotFound');
return( false);
}
}
if (mailInterface.WantsProgress()) {
--- a/mailnews/import/content/importDialog.xul
+++ b/mailnews/import/content/importDialog.xul
@@ -56,17 +56,16 @@
#else
style="width: &window.width; !important;"
#endif
title="&importDialog.windowTitle;">
<stringbundle id="bundle_importMsgs" src="chrome://messenger/locale/importMsgs.properties"/>
<stringbundle id="bundle_addressbook" src="chrome://messenger/locale/addressbook/addressBook.properties"/>
<stringbundle id="bundle_vcardImportMsgs" src="chrome://messenger/locale/vCardImportMsgs.properties"/>
- <stringbundle id="bundle_comm4xImportMsgs" src="chrome://messenger/locale/comm4xMailImportMsgs.properties"/>
<script type="application/javascript" src="chrome://messenger/content/importDialog.js"/>
<keyset id="dialogKeys"/>
<hbox class="box-header" id="header"
title="&importTitle.label;"
description="&importShortDesc.label;"/>
--- a/mailnews/makefiles.sh
+++ b/mailnews/makefiles.sh
@@ -84,18 +84,16 @@ mailnews/extensions/smime/public/Makefil
mailnews/extensions/smime/src/Makefile
mailnews/imap/Makefile
mailnews/imap/public/Makefile
mailnews/imap/src/Makefile
mailnews/imap/test/Makefile
mailnews/import/Makefile
mailnews/import/applemail/src/Makefile
mailnews/import/build/Makefile
-mailnews/import/comm4x/public/Makefile
-mailnews/import/comm4x/src/Makefile
mailnews/import/eudora/src/Makefile
mailnews/import/oexpress/Makefile
mailnews/import/outlook/src/Makefile
mailnews/import/public/Makefile
mailnews/import/src/Makefile
mailnews/import/test/Makefile
mailnews/import/text/src/Makefile
mailnews/import/vcard/src/Makefile
--- a/suite/build/Makefile.in
+++ b/suite/build/Makefile.in
@@ -74,17 +74,16 @@ SHARED_LIBRARY_LIBS = \
ifneq (,$(filter windows cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
SHARED_LIBRARY_LIBS += ../shell/src/$(LIB_PREFIX)shellservice_s.$(LIB_SUFFIX)
endif
EXTRA_DSO_LDOPTS += \
$(LIBS_DIR) \
$(EXTRA_DSO_LIBS) \
$(call EXPAND_LIBNAME_PATH,unicharutil_external_s,$(LIBXUL_DIST)/lib) \
- $(LIBXUL_DIST)/../modules/libreg/src/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX) \
$(MOZ_JS_LIBS) \
$(XPCOM_GLUE_LDOPTS) \
$(MOZ_COMPONENT_LIBS) \
$(NULL)
# Mac: Need to link with CoreFoundation for Mac Migrators (PList reading code)
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
--- a/suite/installer/package-manifest.in
+++ b/suite/installer/package-manifest.in
@@ -646,17 +646,16 @@ bin/libfreebl_32int64_3.so
#endif
[mail]
; MailNews component xpts
@BINPATH@/components/addrbook.xpt
@BINPATH@/components/nsAddrbook.manifest
@BINPATH@/components/fts3tok.xpt
@BINPATH@/components/import.xpt
-@BINPATH@/components/impComm4xMail.xpt
@BINPATH@/components/ldapComponents.manifest
@BINPATH@/components/mailview.xpt
@BINPATH@/components/mime.xpt
#ifdef XP_WIN32
@BINPATH@/components/mapihook.xpt
#endif
@BINPATH@/components/msgbase.xpt
@BINPATH@/components/msgBase.manifest
deleted file mode 100644
--- a/suite/locales/en-US/chrome/mailnews/comm4xMailImportMsgs.properties
+++ /dev/null
@@ -1,65 +0,0 @@
-# ***** 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 mozilla.org code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 2002
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-# Srilatha Moturi <srilatha@netscape.com>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either of 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 *****
-
-# LOCALIZATION NOTE (comm4xImportName) : "Communicator 4.x" below is the used for previous versions of Netscape Communicator. Please translate using the brandname in respective languages for Netscape Communicator 4 releases.
-comm4xImportName=Communicator 4.x
-
-# Description of import module
-# LOCALIZATION NOTE : "Communicator 4.x" below is the used for previous versions of Netscape Communicator
-# Please translate using the brandname in respective languages for Netscape Communicator 4 releases.
-## @name COMM4XMAILIMPORT_DESCRIPTION
-## @loc None
-2001=Import Local Mail from Communicator 4.x.
-
-# Success Message
-# LOCALIZATION NOTE : Do not translate the word "%S" below.
-## @name COMM4XMAILIMPORT_MAILBOX_SUCCESS
-## @loc None
-2002=Local messages were successfully imported from %S
-
-# Error Message
-## @name COMM4XMAILIMPORT_MAILBOX_BADPARAM
-## @loc None
-2003=An internal error occurred. Importing failed. Try importing again.
-
-# Error message
-# LOCALIZATION NOTE : Do not translate the word "%S" below.
-## @name COMM4XMAILIMPORT_MAILBOX_CONVERTERROR
-## @loc None
-2004=An error occurred while importing messages from %S. Messages were not imported. Make more disk space available and try again.
-
-
--- a/suite/locales/jar.mn
+++ b/suite/locales/jar.mn
@@ -235,17 +235,16 @@
locale/@AB_CD@/messenger/am-mdn.dtd (%chrome/mailnews/pref/am-mdn.dtd)
locale/@AB_CD@/messenger/am-mdn.properties (%chrome/mailnews/pref/am-mdn.properties)
locale/@AB_CD@/messenger/am-offline.dtd (%chrome/mailnews/pref/am-offline.dtd)
locale/@AB_CD@/messenger/am-serverwithnoidentities.dtd (%chrome/mailnews/pref/am-serverwithnoidentities.dtd)
locale/@AB_CD@/messenger/am-server-advanced.dtd (%chrome/mailnews/pref/am-server-advanced.dtd)
locale/@AB_CD@/messenger/am-server-top.dtd (%chrome/mailnews/pref/am-server-top.dtd)
locale/@AB_CD@/messenger/am-archiveoptions.dtd (%chrome/mailnews/pref/am-archiveoptions.dtd)
locale/@AB_CD@/messenger/appleMailImportMsgs.properties (%chrome/mailnews/appleMailImportMsgs.properties)
- locale/@AB_CD@/messenger/comm4xMailImportMsgs.properties (%chrome/mailnews/comm4xMailImportMsgs.properties)
locale/@AB_CD@/messenger/custom.properties (%chrome/mailnews/custom.properties)
locale/@AB_CD@/messenger/CustomHeaders.dtd (%chrome/mailnews/CustomHeaders.dtd)
locale/@AB_CD@/messenger/eudoraImportMsgs.properties (%chrome/mailnews/eudoraImportMsgs.properties)
locale/@AB_CD@/messenger/downloadheaders.dtd (%chrome/mailnews/downloadheaders.dtd)
locale/@AB_CD@/messenger/fieldMapImport.dtd (%chrome/mailnews/fieldMapImport.dtd)
locale/@AB_CD@/messenger/filter.properties (%chrome/mailnews/filter.properties)
locale/@AB_CD@/messenger/FilterEditor.dtd (%chrome/mailnews/FilterEditor.dtd)
locale/@AB_CD@/messenger/FilterListDialog.dtd (%chrome/mailnews/FilterListDialog.dtd)
--- a/suite/profile/migration/src/nsNetscapeProfileMigratorBase.cpp
+++ b/suite/profile/migration/src/nsNetscapeProfileMigratorBase.cpp
@@ -41,47 +41,31 @@
#include "nsCRT.h"
#include "nsICookieManager2.h"
#include "nsIFile.h"
#include "nsILineInputStream.h"
#include "nsIOutputStream.h"
#include "nsIPrefBranch.h"
#include "nsIPrefLocalizedString.h"
#include "nsIPrefService.h"
-#include "NSReg.h"
#include "nsIServiceManager.h"
#include "nsISupportsPrimitives.h"
#include "nsIURL.h"
#include "nsNetscapeProfileMigratorBase.h"
#include "nsNetUtil.h"
#include "prtime.h"
#include "nsILoginManagerStorage.h"
#include "nsINIParser.h"
#include "nsArrayUtils.h"
#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")
#define DIR_NAME_CHROME NS_LITERAL_STRING("chrome")
-static nsresult
-regerr2nsresult(REGERR errCode)
-{
- switch (errCode) {
- case REGERR_PARAM:
- case REGERR_BADTYPE:
- case REGERR_BADNAME:
- return NS_ERROR_INVALID_ARG;
-
- case REGERR_MEMORY:
- return NS_ERROR_OUT_OF_MEMORY;
- }
- return NS_ERROR_FILE_NOT_FOUND;
-}
-
NS_IMPL_ISUPPORTS2(nsNetscapeProfileMigratorBase, nsISuiteProfileMigrator,
nsITimerCallback)
///////////////////////////////////////////////////////////////////////////////
// nsITimerCallback
NS_IMETHODIMP
@@ -438,121 +422,16 @@ nsNetscapeProfileMigratorBase::GetProfil
profileNameString->SetData(NS_ConvertUTF8toUTF16(buffer));
aProfileNames->AppendElement(profileNameString, PR_FALSE);
}
}
return NS_OK;
}
nsresult
-nsNetscapeProfileMigratorBase::GetProfileDataFromRegistry(nsILocalFile* aRegistryFile,
- nsIMutableArray* aProfileNames,
- nsIMutableArray* aProfileLocations)
-{
- REGERR errCode;
-
- // Ensure aRegistryFile exists before open it
- bool regFileExists = false;
- nsresult rv = aRegistryFile->Exists(®FileExists);
- NS_ENSURE_SUCCESS(rv, rv);
-
- if (!regFileExists)
- return NS_ERROR_FILE_NOT_FOUND;
-
- // Open It
- nsCAutoString regPath;
- rv = aRegistryFile->GetNativePath(regPath);
- NS_ENSURE_SUCCESS(rv, rv);
-
- if ((errCode = NR_StartupRegistry()))
- return regerr2nsresult(errCode);
-
- HREG reg;
- if ((errCode = NR_RegOpen(regPath.get(), ®))) {
- NR_ShutdownRegistry();
-
- return regerr2nsresult(errCode);
- }
-
- RKEY profilesTree;
- if ((errCode = NR_RegGetKey(reg, ROOTKEY_COMMON, "Profiles", &profilesTree))) {
- NR_RegClose(reg);
- NR_ShutdownRegistry();
-
- return regerr2nsresult(errCode);
- }
-
- char profileStr[MAXREGPATHLEN];
- REGENUM enumState = nsnull;
-
- while (!NR_RegEnumSubkeys(reg, profilesTree, &enumState, profileStr,
- sizeof(profileStr), REGENUM_CHILDREN)) {
- RKEY profileKey;
- if (NR_RegGetKey(reg, profilesTree, profileStr, &profileKey))
- continue;
-
- // "migrated" is "yes" for all valid Seamonkey profiles. It is only "no"
- // for 4.x profiles.
- char migratedStr[3] = {0};
- errCode = NR_RegGetEntryString(reg, profileKey, "migrated",
- migratedStr, sizeof(migratedStr));
- if ((errCode != REGERR_OK && errCode != REGERR_BUFTOOSMALL) ||
- strcmp(migratedStr, "no") == 0)
- continue;
-
- // Get the profile location and add it to the locations array
- REGINFO regInfo;
- regInfo.size = sizeof(REGINFO);
-
- if (NR_RegGetEntryInfo(reg, profileKey, "directory", ®Info))
- continue;
-
- nsCAutoString dirStr;
- dirStr.SetLength(regInfo.entryLength);
-
- errCode = NR_RegGetEntryString(reg, profileKey, "directory",
- dirStr.BeginWriting(), regInfo.entryLength);
- // Remove trailing \0
- dirStr.SetLength(regInfo.entryLength-1);
-
- nsCOMPtr<nsILocalFile> dir;
-#ifdef XP_MACOSX
- rv = NS_NewNativeLocalFile(EmptyCString(), PR_TRUE, getter_AddRefs(dir));
- if (NS_FAILED(rv))
- break;
-
- dir->SetPersistentDescriptor(dirStr);
-#else
- rv = NS_NewLocalFile(NS_ConvertUTF8toUTF16(dirStr), PR_TRUE,
- getter_AddRefs(dir));
- if (NS_FAILED(rv))
- break;
-#endif
-
- bool exists;
- dir->Exists(&exists);
-
- if (exists) {
- aProfileLocations->AppendElement(dir, PR_FALSE);
-
- // Add the profile name to the names array
- nsCOMPtr<nsISupportsString> profileNameString(
- do_CreateInstance("@mozilla.org/supports-string;1"));
-
- profileNameString->SetData(NS_ConvertUTF8toUTF16(profileStr));
- aProfileNames->AppendElement(profileNameString, PR_FALSE);
- }
- }
- NR_RegClose(reg);
- NR_ShutdownRegistry();
-
- return rv;
-}
-
-nsresult
nsNetscapeProfileMigratorBase::CopyFile(const char* aSourceFileName,
const char* aTargetFileName)
{
nsCOMPtr<nsIFile> sourceFile;
mSourceProfile->Clone(getter_AddRefs(sourceFile));
sourceFile->AppendNative(nsDependentCString(aSourceFileName));
bool exists = false;
--- a/suite/profile/migration/src/nsNetscapeProfileMigratorBase.h
+++ b/suite/profile/migration/src/nsNetscapeProfileMigratorBase.h
@@ -134,19 +134,16 @@ protected:
// the required profile data for the specific application can be obtained.
virtual nsresult FillProfileDataFromRegistry() = 0;
// General Utility Methods
nsresult GetSourceProfile(const PRUnichar* aProfile);
nsresult GetProfileDataFromProfilesIni(nsILocalFile* aDataDir,
nsIMutableArray* aProfileNames,
nsIMutableArray* aProfileLocations);
- nsresult GetProfileDataFromRegistry(nsILocalFile* aRegistryFile,
- nsIMutableArray* aProfileNames,
- nsIMutableArray* aProfileLocations);
nsresult GetFileValue(nsIPrefBranch* aPrefBranch, const char* aRelPrefName,
const char* aPrefName, nsILocalFile** aReturnFile);
nsresult CopyFile(const char* aSourceFileName,
const char* aTargetFileName);
nsresult RecursiveCopy(nsIFile* srcDir, nsIFile* destDir);
void ReadBranch(const char * branchName, nsIPrefService* aPrefService,
PBStructArray &aPrefs);
void WriteBranch(const char * branchName, nsIPrefService* aPrefService,
--- a/suite/profile/migration/src/nsProfileMigrator.cpp
+++ b/suite/profile/migration/src/nsProfileMigrator.cpp
@@ -42,37 +42,26 @@
#include "nsISupportsPrimitives.h"
#include "nsISupportsArray.h"
#include "nsIToolkitProfile.h"
#include "nsIToolkitProfileService.h"
#include "nsIWindowWatcher.h"
#include "nsDirectoryServiceDefs.h"
#include "nsComponentManagerUtils.h"
#include "nsServiceManagerUtils.h"
-#include "NSReg.h"
#include "nsStringAPI.h"
#include "nsIProperties.h"
#include "nsMemory.h"
#ifdef XP_WIN
#include <windows.h>
#include "nsIWindowsRegKey.h"
#include "nsILocalFileWin.h"
#include "nsUnicharUtils.h"
#endif
-#ifndef MAXPATHLEN
-#ifdef _MAX_PATH
-#define MAXPATHLEN _MAX_PATH
-#elif defined(CCHMAXPATH)
-#define MAXPATHLEN CCHMAXPATH
-#else
-#define MAXPATHLEN 1024
-#endif
-#endif
-
///////////////////////////////////////////////////////////////////////////////
// nsIProfileMigrator
#define MIGRATION_WIZARD_FE_URL "chrome://communicator/content/migration/migration.xul"
#define MIGRATION_WIZARD_FE_FEATURES "chrome,dialog,modal,centerscreen,titlebar"
NS_IMETHODIMP
nsProfileMigrator::Migrate(nsIProfileStartup* aStartup)
@@ -108,29 +97,16 @@ nsProfileMigrator::Migrate(nsIProfileSta
return ww->OpenWindow(nsnull,
MIGRATION_WIZARD_FE_URL,
"_blank",
MIGRATION_WIZARD_FE_FEATURES,
params,
getter_AddRefs(migrateWizard));
}
-NS_IMETHODIMP
-nsProfileMigrator::Import()
-{
- // This is purposely broken as using this would mean that we have
- // to use data from where profiles exist currently. We want to copy
- // it so that we can create a "fresh" profile. There may be a way
- // to do it from here, but currently we haven't found an easy one.
- //if (ImportRegistryProfiles(NS_LITERAL_CSTRING("mozilla")))
- // return NS_OK;
-
- return NS_ERROR_FAILURE;
-}
-
///////////////////////////////////////////////////////////////////////////////
// nsProfileMigrator
NS_IMPL_ISUPPORTS1(nsProfileMigrator, nsIProfileMigrator)
struct sInternalNameToMigratorName {
const char* internalName;
const char* key;
--- a/suite/profile/migration/src/nsProfileMigrator.h
+++ b/suite/profile/migration/src/nsProfileMigrator.h
@@ -38,17 +38,17 @@
#ifndef ProfileMigrator_h__
#define ProfileMigrator_h__
#include "nsISuiteProfileMigrator.h"
#include "nsIProfileMigrator.h"
#include "nsCOMPtr.h"
#define NS_SUITEPROFILEMIGRATOR_CID \
-{ 0x4ca3c946, 0x5408, 0x49f0, { 0x9e, 0xca, 0x3a, 0x97, 0xd5, 0xc6, 0x77, 0x50 } }
+{ 0x0c12a924, 0xc052, 0x4c7d, { 0x82, 0x7b, 0xba, 0x8c, 0x96, 0x32, 0xa6, 0x36 } }
#define NS_SUITEPROFILEMIGRATOR_CONTRACTID_PREFIX "@mozilla.org/profile/migrator;1?app=suite&type="
class nsProfileMigrator : public nsIProfileMigrator
{
public:
NS_DECL_NSIPROFILEMIGRATOR
NS_DECL_ISUPPORTS
--- a/suite/profile/migration/src/nsSeamonkeyProfileMigrator.cpp
+++ b/suite/profile/migration/src/nsSeamonkeyProfileMigrator.cpp
@@ -222,54 +222,17 @@ nsSeamonkeyProfileMigrator::GetSupported
*aSupportedItems = nsISuiteProfileMigrator::ALL;
return NS_OK;
}
nsresult
nsSeamonkeyProfileMigrator::FillProfileDataFromRegistry()
{
- // Find the Seamonkey Registry
- nsCOMPtr<nsIProperties> fileLocator(
- do_GetService("@mozilla.org/file/directory_service;1"));
- nsCOMPtr<nsILocalFile> seamonkeyRegistry;
-#ifdef XP_WIN
- fileLocator->Get(NS_WIN_APPDATA_DIR, NS_GET_IID(nsILocalFile),
- getter_AddRefs(seamonkeyRegistry));
-
- seamonkeyRegistry->Append(NS_LITERAL_STRING("Mozilla"));
- seamonkeyRegistry->Append(NS_LITERAL_STRING("registry.dat"));
-#elif defined(XP_MACOSX)
- fileLocator->Get(NS_MAC_USER_LIB_DIR, NS_GET_IID(nsILocalFile),
- getter_AddRefs(seamonkeyRegistry));
-
- seamonkeyRegistry->Append(NS_LITERAL_STRING("Mozilla"));
- seamonkeyRegistry->Append(NS_LITERAL_STRING("Application Registry"));
-#elif defined(XP_UNIX)
- fileLocator->Get(NS_UNIX_HOME_DIR, NS_GET_IID(nsILocalFile),
- getter_AddRefs(seamonkeyRegistry));
-
- seamonkeyRegistry->Append(NS_LITERAL_STRING(".mozilla"));
- seamonkeyRegistry->Append(NS_LITERAL_STRING("appreg"));
-#elif defined(XP_BEOS)
- fileLocator->Get(NS_BEOS_SETTINGS_DIR, NS_GET_IID(nsILocalFile),
- getter_AddRefs(seamonkeyRegistry));
-
- seamonkeyRegistry->Append(NS_LITERAL_STRING("Mozilla"));
- seamonkeyRegistry->Append(NS_LITERAL_STRING("appreg"));
-#elif defined(XP_OS2)
- fileLocator->Get(NS_OS2_HOME_DIR, NS_GET_IID(nsILocalFile),
- getter_AddRefs(seamonkeyRegistry));
-
- seamonkeyRegistry->Append(NS_LITERAL_STRING("Mozilla"));
- seamonkeyRegistry->Append(NS_LITERAL_STRING("registry.dat"));
-#endif
-
- return GetProfileDataFromRegistry(seamonkeyRegistry, mProfileNames,
- mProfileLocations);
+ return NS_ERROR_FILE_NOT_FOUND;
}
static
nsSeamonkeyProfileMigrator::PrefTransform gTransforms[] = {
MAKESAMETYPEPREFTRANSFORM("addressbook.throbber.url", String),
MAKESAMETYPEPREFTRANSFORM("advanced.mailftp", Bool),
MAKESAMETYPEPREFTRANSFORM("application.use_ns_plugin_finder", Bool),
--- a/suite/profile/migration/src/nsThunderbirdProfileMigrator.cpp
+++ b/suite/profile/migration/src/nsThunderbirdProfileMigrator.cpp
@@ -271,24 +271,17 @@ nsThunderbirdProfileMigrator::FillProfil
return NS_ERROR_FILE_NOT_FOUND;
#endif
// Try profiles.ini first
nsresult rv = GetProfileDataFromProfilesIni(thunderbirdData,
mProfileNames,
mProfileLocations);
- if (rv != NS_ERROR_FILE_NOT_FOUND)
- return rv;
-
- thunderbirdData->Append(NS_LITERAL_STRING(REGISTRY_FILE));
-
- // Then try the old registry format
- return GetProfileDataFromRegistry(thunderbirdData, mProfileNames,
- mProfileLocations);
+ return rv;
}
static
nsThunderbirdProfileMigrator::PrefTransform gTransforms[] = {
MAKESAMETYPEPREFTRANSFORM("accessibility.typeaheadfind.autostart", Bool),
MAKESAMETYPEPREFTRANSFORM("accessibility.typeaheadfind.linksonly", Bool),
MAKESAMETYPEPREFTRANSFORM("browser.anchor_color", String),