diff --git a/mozilla/mailnews/Makefile.in b/mozilla/mailnews/Makefile.in index 643856ae655..84a158c1987 100644 --- a/mozilla/mailnews/Makefile.in +++ b/mozilla/mailnews/Makefile.in @@ -26,7 +26,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -DIRS = public base db/msgdb news local mime compose imap addrbook import absync extensions +DIRS = public base db/msgdb news local mime compose imap addrbook import extensions ifeq ($(OS_ARCH),WINNT) DIRS += mapi diff --git a/mozilla/mailnews/absync/Makefile.in b/mozilla/mailnews/absync/Makefile.in deleted file mode 100644 index 4b3b329cfc7..00000000000 --- a/mozilla/mailnews/absync/Makefile.in +++ /dev/null @@ -1,32 +0,0 @@ -# -# The contents of this file are subject to the Netscape 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/NPL/ -# -# 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 Netscape are -# Copyright (C) 1998 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# - -DEPTH = ../.. -topsrcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ - -include $(DEPTH)/config/autoconf.mk - -DIRS = public src build - -include $(topsrcdir)/config/rules.mk - diff --git a/mozilla/mailnews/absync/build/MANIFEST b/mozilla/mailnews/absync/build/MANIFEST deleted file mode 100644 index 3785248efaf..00000000000 --- a/mozilla/mailnews/absync/build/MANIFEST +++ /dev/null @@ -1,21 +0,0 @@ -# The contents of this file are subject to the Netscape 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/NPL/ -# -# 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 Netscape are -# Copyright (C) 1998 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# - -nsAbSyncCID.h diff --git a/mozilla/mailnews/absync/build/Makefile.in b/mozilla/mailnews/absync/build/Makefile.in deleted file mode 100644 index 1a07deff113..00000000000 --- a/mozilla/mailnews/absync/build/Makefile.in +++ /dev/null @@ -1,69 +0,0 @@ -# -# The contents of this file are subject to the Netscape 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/NPL/ -# -# 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 Netscape are -# Copyright (C) 1998 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# - -DEPTH = ../../.. -topsrcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ - -include $(DEPTH)/config/autoconf.mk - -MODULE = absyncsvc -LIBRARY_NAME = absyncsvc -META_COMPONENT = mail -EXPORT_LIBRARY = 1 -IS_COMPONENT = 1 -MODULE_NAME = nsAbSyncModule -SHORT_LIBNAME = absyncsv -REQUIRES = xpcom \ - string \ - necko \ - docshell \ - uriloader \ - msgbase \ - intl \ - addrbook \ - mork \ - $(NULL) - -ifeq ($(USE_SHORT_LIBNAME),1) -EXTRA_DSO_LIBS = msgbsutl -else -EXTRA_DSO_LIBS = msgbaseutil -endif - -CPPSRCS = nsAbSyncFactory.cpp -EXPORTS = nsAbSyncCID.h - -SHARED_LIBRARY_LIBS = \ - $(DIST)/lib/$(LIB_PREFIX)absync_s.$(LIB_SUFFIX) \ - $(NULL) - -EXTRA_DSO_LDOPTS = \ - $(LIBS_DIR) \ - $(EXTRA_DSO_LIBS) \ - $(MOZ_UNICHARUTIL_LIBS) \ - $(MOZ_JS_LIBS) \ - $(MOZ_COMPONENT_LIBS) \ - $(NULL) - -include $(topsrcdir)/config/rules.mk - diff --git a/mozilla/mailnews/absync/build/nsAbSyncCID.h b/mozilla/mailnews/absync/build/nsAbSyncCID.h deleted file mode 100644 index bb2ce66a6fc..00000000000 --- a/mozilla/mailnews/absync/build/nsAbSyncCID.h +++ /dev/null @@ -1,101 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * 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 NPL, 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 NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#ifndef nsAbSyncCID_h__ -#define nsAbSyncCID_h__ - -#include "nsISupports.h" -#include "nsIFactory.h" -#include "nsIComponentManager.h" - -// -// Ab Sync Service -// -#define NS_ABSYNC_SERVICE_CID \ -{ /* {3C21BB39-0A87-11d4-8FD6-00A024A7D144} */ \ - 0x3c21bb39, 0xa87, 0x11d4, \ - { 0x8f, 0xd6, 0x0, 0xa0, 0x24, 0xa7, 0xd1, 0x44 } } - -#define NS_ABSYNC_SERVICE_CONTRACTID \ - "@mozilla.org/absync;1" - -// -// Ab Sync Listener -// -#define NS_ABSYNC_LISTENER_CID \ -{ /* {3C21BB44-0A87-11d4-8FD6-00A024A7D144} */ \ - 0x3c21bb44, 0xa87, 0x11d4, \ - { 0x8f, 0xd6, 0x0, 0xa0, 0x24, 0xa7, 0xd1, 0x44 } } - -#define NS_ABSYNC_LISTENER_CONTRACTID \ - "@mozilla.org/absync/listener;1" - -// -// Ab Sync Post Engine -// -#define NS_ABSYNC_POST_ENGINE_CID \ -{ /* {3C21BB9f-0A87-11d4-8FD6-00A024A7D144} */ \ - 0x3c21bb9f, 0xa87, 0x11d4, \ - { 0x8f, 0xd6, 0x0, 0xa0, 0x24, 0xa7, 0xd1, 0x44 } } - -#define NS_ABSYNC_POST_ENGINE_CONTRACTID \ - "@mozilla.org/absync/postengine;1" - - -// -// Ab Sync Post Listener -// -#define NS_ABSYNC_POST_LISTENER_CID \ -{ /* {3C21BBcc-0A87-11d4-8FD6-00A024A7D144} */ \ - 0x3c21bbcc, 0xa87, 0x11d4, \ - { 0x8f, 0xd6, 0x0, 0xa0, 0x24, 0xa7, 0xd1, 0x44 } } - -#define NS_ABSYNC_POST_LISTENER_CONTRACTID \ - "@mozilla.org/absync/postlistener;1" - -// -// Sync Driver -// -#define NS_ADDBOOK_SYNCDRIVER_CONTRACTID \ - "@mozilla.org/addressbook/services/syncdriver;1" -#define NS_ADDBOOK_SYNCDRIVER_CID \ -{ /* 40D1D3DA-1637-11d4-8FE1-00A024A7D144 */ \ - 0x40d1d3da, 0x1637, 0x11d4, \ - { 0x8f, 0xe1, 0x0, 0xa0, 0x24, 0xa7, 0xd1, 0x44 } \ -} - -#endif // nsAbSyncCID_h__ diff --git a/mozilla/mailnews/absync/build/nsAbSyncFactory.cpp b/mozilla/mailnews/absync/build/nsAbSyncFactory.cpp deleted file mode 100644 index 7d7b80fc9f4..00000000000 --- a/mozilla/mailnews/absync/build/nsAbSyncFactory.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * 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 NPL, 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 NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#include "msgCore.h" -#include "nsISupports.h" -#include "nsCOMPtr.h" - -#include "nsIFactory.h" -#include "nsIGenericFactory.h" -#include "nsIServiceManager.h" -#include "nsIModule.h" - -#include "pratom.h" -#include "nsAbSyncCID.h" - -/* Include all of the interfaces our factory can generate components for */ -#include "nsAbSync.h" -#include "nsAbSyncPostEngine.h" - -#include "nsABSyncDriver.h" - -NS_GENERIC_FACTORY_CONSTRUCTOR(nsAbSync); -NS_GENERIC_FACTORY_CONSTRUCTOR(nsAbSyncDriver) - -//////////////////////////////////////////////////////////// -// -//////////////////////////////////////////////////////////// - -static const nsModuleComponentInfo components[] = -{ - { "Addressbook Sync", - NS_ABSYNC_SERVICE_CID, - NS_ABSYNC_SERVICE_CONTRACTID, - nsAbSyncConstructor }, - { "Addressbook Sync Post Engine", - NS_ABSYNC_POST_ENGINE_CID, - NS_ABSYNC_POST_ENGINE_CONTRACTID, - nsAbSyncPostEngine::Create }, - { "The Address Book Sync Driver", - NS_ADDBOOK_SYNCDRIVER_CID, - NS_ADDBOOK_SYNCDRIVER_CONTRACTID, - nsAbSyncDriverConstructor } -}; - -NS_IMPL_NSGETMODULE(nsAbSyncModule, components) diff --git a/mozilla/mailnews/absync/build/win32.order b/mozilla/mailnews/absync/build/win32.order deleted file mode 100644 index bf181a81d4a..00000000000 --- a/mozilla/mailnews/absync/build/win32.order +++ /dev/null @@ -1 +0,0 @@ -_NSGetModule ; 1 diff --git a/mozilla/mailnews/absync/macbuild/AbSync.xml b/mozilla/mailnews/absync/macbuild/AbSync.xml deleted file mode 100644 index 8d00ff2bbe0..00000000000 --- a/mozilla/mailnews/absync/macbuild/AbSync.xml +++ /dev/null @@ -1,2338 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]> - - - - - AbSyncSvcDebug.shlb - - - - UserSourceTrees - - - AlwaysSearchUserPathsfalse - InterpretDOSAndUnixPathsfalse - RequireFrameworkStyleIncludesfalse - UserSearchPaths - - SearchPath - Path::::dist: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path::src: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path::build: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path:::base:util:macbuild: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path::::intl:unicharutil:macbuild: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SystemSearchPaths - - SearchPath - Path:MSL: - PathFormatMacOS - PathRootCodeWarrior - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path:MacOS Support: - PathFormatMacOS - PathRootCodeWarrior - - Recursivetrue - FrameworkPathfalse - HostFlagsMacOS - - - - - MWRuntimeSettings_WorkingDirectory - MWRuntimeSettings_CommandLine - MWRuntimeSettings_HostApplication - Path - PathFormatGeneric - PathRootAbsolute - - MWRuntimeSettings_EnvVars - - - LinkerMacOS PPC Linker - PreLinker - PostLinker - TargetnameAbSyncSvcDebug.shlb - OutputDirectory - Path: - PathFormatMacOS - PathRootProject - - SaveEntriesUsingRelativePathsfalse - - - FileMappings - - FileTypeAPPL - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeAppl - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeMMLB - FileExtension - CompilerLib Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeMPLF - FileExtension - CompilerLib Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeMWCD - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeRSRC - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.c - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.c++ - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.cc - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.cp - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.cpp - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.exp - Compiler - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.h - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMaketrue - - - FileTypeTEXT - FileExtension.p - CompilerMW Pascal PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.pas - CompilerMW Pascal PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.pch - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompiletrue - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.pch++ - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompiletrue - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.ppu - CompilerMW Pascal PPC - EditLanguage - Precompiletrue - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.r - CompilerRez - EditLanguageRez - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.s - CompilerPPCAsm - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeXCOF - FileExtension - CompilerXCOFF Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypedocu - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypersrc - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeshlb - FileExtension - CompilerPEF Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypestub - FileExtension - CompilerPEF Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileExtension.doc - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFilefalse - IgnoredByMaketrue - - - - - CacheModDatestrue - ActivateBrowsertrue - DumpBrowserInfofalse - CacheSubprojectstrue - UseThirdPartyDebuggerfalse - DebuggerAppPath - Path - PathFormatGeneric - PathRootAbsolute - - DebuggerCmdLineArgs - DebuggerWorkingDir - Path - PathFormatGeneric - PathRootAbsolute - - - - LogSystemMessagestrue - AutoTargetDLLsfalse - StopAtWatchpointstrue - PauseWhileRunningfalse - PauseInterval5 - PauseUIFlags0 - AltExePath - Path - PathFormatGeneric - PathRootAbsolute - - StopAtTempBPOnLaunchtrue - CacheSymbolicstrue - TempBPFunctionNamemain - TempBPType0 - - - Enabledfalse - ConnectionName - DownloadPath - LaunchRemoteAppfalse - RemoteAppPath - - - OtherExecutables - - - CustomColor1 - Red0 - Green32767 - Blue0 - - CustomColor2 - Red0 - Green32767 - Blue0 - - CustomColor3 - Red0 - Green32767 - Blue0 - - CustomColor4 - Red0 - Green32767 - Blue0 - - - - MWFrontEnd_C_cplusplus0 - MWFrontEnd_C_checkprotos1 - MWFrontEnd_C_arm0 - MWFrontEnd_C_trigraphs0 - MWFrontEnd_C_onlystdkeywords0 - MWFrontEnd_C_enumsalwaysint1 - MWFrontEnd_C_mpwpointerstyle0 - MWFrontEnd_C_prefixnameabSyncPrefixDebug.h - MWFrontEnd_C_ansistrict0 - MWFrontEnd_C_mpwcnewline0 - MWFrontEnd_C_wchar_type1 - MWFrontEnd_C_enableexceptions1 - MWFrontEnd_C_dontreusestrings0 - MWFrontEnd_C_poolstrings0 - MWFrontEnd_C_dontinline0 - MWFrontEnd_C_useRTTI1 - MWFrontEnd_C_multibyteaware0 - MWFrontEnd_C_unsignedchars0 - MWFrontEnd_C_autoinline0 - MWFrontEnd_C_booltruefalse0 - MWFrontEnd_C_direct_to_som0 - MWFrontEnd_C_som_env_check0 - MWFrontEnd_C_alwaysinline0 - MWFrontEnd_C_inlinelevel0 - MWFrontEnd_C_ecplusplus0 - MWFrontEnd_C_objective_c0 - MWFrontEnd_C_defer_codegen0 - - - MWWarning_C_warn_illpragma1 - MWWarning_C_warn_emptydecl1 - MWWarning_C_warn_possunwant1 - MWWarning_C_warn_unusedvar1 - MWWarning_C_warn_unusedarg1 - MWWarning_C_warn_extracomma1 - MWWarning_C_pedantic1 - MWWarning_C_warningerrors0 - MWWarning_C_warn_hidevirtual1 - MWWarning_C_warn_implicitconv0 - MWWarning_C_warn_notinlined0 - MWWarning_C_warn_structclass0 - - - MWFTP_Post_hostName - MWFTP_Post_username - MWFTP_Post_password0 - MWFTP_Post_remoteDir - MWFTP_Post_ftp_PathVersion0 - MWFTP_Post_ftp_PathType0 - MWFTP_Post_ftp_PathFormat0 - MWFTP_Post_ftp_tree - MWFTP_Post_uploadDir - MWFTP_Post_ftp_port21 - MWFTP_Post_SendBin1 - MWFTP_Post_ShouldLog1 - - - MWCommandLine_Java_clsName - MWCommandLine_Java_args - - - MWVJavaDebugging_Protocol1 - MWVJavaDebugging_JDKVersion1 - MWVJavaDebugging_TimeOut10 - MWVJavaDebugging_SupportSlowDevicesfalse - - - MWJava_Language_optimizefalse - MWJava_Language_warnDeprecatedfalse - MWJava_Language_emitMapfalse - MWJava_Language_strictFileNamesfalse - MWJava_Language_strictFileHierarchyfalse - MWJava_Language_1_1_Compatiblefalse - MWJava_Language_emitHeaders0 - MWJava_Language_headerTypeJNINativeHeaders - MWJava_Language_packageFilter - MWJava_Language_genCommentstrue - MWJava_Language_genHeadersfalse - - - MWJava_MRJAppBuilder_outFileMRJApplication - MWJava_MRJAppBuilder_mergefalse - MWJava_MRJAppBuilder_quitMenutrue - MWJava_MRJAppBuilder_growfalse - MWJava_MRJAppBuilder_stdoutTypeConsole - MWJava_MRJAppBuilder_stderrTypeConsole - MWJava_MRJAppBuilder_stdinTypeConsole - MWJava_MRJAppBuilder_appIconPVersion0 - MWJava_MRJAppBuilder_appIconPType0 - MWJava_MRJAppBuilder_appIconPFormat0 - MWJava_MRJAppBuilder_appIconPTree - MWJava_MRJAppBuilder_appIconFile - MWJava_MRJAppBuilder_splashScreenPVersion0 - MWJava_MRJAppBuilder_splashScreenPType0 - MWJava_MRJAppBuilder_splashScreenPFormat0 - MWJava_MRJAppBuilder_splashScreenPTree - MWJava_MRJAppBuilder_splashScreenPICTFile - MWJava_MRJAppBuilder_aboutName - MWJava_MRJAppBuilder_stdoutPVersion0 - MWJava_MRJAppBuilder_stdoutPType0 - MWJava_MRJAppBuilder_stdoutPFormat0 - MWJava_MRJAppBuilder_stdoutPTree - MWJava_MRJAppBuilder_stdoutFile - MWJava_MRJAppBuilder_stdoutAppendfalse - MWJava_MRJAppBuilder_stderrPType0 - MWJava_MRJAppBuilder_stderrPFormat0 - MWJava_MRJAppBuilder_stderrPTree - MWJava_MRJAppBuilder_stderrFile - MWJava_MRJAppBuilder_stderrAppendfalse - MWJava_MRJAppBuilder_stdinPType0 - MWJava_MRJAppBuilder_stdinPFormat0 - MWJava_MRJAppBuilder_stdinPTree - MWJava_MRJAppBuilder_stdinFile - - - MWJava_Output_outputtypeJarFile - MWJava_Output_outfileJavaClasses.jar - MWJava_Output_ftype1514754080 - MWJava_Output_fcreator1297570384 - MWJava_Output_compress0 - MWJava_Output_genManifest0 - MWJava_Output_trunctypeFront - MWJava_Output_deleteClasses0 - MWJava_Output_consoleApp1 - - - MWJava_Proj_projtypeApplet - MWJava_Proj_mainClassName - MWJava_Proj_HTMLAppCreator1463898714 - MWJava_Proj_HTMLAppName - MWJava_Proj_PathVersion0 - MWJava_Proj_PathType0 - MWJava_Proj_PathFormat0 - MWJava_Proj_tree - MWJava_Proj_HTMLAppWin32Name - MWJava_Proj_compress0 - MWJava_Proj_useVM1 - MWJava_Proj_vmarguments - MWJava_Proj_vmName - MWJava_Proj_simPropFile - - - MWJavaDoc_Proj_Version1 - MWJavaDoc_Proj_Depricated1 - MWJavaDoc_Proj_Author1 - MWJavaDoc_Proj_Index1 - MWJavaDoc_Proj_Tree1 - MWJavaDoc_Proj_SunResolveToSame0 - MWJavaDoc_Proj_Shortnames1 - MWJavaDoc_Proj_Folder0 - MWJavaDoc_Proj_GenerateAPILinks0 - MWJavaDoc_Proj_scopePublic - MWJavaDoc_Proj_fcreator1297303877 - MWJavaDoc_Proj_encodingName - MWJavaDoc_Proj_decodingName - MWJavaDoc_Proj_javaPackagePathhttp://java.sun.com/products/jdk/1.1/docs/api/ - - - MWMerge_MacOS_projectTypeApplication - MWMerge_MacOS_outputNameMerge Out - MWMerge_MacOS_outputCreator???? - MWMerge_MacOS_outputTypeAPPL - MWMerge_MacOS_suppressWarning0 - MWMerge_MacOS_copyFragments1 - MWMerge_MacOS_copyResources1 - MWMerge_MacOS_flattenResource0 - MWMerge_MacOS_flatFileNamea.rsrc - MWMerge_MacOS_flatFileOutputPath - Path: - PathFormatMacOS - PathRootProject - - MWMerge_MacOS_skipResources - DLGX - ckid - Proj - WSPC - - - - FileLockedfalse - ResourcesMapIsReadOnlyfalse - PrinterDriverIsMultiFinderCompatiblefalse - Invisiblefalse - HasBundlefalse - NameLockedfalse - Stationeryfalse - HasCustomIconfalse - Sharedfalse - HasBeenInitedfalse - Label0 - Comments - - - MWMacOSPackager_UsePackager0 - MWMacOSPackager_FolderToPackage - Path: - PathFormatMacOS - PathRootProject - - MWMacOSPackager_CreateClassicAlias0 - MWMacOSPackager_ClassicAliasMethodUseTargetOutput - MWMacOSPackager_ClassicAliasPath - Path: - PathFormatMacOS - PathRootProject - - MWMacOSPackager_CreatePkgInfo0 - MWMacOSPackager_PkgCreatorType???? - MWMacOSPackager_PkgFileTypeAPPL - - - MWCodeGen_PPC_structalignmentPPC - MWCodeGen_PPC_tracebacktablesInline - MWCodeGen_PPC_processorGeneric - MWCodeGen_PPC_readonlystrings0 - MWCodeGen_PPC_tocdata1 - MWCodeGen_PPC_profiler0 - MWCodeGen_PPC_fpcontract1 - MWCodeGen_PPC_schedule0 - MWCodeGen_PPC_peephole0 - MWCodeGen_PPC_processorspecific0 - MWCodeGen_PPC_altivec0 - MWCodeGen_PPC_vectortocdata0 - MWCodeGen_PPC_vrsave0 - - - MWCodeGen_MachO_structalignmentPPC - MWCodeGen_MachO_tracebacktablesNone - MWCodeGen_MachO_processorGeneric - MWCodeGen_MachO_readonlystrings0 - MWCodeGen_MachO_profiler0 - MWCodeGen_MachO_fpcontract1 - MWCodeGen_MachO_schedule0 - MWCodeGen_MachO_peephole1 - MWCodeGen_MachO_processorspecific0 - MWCodeGen_MachO_altivec0 - MWCodeGen_MachO_vrsave1 - MWCodeGen_MachO_common0 - MWCodeGen_MachO_implicit_templates1 - - - MWDisassembler_PPC_showcode1 - MWDisassembler_PPC_extended1 - MWDisassembler_PPC_mix0 - MWDisassembler_PPC_nohex0 - MWDisassembler_PPC_showdata1 - MWDisassembler_PPC_showexceptions1 - MWDisassembler_PPC_showsym0 - MWDisassembler_PPC_shownames1 - - - GlobalOptimizer_PPC_optimizationlevelLevel0 - GlobalOptimizer_PPC_optforSpeed - - - MWLinker_PPC_linksym1 - MWLinker_PPC_symfullpath1 - MWLinker_PPC_linkmap0 - MWLinker_PPC_nolinkwarnings0 - MWLinker_PPC_dontdeadstripinitcode0 - MWLinker_PPC_permitmultdefs1 - MWLinker_PPC_linkmodeFast - MWLinker_PPC_initname__NSInitialize - MWLinker_PPC_mainname - MWLinker_PPC_termname__NSTerminate - - - MWLinker_MachO_exportsNone - MWLinker_MachO_mainnamestart - MWLinker_MachO_currentversion0 - MWLinker_MachO_compatibleversion0 - MWLinker_MachO_symfullpath0 - MWLinker_MachO_supresswarnings0 - MWLinker_MachO_multisymerror0 - MWLinker_MachO_prebind1 - MWLinker_MachO_deadstrip1 - MWLinker_MachO_objectivecsemantics0 - MWLinker_MachO_whichfileloaded0 - MWLinker_MachO_whyfileloaded0 - MWLinker_MachO_readonlyrelocsErrors - MWLinker_MachO_undefinedsymbolsErrors - MWLinker_MachO_twolevelnamespace1 - MWLinker_MachO_stripdebugsymbols0 - - - MWProject_MachO_typeExecutable - MWProject_MachO_outfilea.exe - MWProject_MachO_filecreator???? - MWProject_MachO_filetypeMEXE - MWProject_MachO_stacksize64 - MWProject_MachO_stackaddress0 - MWProject_MachO_flatrsrc1 - MWProject_MachO_flatrsrcfilenamea.rsrc - MWProject_MachO_flatrsrcoutputdir - Path: - PathFormatMacOS - PathRootProject - - MWProject_MachO_installpath./ - - - MWPEF_exportsPragma - MWPEF_libfolder0 - MWPEF_sortcodeNone - MWPEF_expandbss0 - MWPEF_sharedata0 - MWPEF_olddefversion100 - MWPEF_oldimpversion100 - MWPEF_currentversion100 - MWPEF_fragmentnameABSYNCSVC_DLL - MWPEF_collapsereloads0 - - - MWProject_PPC_typeSharedLibrary - MWProject_PPC_outfileAbSyncSvcDebug.shlb - MWProject_PPC_filecreatorMOZZ - MWProject_PPC_filetypeshlb - MWProject_PPC_size0 - MWProject_PPC_minsize0 - MWProject_PPC_stacksize0 - MWProject_PPC_flags0 - MWProject_PPC_symfilename - MWProject_PPC_rsrcname - MWProject_PPC_rsrcheaderNative - MWProject_PPC_rsrctype???? - MWProject_PPC_rsrcid0 - MWProject_PPC_rsrcflags0 - MWProject_PPC_rsrcstore0 - MWProject_PPC_rsrcmerge0 - MWProject_PPC_flatrsrc0 - MWProject_PPC_flatrsrcoutputdir - Path: - PathFormatMacOS - PathRootProject - - MWProject_PPC_flatrsrcfilename - - - MWAssembler_PPC_auxheader0 - MWAssembler_PPC_symmodeMac - MWAssembler_PPC_dialectPPC - MWAssembler_PPC_prefixfile - MWAssembler_PPC_typecheck0 - MWAssembler_PPC_warnings0 - MWAssembler_PPC_casesensitive0 - - - MWRez_Language_maxwidth80 - MWRez_Language_scriptRoman - MWRez_Language_alignmentAlign1 - MWRez_Language_filtermodeFilterSkip - MWRez_Language_suppresswarnings0 - MWRez_Language_escapecontrolchars1 - MWRez_Language_prefixname - MWRez_Language_filteredtypes'CODE' 'DATA' 'PICT' - - - MWWinRC_prefixname - - - MWCodeGen_X86_processorGeneric - MWCodeGen_X86_alignmentbytes8 - MWCodeGen_X86_exceptionsZeroOverhead - MWCodeGen_X86_extinst_mmx0 - MWCodeGen_X86_extinst_3dnow0 - MWCodeGen_X86_use_mmx_3dnow_convention0 - MWCodeGen_X86_machinecodelisting0 - MWCodeGen_X86_intrinsics0 - MWCodeGen_X86_syminfo0 - MWCodeGen_X86_codeviewinfo1 - MWCodeGen_X86_extinst_cmov_fcomi0 - MWCodeGen_X86_extinst_sse0 - - - PDisasmX86_showHeaderstrue - PDisasmX86_showSymTabtrue - PDisasmX86_showCodetrue - PDisasmX86_showSourcefalse - PDisasmX86_showHextrue - PDisasmX86_showRelocationtrue - PDisasmX86_showCommentsfalse - PDisasmX86_showDebugfalse - PDisasmX86_showExceptionsfalse - PDisasmX86_showDatatrue - PDisasmX86_showRawfalse - PDisasmX86_verbosefalse - - - MWDebugger_X86_Exceptions - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - GlobalOptimizer_X86_optimizationlevelLevel0 - GlobalOptimizer_X86_optforSpeed - - - MWLinker_X86_entrypointusageDefault - MWLinker_X86_entrypoint - MWLinker_X86_subsystemWinGUI - MWLinker_X86_subsysmajorid4 - MWLinker_X86_subsysminorid0 - MWLinker_X86_usrmajorid0 - MWLinker_X86_usrminorid0 - MWLinker_X86_commandfile - MWLinker_X86_generatemap0 - MWLinker_X86_linksym0 - MWLinker_X86_linkCV1 - - - MWProject_X86_typeApplication - MWProject_X86_outfilenoname.exe - MWProject_X86_baseaddress4194304 - MWProject_X86_maxstacksize1024 - MWProject_X86_minstacksize4 - MWProject_X86_size1024 - MWProject_X86_minsize4 - MWProject_X86_importlib - xpidl Settings - 0001000101000000000000000000000000000000000000000000000000000000 - 0000000000000000 - - - - - Name - NSRuntimeDebug.shlb - MacOS - Library - Debug - - - Name - NSPR20Debug.shlb - MacOS - Library - Debug - - - Name - xpcomDebug.shlb - MacOS - Library - Debug - - - Name - NSStdLibDebug.shlb - MacOS - Library - Debug - - - Name - InterfacesStubs - MacOS - Library - Debug - - - Name - NSComponentStartup.o - MacOS - Library - Debug - - - Name - nsAbSyncFactory.cpp - MacOS - Text - Debug - - - Name - nsAbSync.cpp - MacOS - Text - Debug - - - Name - nsAbSyncCRCModel.cpp - MacOS - Text - Debug - - - Name - nsABSyncDriver.cpp - MacOS - Text - Debug - - - Name - nsAbSyncPostEngine.cpp - MacOS - Text - Debug - - - Name - nsSyncDecoderRing.cpp - MacOS - Text - Debug - - - Name - MsgUtilDebug.lib - MacOS - Library - Debug - - - Name - UnicharUtilsStaticDebug.o - MacOS - Library - Debug - - - - - Name - NSComponentStartup.o - MacOS - - - Name - NSRuntimeDebug.shlb - MacOS - - - Name - NSPR20Debug.shlb - MacOS - - - Name - xpcomDebug.shlb - MacOS - - - Name - NSStdLibDebug.shlb - MacOS - - - Name - InterfacesStubs - MacOS - - - Name - nsAbSyncFactory.cpp - MacOS - - - Name - nsAbSync.cpp - MacOS - - - Name - nsAbSyncCRCModel.cpp - MacOS - - - Name - nsABSyncDriver.cpp - MacOS - - - Name - nsAbSyncPostEngine.cpp - MacOS - - - Name - nsSyncDecoderRing.cpp - MacOS - - - Name - MsgUtilDebug.lib - MacOS - - - Name - UnicharUtilsStaticDebug.o - MacOS - - - - - AbSyncSvc.shlb - - - - UserSourceTrees - - - AlwaysSearchUserPathsfalse - InterpretDOSAndUnixPathsfalse - RequireFrameworkStyleIncludesfalse - UserSearchPaths - - SearchPath - Path::::dist: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path::src: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path::build: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path:::base:util:macbuild: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path::::intl:unicharutil:macbuild: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SystemSearchPaths - - SearchPath - Path:MSL: - PathFormatMacOS - PathRootCodeWarrior - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path:MacOS Support: - PathFormatMacOS - PathRootCodeWarrior - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - - - MWRuntimeSettings_WorkingDirectory - MWRuntimeSettings_CommandLine - MWRuntimeSettings_HostApplication - Path - PathFormatGeneric - PathRootAbsolute - - MWRuntimeSettings_EnvVars - - - LinkerMacOS PPC Linker - PreLinker - PostLinker - TargetnameAbSyncSvc.shlb - OutputDirectory - Path: - PathFormatMacOS - PathRootProject - - SaveEntriesUsingRelativePathsfalse - - - FileMappings - - FileTypeAPPL - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeAppl - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeMMLB - FileExtension - CompilerLib Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeMPLF - FileExtension - CompilerLib Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeMWCD - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeRSRC - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.c - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.c++ - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.cc - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.cp - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.cpp - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.exp - Compiler - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.h - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMaketrue - - - FileTypeTEXT - FileExtension.p - CompilerMW Pascal PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.pas - CompilerMW Pascal PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.pch - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompiletrue - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.pch++ - CompilerMW C/C++ PPC - EditLanguageC/C++ - Precompiletrue - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.ppu - CompilerMW Pascal PPC - EditLanguage - Precompiletrue - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.r - CompilerRez - EditLanguageRez - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.s - CompilerPPCAsm - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeXCOF - FileExtension - CompilerXCOFF Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypedocu - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypersrc - FileExtension - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeshlb - FileExtension - CompilerPEF Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypestub - FileExtension - CompilerPEF Import PPC - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileExtension.doc - Compiler - EditLanguage - Precompilefalse - Launchabletrue - ResourceFilefalse - IgnoredByMaketrue - - - - - CacheModDatestrue - ActivateBrowsertrue - DumpBrowserInfofalse - CacheSubprojectstrue - UseThirdPartyDebuggerfalse - DebuggerAppPath - Path - PathFormatGeneric - PathRootAbsolute - - DebuggerCmdLineArgs - DebuggerWorkingDir - Path - PathFormatGeneric - PathRootAbsolute - - - - LogSystemMessagestrue - AutoTargetDLLsfalse - StopAtWatchpointstrue - PauseWhileRunningfalse - PauseInterval5 - PauseUIFlags0 - AltExePath - Path - PathFormatGeneric - PathRootAbsolute - - StopAtTempBPOnLaunchtrue - CacheSymbolicstrue - TempBPFunctionNamemain - TempBPType0 - - - Enabledfalse - ConnectionName - DownloadPath - LaunchRemoteAppfalse - RemoteAppPath - - - OtherExecutables - - - CustomColor1 - Red0 - Green32767 - Blue0 - - CustomColor2 - Red0 - Green32767 - Blue0 - - CustomColor3 - Red0 - Green32767 - Blue0 - - CustomColor4 - Red0 - Green32767 - Blue0 - - - - MWFrontEnd_C_cplusplus0 - MWFrontEnd_C_checkprotos1 - MWFrontEnd_C_arm0 - MWFrontEnd_C_trigraphs0 - MWFrontEnd_C_onlystdkeywords0 - MWFrontEnd_C_enumsalwaysint1 - MWFrontEnd_C_mpwpointerstyle0 - MWFrontEnd_C_prefixnameabSyncPrefix.h - MWFrontEnd_C_ansistrict0 - MWFrontEnd_C_mpwcnewline0 - MWFrontEnd_C_wchar_type1 - MWFrontEnd_C_enableexceptions1 - MWFrontEnd_C_dontreusestrings0 - MWFrontEnd_C_poolstrings0 - MWFrontEnd_C_dontinline0 - MWFrontEnd_C_useRTTI1 - MWFrontEnd_C_multibyteaware0 - MWFrontEnd_C_unsignedchars0 - MWFrontEnd_C_autoinline0 - MWFrontEnd_C_booltruefalse0 - MWFrontEnd_C_direct_to_som0 - MWFrontEnd_C_som_env_check0 - MWFrontEnd_C_alwaysinline0 - MWFrontEnd_C_inlinelevel0 - MWFrontEnd_C_ecplusplus0 - MWFrontEnd_C_objective_c0 - MWFrontEnd_C_defer_codegen0 - - - MWWarning_C_warn_illpragma1 - MWWarning_C_warn_emptydecl1 - MWWarning_C_warn_possunwant1 - MWWarning_C_warn_unusedvar1 - MWWarning_C_warn_unusedarg1 - MWWarning_C_warn_extracomma1 - MWWarning_C_pedantic1 - MWWarning_C_warningerrors0 - MWWarning_C_warn_hidevirtual1 - MWWarning_C_warn_implicitconv0 - MWWarning_C_warn_notinlined0 - MWWarning_C_warn_structclass0 - - - MWFTP_Post_hostName - MWFTP_Post_username - MWFTP_Post_password0 - MWFTP_Post_remoteDir - MWFTP_Post_ftp_PathVersion0 - MWFTP_Post_ftp_PathType0 - MWFTP_Post_ftp_PathFormat0 - MWFTP_Post_ftp_tree - MWFTP_Post_uploadDir - MWFTP_Post_ftp_port21 - MWFTP_Post_SendBin1 - MWFTP_Post_ShouldLog1 - - - MWCommandLine_Java_clsName - MWCommandLine_Java_args - - - MWVJavaDebugging_Protocol1 - MWVJavaDebugging_JDKVersion1 - MWVJavaDebugging_TimeOut10 - MWVJavaDebugging_SupportSlowDevicesfalse - - - MWJava_Language_optimizefalse - MWJava_Language_warnDeprecatedfalse - MWJava_Language_emitMapfalse - MWJava_Language_strictFileNamesfalse - MWJava_Language_strictFileHierarchyfalse - MWJava_Language_1_1_Compatiblefalse - MWJava_Language_emitHeaders0 - MWJava_Language_headerTypeJNINativeHeaders - MWJava_Language_packageFilter - MWJava_Language_genCommentstrue - MWJava_Language_genHeadersfalse - - - MWJava_MRJAppBuilder_outFileMRJApplication - MWJava_MRJAppBuilder_mergefalse - MWJava_MRJAppBuilder_quitMenutrue - MWJava_MRJAppBuilder_growfalse - MWJava_MRJAppBuilder_stdoutTypeConsole - MWJava_MRJAppBuilder_stderrTypeConsole - MWJava_MRJAppBuilder_stdinTypeConsole - MWJava_MRJAppBuilder_appIconPVersion0 - MWJava_MRJAppBuilder_appIconPType0 - MWJava_MRJAppBuilder_appIconPFormat0 - MWJava_MRJAppBuilder_appIconPTree - MWJava_MRJAppBuilder_appIconFile - MWJava_MRJAppBuilder_splashScreenPVersion0 - MWJava_MRJAppBuilder_splashScreenPType0 - MWJava_MRJAppBuilder_splashScreenPFormat0 - MWJava_MRJAppBuilder_splashScreenPTree - MWJava_MRJAppBuilder_splashScreenPICTFile - MWJava_MRJAppBuilder_aboutName - MWJava_MRJAppBuilder_stdoutPVersion0 - MWJava_MRJAppBuilder_stdoutPType0 - MWJava_MRJAppBuilder_stdoutPFormat0 - MWJava_MRJAppBuilder_stdoutPTree - MWJava_MRJAppBuilder_stdoutFile - MWJava_MRJAppBuilder_stdoutAppendfalse - MWJava_MRJAppBuilder_stderrPType0 - MWJava_MRJAppBuilder_stderrPFormat0 - MWJava_MRJAppBuilder_stderrPTree - MWJava_MRJAppBuilder_stderrFile - MWJava_MRJAppBuilder_stderrAppendfalse - MWJava_MRJAppBuilder_stdinPType0 - MWJava_MRJAppBuilder_stdinPFormat0 - MWJava_MRJAppBuilder_stdinPTree - MWJava_MRJAppBuilder_stdinFile - - - MWJava_Output_outputtypeJarFile - MWJava_Output_outfileJavaClasses.jar - MWJava_Output_ftype1514754080 - MWJava_Output_fcreator1297570384 - MWJava_Output_compress0 - MWJava_Output_genManifest0 - MWJava_Output_trunctypeFront - MWJava_Output_deleteClasses0 - MWJava_Output_consoleApp1 - - - MWJava_Proj_projtypeApplet - MWJava_Proj_mainClassName - MWJava_Proj_HTMLAppCreator1463898714 - MWJava_Proj_HTMLAppName - MWJava_Proj_PathVersion0 - MWJava_Proj_PathType0 - MWJava_Proj_PathFormat0 - MWJava_Proj_tree - MWJava_Proj_HTMLAppWin32Name - MWJava_Proj_compress0 - MWJava_Proj_useVM1 - MWJava_Proj_vmarguments - MWJava_Proj_vmName - MWJava_Proj_simPropFile - - - MWJavaDoc_Proj_Version1 - MWJavaDoc_Proj_Depricated1 - MWJavaDoc_Proj_Author1 - MWJavaDoc_Proj_Index1 - MWJavaDoc_Proj_Tree1 - MWJavaDoc_Proj_SunResolveToSame0 - MWJavaDoc_Proj_Shortnames1 - MWJavaDoc_Proj_Folder0 - MWJavaDoc_Proj_GenerateAPILinks0 - MWJavaDoc_Proj_scopePublic - MWJavaDoc_Proj_fcreator1297303877 - MWJavaDoc_Proj_encodingName - MWJavaDoc_Proj_decodingName - MWJavaDoc_Proj_javaPackagePathhttp://java.sun.com/products/jdk/1.1/docs/api/ - - - MWMerge_MacOS_projectTypeApplication - MWMerge_MacOS_outputNameMerge Out - MWMerge_MacOS_outputCreator???? - MWMerge_MacOS_outputTypeAPPL - MWMerge_MacOS_suppressWarning0 - MWMerge_MacOS_copyFragments1 - MWMerge_MacOS_copyResources1 - MWMerge_MacOS_flattenResource0 - MWMerge_MacOS_flatFileNamea.rsrc - MWMerge_MacOS_flatFileOutputPath - Path: - PathFormatMacOS - PathRootProject - - MWMerge_MacOS_skipResources - DLGX - ckid - Proj - WSPC - - - - FileLockedfalse - ResourcesMapIsReadOnlyfalse - PrinterDriverIsMultiFinderCompatiblefalse - Invisiblefalse - HasBundlefalse - NameLockedfalse - Stationeryfalse - HasCustomIconfalse - Sharedfalse - HasBeenInitedfalse - Label0 - Comments - - - MWMacOSPackager_UsePackager0 - MWMacOSPackager_FolderToPackage - Path: - PathFormatMacOS - PathRootProject - - MWMacOSPackager_CreateClassicAlias0 - MWMacOSPackager_ClassicAliasMethodUseTargetOutput - MWMacOSPackager_ClassicAliasPath - Path: - PathFormatMacOS - PathRootProject - - MWMacOSPackager_CreatePkgInfo0 - MWMacOSPackager_PkgCreatorType???? - MWMacOSPackager_PkgFileTypeAPPL - - - MWCodeGen_PPC_structalignmentPPC - MWCodeGen_PPC_tracebacktablesInline - MWCodeGen_PPC_processorGeneric - MWCodeGen_PPC_readonlystrings0 - MWCodeGen_PPC_tocdata1 - MWCodeGen_PPC_profiler0 - MWCodeGen_PPC_fpcontract1 - MWCodeGen_PPC_schedule0 - MWCodeGen_PPC_peephole0 - MWCodeGen_PPC_processorspecific0 - MWCodeGen_PPC_altivec0 - MWCodeGen_PPC_vectortocdata0 - MWCodeGen_PPC_vrsave0 - - - MWCodeGen_MachO_structalignmentPPC - MWCodeGen_MachO_tracebacktablesNone - MWCodeGen_MachO_processorGeneric - MWCodeGen_MachO_readonlystrings0 - MWCodeGen_MachO_profiler0 - MWCodeGen_MachO_fpcontract1 - MWCodeGen_MachO_schedule0 - MWCodeGen_MachO_peephole1 - MWCodeGen_MachO_processorspecific0 - MWCodeGen_MachO_altivec0 - MWCodeGen_MachO_vrsave1 - MWCodeGen_MachO_common0 - MWCodeGen_MachO_implicit_templates1 - - - MWDisassembler_PPC_showcode1 - MWDisassembler_PPC_extended1 - MWDisassembler_PPC_mix0 - MWDisassembler_PPC_nohex0 - MWDisassembler_PPC_showdata1 - MWDisassembler_PPC_showexceptions1 - MWDisassembler_PPC_showsym0 - MWDisassembler_PPC_shownames1 - - - GlobalOptimizer_PPC_optimizationlevelLevel0 - GlobalOptimizer_PPC_optforSpeed - - - MWLinker_PPC_linksym1 - MWLinker_PPC_symfullpath1 - MWLinker_PPC_linkmap0 - MWLinker_PPC_nolinkwarnings0 - MWLinker_PPC_dontdeadstripinitcode0 - MWLinker_PPC_permitmultdefs1 - MWLinker_PPC_linkmodeFast - MWLinker_PPC_initname__NSInitialize - MWLinker_PPC_mainname - MWLinker_PPC_termname__NSTerminate - - - MWLinker_MachO_exportsNone - MWLinker_MachO_mainnamestart - MWLinker_MachO_currentversion0 - MWLinker_MachO_compatibleversion0 - MWLinker_MachO_symfullpath0 - MWLinker_MachO_supresswarnings0 - MWLinker_MachO_multisymerror0 - MWLinker_MachO_prebind1 - MWLinker_MachO_deadstrip1 - MWLinker_MachO_objectivecsemantics0 - MWLinker_MachO_whichfileloaded0 - MWLinker_MachO_whyfileloaded0 - MWLinker_MachO_readonlyrelocsErrors - MWLinker_MachO_undefinedsymbolsErrors - MWLinker_MachO_twolevelnamespace1 - MWLinker_MachO_stripdebugsymbols0 - - - MWProject_MachO_typeExecutable - MWProject_MachO_outfilea.exe - MWProject_MachO_filecreator???? - MWProject_MachO_filetypeMEXE - MWProject_MachO_stacksize64 - MWProject_MachO_stackaddress0 - MWProject_MachO_flatrsrc1 - MWProject_MachO_flatrsrcfilenamea.rsrc - MWProject_MachO_flatrsrcoutputdir - Path: - PathFormatMacOS - PathRootProject - - MWProject_MachO_installpath./ - - - MWPEF_exportsPragma - MWPEF_libfolder0 - MWPEF_sortcodeNone - MWPEF_expandbss0 - MWPEF_sharedata0 - MWPEF_olddefversion100 - MWPEF_oldimpversion100 - MWPEF_currentversion100 - MWPEF_fragmentnameABSYNCSVC_DLL - MWPEF_collapsereloads0 - - - MWProject_PPC_typeSharedLibrary - MWProject_PPC_outfileAbSyncSvc.shlb - MWProject_PPC_filecreatorMOZZ - MWProject_PPC_filetypeshlb - MWProject_PPC_size0 - MWProject_PPC_minsize0 - MWProject_PPC_stacksize0 - MWProject_PPC_flags0 - MWProject_PPC_symfilename - MWProject_PPC_rsrcname - MWProject_PPC_rsrcheaderNative - MWProject_PPC_rsrctype???? - MWProject_PPC_rsrcid0 - MWProject_PPC_rsrcflags0 - MWProject_PPC_rsrcstore0 - MWProject_PPC_rsrcmerge0 - MWProject_PPC_flatrsrc0 - MWProject_PPC_flatrsrcoutputdir - Path: - PathFormatMacOS - PathRootProject - - MWProject_PPC_flatrsrcfilename - - - MWAssembler_PPC_auxheader0 - MWAssembler_PPC_symmodeMac - MWAssembler_PPC_dialectPPC - MWAssembler_PPC_prefixfile - MWAssembler_PPC_typecheck0 - MWAssembler_PPC_warnings0 - MWAssembler_PPC_casesensitive0 - - - MWRez_Language_maxwidth80 - MWRez_Language_scriptRoman - MWRez_Language_alignmentAlign1 - MWRez_Language_filtermodeFilterSkip - MWRez_Language_suppresswarnings0 - MWRez_Language_escapecontrolchars1 - MWRez_Language_prefixname - MWRez_Language_filteredtypes'CODE' 'DATA' 'PICT' - - - MWWinRC_prefixname - - - MWCodeGen_X86_processorGeneric - MWCodeGen_X86_alignmentbytes8 - MWCodeGen_X86_exceptionsZeroOverhead - MWCodeGen_X86_extinst_mmx0 - MWCodeGen_X86_extinst_3dnow0 - MWCodeGen_X86_use_mmx_3dnow_convention0 - MWCodeGen_X86_machinecodelisting0 - MWCodeGen_X86_intrinsics0 - MWCodeGen_X86_syminfo0 - MWCodeGen_X86_codeviewinfo1 - MWCodeGen_X86_extinst_cmov_fcomi0 - MWCodeGen_X86_extinst_sse0 - - - PDisasmX86_showHeaderstrue - PDisasmX86_showSymTabtrue - PDisasmX86_showCodetrue - PDisasmX86_showSourcefalse - PDisasmX86_showHextrue - PDisasmX86_showRelocationtrue - PDisasmX86_showCommentsfalse - PDisasmX86_showDebugfalse - PDisasmX86_showExceptionsfalse - PDisasmX86_showDatatrue - PDisasmX86_showRawfalse - PDisasmX86_verbosefalse - - - MWDebugger_X86_Exceptions - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - GlobalOptimizer_X86_optimizationlevelLevel0 - GlobalOptimizer_X86_optforSpeed - - - MWLinker_X86_entrypointusageDefault - MWLinker_X86_entrypoint - MWLinker_X86_subsystemWinGUI - MWLinker_X86_subsysmajorid4 - MWLinker_X86_subsysminorid0 - MWLinker_X86_usrmajorid0 - MWLinker_X86_usrminorid0 - MWLinker_X86_commandfile - MWLinker_X86_generatemap0 - MWLinker_X86_linksym0 - MWLinker_X86_linkCV1 - - - MWProject_X86_typeApplication - MWProject_X86_outfilenoname.exe - MWProject_X86_baseaddress4194304 - MWProject_X86_maxstacksize1024 - MWProject_X86_minstacksize4 - MWProject_X86_size1024 - MWProject_X86_minsize4 - MWProject_X86_importlib - xpidl Settings - 0001000101000000000000000000000000000000000000000000000000000000 - 0000000000000000 - - - - - Name - NSRuntime.shlb - MacOS - Library - Debug - - - Name - NSPR20.shlb - MacOS - Library - Debug - - - Name - xpcom.shlb - MacOS - Library - Debug - - - Name - NSStdLib.shlb - MacOS - Library - Debug - - - Name - InterfacesStubs - MacOS - Library - Debug - - - Name - NSComponentStartup.o - MacOS - Library - Debug - - - Name - nsAbSyncFactory.cpp - MacOS - Text - Debug - - - Name - nsAbSync.cpp - MacOS - Text - Debug - - - Name - nsAbSyncCRCModel.cpp - MacOS - Text - Debug - - - Name - nsABSyncDriver.cpp - MacOS - Text - Debug - - - Name - nsAbSyncPostEngine.cpp - MacOS - Text - Debug - - - Name - nsSyncDecoderRing.cpp - MacOS - Text - Debug - - - Name - MsgUtil.lib - MacOS - Library - Debug - - - Name - UnicharUtilsStatic.o - MacOS - Library - Debug - - - - - Name - NSComponentStartup.o - MacOS - - - Name - NSRuntime.shlb - MacOS - - - Name - NSPR20.shlb - MacOS - - - Name - xpcom.shlb - MacOS - - - Name - NSStdLib.shlb - MacOS - - - Name - InterfacesStubs - MacOS - - - Name - nsAbSyncFactory.cpp - MacOS - - - Name - nsAbSync.cpp - MacOS - - - Name - nsAbSyncCRCModel.cpp - MacOS - - - Name - nsABSyncDriver.cpp - MacOS - - - Name - nsAbSyncPostEngine.cpp - MacOS - - - Name - nsSyncDecoderRing.cpp - MacOS - - - Name - MsgUtil.lib - MacOS - - - Name - UnicharUtilsStatic.o - MacOS - - - - - - - AbSyncSvcDebug.shlb - AbSyncSvc.shlb - - - - Static Libs - - AbSyncSvc.shlb - Name - UnicharUtilsStatic.o - MacOS - - - AbSyncSvcDebug.shlb - Name - UnicharUtilsStaticDebug.o - MacOS - - - src - - AbSyncSvcDebug.shlb - Name - nsAbSync.cpp - MacOS - - - AbSyncSvcDebug.shlb - Name - nsAbSyncCRCModel.cpp - MacOS - - - AbSyncSvcDebug.shlb - Name - nsABSyncDriver.cpp - MacOS - - - AbSyncSvcDebug.shlb - Name - nsAbSyncPostEngine.cpp - MacOS - - - AbSyncSvcDebug.shlb - Name - nsSyncDecoderRing.cpp - MacOS - - - build - - AbSyncSvcDebug.shlb - Name - nsAbSyncFactory.cpp - MacOS - - - NS Libraries - Optimized - - AbSyncSvc.shlb - Name - NSStdLib.shlb - MacOS - - - AbSyncSvc.shlb - Name - NSRuntime.shlb - MacOS - - - AbSyncSvc.shlb - Name - NSPR20.shlb - MacOS - - - AbSyncSvc.shlb - Name - xpcom.shlb - MacOS - - - AbSyncSvc.shlb - Name - MsgUtil.lib - MacOS - - - Debug - - AbSyncSvcDebug.shlb - Name - NSStdLibDebug.shlb - MacOS - - - AbSyncSvcDebug.shlb - Name - NSRuntimeDebug.shlb - MacOS - - - AbSyncSvcDebug.shlb - Name - NSPR20Debug.shlb - MacOS - - - AbSyncSvcDebug.shlb - Name - xpcomDebug.shlb - MacOS - - - AbSyncSvcDebug.shlb - Name - MsgUtilDebug.lib - MacOS - - - - System Libraries - - AbSyncSvcDebug.shlb - Name - NSComponentStartup.o - MacOS - - - AbSyncSvcDebug.shlb - Name - InterfacesStubs - MacOS - - - - - diff --git a/mozilla/mailnews/absync/macbuild/abSyncIDL.xml b/mozilla/mailnews/absync/macbuild/abSyncIDL.xml deleted file mode 100644 index 5d3c7907fc1..00000000000 --- a/mozilla/mailnews/absync/macbuild/abSyncIDL.xml +++ /dev/null @@ -1,1568 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]> - - - - - headers - - - - UserSourceTrees - - - AlwaysSearchUserPathsfalse - InterpretDOSAndUnixPathsfalse - RequireFrameworkStyleIncludesfalse - UserSearchPaths - - SearchPath - Path::public: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path::::dist:idl: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SystemSearchPaths - - SearchPath - Path: - PathFormatMacOS - PathRootCodeWarrior - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - - - MWRuntimeSettings_WorkingDirectory - MWRuntimeSettings_CommandLine - MWRuntimeSettings_HostApplication - Path - PathFormatGeneric - PathRootAbsolute - - MWRuntimeSettings_EnvVars - - - Linkerxpt Linker - PreLinker - PostLinker - Targetnameheaders - OutputDirectory - Path::::dist:mailnews: - PathFormatMacOS - PathRootProject - - SaveEntriesUsingRelativePathsfalse - - - FileMappings - - FileTypeRSRC - FileExtension - CompilerRez - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.bh - CompilerBalloon Help - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.c - CompilerRunTSScript - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.idl - Compilerxpidl - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.r - CompilerRez - EditLanguageRez - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypersrc - FileExtension - CompilerRez - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileExtension.xpt - Compiler - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - - - CacheModDatestrue - ActivateBrowsertrue - DumpBrowserInfofalse - CacheSubprojectstrue - UseThirdPartyDebuggerfalse - DebuggerAppPath - Path - PathFormatGeneric - PathRootAbsolute - - DebuggerCmdLineArgs - DebuggerWorkingDir - Path - PathFormatGeneric - PathRootAbsolute - - - - LogSystemMessagestrue - AutoTargetDLLsfalse - StopAtWatchpointstrue - PauseWhileRunningfalse - PauseInterval5 - PauseUIFlags0 - AltExePath - Path - PathFormatGeneric - PathRootAbsolute - - StopAtTempBPOnLaunchtrue - CacheSymbolicstrue - TempBPFunctionNamemain - TempBPType0 - - - Enabledfalse - ConnectionName - DownloadPath - LaunchRemoteAppfalse - RemoteAppPath - - - OtherExecutables - - - CustomColor1 - Red0 - Green32767 - Blue0 - - CustomColor2 - Red0 - Green32767 - Blue0 - - CustomColor3 - Red0 - Green32767 - Blue0 - - CustomColor4 - Red0 - Green32767 - Blue0 - - - - MWFrontEnd_C_cplusplus0 - MWFrontEnd_C_checkprotos0 - MWFrontEnd_C_arm0 - MWFrontEnd_C_trigraphs0 - MWFrontEnd_C_onlystdkeywords0 - MWFrontEnd_C_enumsalwaysint0 - MWFrontEnd_C_mpwpointerstyle0 - MWFrontEnd_C_prefixname - MWFrontEnd_C_ansistrict0 - MWFrontEnd_C_mpwcnewline0 - MWFrontEnd_C_wchar_type1 - MWFrontEnd_C_enableexceptions1 - MWFrontEnd_C_dontreusestrings0 - MWFrontEnd_C_poolstrings0 - MWFrontEnd_C_dontinline0 - MWFrontEnd_C_useRTTI1 - MWFrontEnd_C_multibyteaware0 - MWFrontEnd_C_unsignedchars0 - MWFrontEnd_C_autoinline0 - MWFrontEnd_C_booltruefalse1 - MWFrontEnd_C_direct_to_som0 - MWFrontEnd_C_som_env_check0 - MWFrontEnd_C_alwaysinline0 - MWFrontEnd_C_inlinelevel0 - MWFrontEnd_C_ecplusplus0 - MWFrontEnd_C_objective_c0 - MWFrontEnd_C_defer_codegen0 - - - MWWarning_C_warn_illpragma0 - MWWarning_C_warn_emptydecl0 - MWWarning_C_warn_possunwant0 - MWWarning_C_warn_unusedvar0 - MWWarning_C_warn_unusedarg0 - MWWarning_C_warn_extracomma0 - MWWarning_C_pedantic0 - MWWarning_C_warningerrors0 - MWWarning_C_warn_hidevirtual0 - MWWarning_C_warn_implicitconv0 - MWWarning_C_warn_notinlined0 - MWWarning_C_warn_structclass0 - - - MWFTP_Post_hostName - MWFTP_Post_username - MWFTP_Post_password0 - MWFTP_Post_remoteDir - MWFTP_Post_ftp_PathVersion1 - MWFTP_Post_ftp_PathType0 - MWFTP_Post_ftp_PathFormat0 - MWFTP_Post_ftp_tree - MWFTP_Post_uploadDir - MWFTP_Post_ftp_port21 - MWFTP_Post_SendBin1 - MWFTP_Post_ShouldLog1 - - - MWCommandLine_Java_clsName - MWCommandLine_Java_args - - - MWVJavaDebugging_Protocol1 - MWVJavaDebugging_JDKVersion1 - MWVJavaDebugging_TimeOut10 - MWVJavaDebugging_SupportSlowDevicesfalse - - - MWJava_Language_optimizefalse - MWJava_Language_warnDeprecatedfalse - MWJava_Language_emitMapfalse - MWJava_Language_strictFileNamesfalse - MWJava_Language_strictFileHierarchyfalse - MWJava_Language_1_1_Compatiblefalse - MWJava_Language_emitHeaders0 - MWJava_Language_headerTypeJNINativeHeaders - MWJava_Language_packageFilter - MWJava_Language_genCommentstrue - MWJava_Language_genHeadersfalse - - - MWJava_MRJAppBuilder_outFileMRJApplication - MWJava_MRJAppBuilder_mergefalse - MWJava_MRJAppBuilder_quitMenutrue - MWJava_MRJAppBuilder_growfalse - MWJava_MRJAppBuilder_stdoutTypeConsole - MWJava_MRJAppBuilder_stderrTypeConsole - MWJava_MRJAppBuilder_stdinTypeConsole - MWJava_MRJAppBuilder_appIconPVersion0 - MWJava_MRJAppBuilder_appIconPType0 - MWJava_MRJAppBuilder_appIconPFormat0 - MWJava_MRJAppBuilder_appIconPTree - MWJava_MRJAppBuilder_appIconFile - MWJava_MRJAppBuilder_splashScreenPVersion0 - MWJava_MRJAppBuilder_splashScreenPType0 - MWJava_MRJAppBuilder_splashScreenPFormat0 - MWJava_MRJAppBuilder_splashScreenPTree - MWJava_MRJAppBuilder_splashScreenPICTFile - MWJava_MRJAppBuilder_aboutName - MWJava_MRJAppBuilder_stdoutPVersion0 - MWJava_MRJAppBuilder_stdoutPType0 - MWJava_MRJAppBuilder_stdoutPFormat0 - MWJava_MRJAppBuilder_stdoutPTree - MWJava_MRJAppBuilder_stdoutFile - MWJava_MRJAppBuilder_stdoutAppendfalse - MWJava_MRJAppBuilder_stderrPType0 - MWJava_MRJAppBuilder_stderrPFormat0 - MWJava_MRJAppBuilder_stderrPTree - MWJava_MRJAppBuilder_stderrFile - MWJava_MRJAppBuilder_stderrAppendfalse - MWJava_MRJAppBuilder_stdinPType0 - MWJava_MRJAppBuilder_stdinPFormat0 - MWJava_MRJAppBuilder_stdinPTree - MWJava_MRJAppBuilder_stdinFile - - - MWJava_Output_outputtypeJarFile - MWJava_Output_outfileJavaClasses.jar - MWJava_Output_ftype1514754080 - MWJava_Output_fcreator1297570384 - MWJava_Output_compress0 - MWJava_Output_genManifest0 - MWJava_Output_trunctypeFront - MWJava_Output_deleteClasses0 - MWJava_Output_consoleApp1 - - - MWJava_Proj_projtypeApplet - MWJava_Proj_mainClassName - MWJava_Proj_HTMLAppCreator1145457748 - MWJava_Proj_HTMLAppNameMetrowerks Java - MWJava_Proj_PathVersion1 - MWJava_Proj_PathType0 - MWJava_Proj_PathFormat0 - MWJava_Proj_tree - MWJava_Proj_HTMLAppWin32NameInternet Explorer - MWJava_Proj_compress0 - MWJava_Proj_useVM1 - MWJava_Proj_vmarguments - MWJava_Proj_vmName - MWJava_Proj_simPropFile - - - MWJavaDoc_Proj_Version1 - MWJavaDoc_Proj_Depricated1 - MWJavaDoc_Proj_Author1 - MWJavaDoc_Proj_Index1 - MWJavaDoc_Proj_Tree1 - MWJavaDoc_Proj_SunResolveToSame0 - MWJavaDoc_Proj_Shortnames1 - MWJavaDoc_Proj_Folder0 - MWJavaDoc_Proj_GenerateAPILinks0 - MWJavaDoc_Proj_scopePublic - MWJavaDoc_Proj_fcreator1297303877 - MWJavaDoc_Proj_encodingName - MWJavaDoc_Proj_decodingName - MWJavaDoc_Proj_javaPackagePathhttp://java.sun.com/products/jdk/1.1/docs/api/ - - - MWMerge_MacOS_projectTypeApplication - MWMerge_MacOS_outputNameMerge Out - MWMerge_MacOS_outputCreator???? - MWMerge_MacOS_outputTypeAPPL - MWMerge_MacOS_suppressWarning0 - MWMerge_MacOS_copyFragments1 - MWMerge_MacOS_copyResources1 - MWMerge_MacOS_flattenResource0 - MWMerge_MacOS_flatFileNamea.rsrc - MWMerge_MacOS_flatFileOutputPath - Path: - PathFormatMacOS - PathRootProject - - MWMerge_MacOS_skipResources - DLGX - ckid - Proj - WSPC - - - - FileLockedfalse - ResourcesMapIsReadOnlyfalse - PrinterDriverIsMultiFinderCompatiblefalse - Invisiblefalse - HasBundlefalse - NameLockedfalse - Stationeryfalse - HasCustomIconfalse - Sharedfalse - HasBeenInitedfalse - Label0 - Comments - - - MWMacOSPackager_UsePackager0 - MWMacOSPackager_FolderToPackage - Path: - PathFormatMacOS - PathRootProject - - MWMacOSPackager_CreateClassicAlias0 - MWMacOSPackager_ClassicAliasMethodUseTargetOutput - MWMacOSPackager_ClassicAliasPath - Path: - PathFormatMacOS - PathRootProject - - MWMacOSPackager_CreatePkgInfo0 - MWMacOSPackager_PkgCreatorType???? - MWMacOSPackager_PkgFileTypeAPPL - - - MWCodeGen_PPC_structalignmentMC68K - MWCodeGen_PPC_tracebacktablesNone - MWCodeGen_PPC_processorGeneric - MWCodeGen_PPC_readonlystrings0 - MWCodeGen_PPC_tocdata1 - MWCodeGen_PPC_profiler0 - MWCodeGen_PPC_fpcontract1 - MWCodeGen_PPC_schedule0 - MWCodeGen_PPC_peephole1 - MWCodeGen_PPC_processorspecific0 - MWCodeGen_PPC_altivec0 - MWCodeGen_PPC_vectortocdata0 - MWCodeGen_PPC_vrsave0 - - - MWCodeGen_MachO_structalignmentPPC - MWCodeGen_MachO_tracebacktablesNone - MWCodeGen_MachO_processorGeneric - MWCodeGen_MachO_readonlystrings0 - MWCodeGen_MachO_profiler0 - MWCodeGen_MachO_fpcontract1 - MWCodeGen_MachO_schedule0 - MWCodeGen_MachO_peephole1 - MWCodeGen_MachO_processorspecific0 - MWCodeGen_MachO_altivec0 - MWCodeGen_MachO_vrsave1 - MWCodeGen_MachO_common0 - MWCodeGen_MachO_implicit_templates1 - - - MWDisassembler_PPC_showcode1 - MWDisassembler_PPC_extended1 - MWDisassembler_PPC_mix0 - MWDisassembler_PPC_nohex0 - MWDisassembler_PPC_showdata1 - MWDisassembler_PPC_showexceptions1 - MWDisassembler_PPC_showsym0 - MWDisassembler_PPC_shownames1 - - - GlobalOptimizer_PPC_optimizationlevelLevel0 - GlobalOptimizer_PPC_optforSpeed - - - MWLinker_PPC_linksym1 - MWLinker_PPC_symfullpath1 - MWLinker_PPC_linkmap0 - MWLinker_PPC_nolinkwarnings0 - MWLinker_PPC_dontdeadstripinitcode0 - MWLinker_PPC_permitmultdefs0 - MWLinker_PPC_linkmodeFast - MWLinker_PPC_initname - MWLinker_PPC_mainname__start - MWLinker_PPC_termname - - - MWLinker_MachO_exportsNone - MWLinker_MachO_mainnamestart - MWLinker_MachO_currentversion0 - MWLinker_MachO_compatibleversion0 - MWLinker_MachO_symfullpath0 - MWLinker_MachO_supresswarnings0 - MWLinker_MachO_multisymerror0 - MWLinker_MachO_prebind1 - MWLinker_MachO_deadstrip1 - MWLinker_MachO_objectivecsemantics0 - MWLinker_MachO_whichfileloaded0 - MWLinker_MachO_whyfileloaded0 - MWLinker_MachO_readonlyrelocsErrors - MWLinker_MachO_undefinedsymbolsErrors - MWLinker_MachO_twolevelnamespace1 - MWLinker_MachO_stripdebugsymbols0 - - - MWProject_MachO_typeExecutable - MWProject_MachO_outfilea.exe - MWProject_MachO_filecreator???? - MWProject_MachO_filetypeMEXE - MWProject_MachO_stacksize64 - MWProject_MachO_stackaddress0 - MWProject_MachO_flatrsrc1 - MWProject_MachO_flatrsrcfilenamea.rsrc - MWProject_MachO_flatrsrcoutputdir - Path: - PathFormatMacOS - PathRootProject - - MWProject_MachO_installpath./ - - - MWPEF_exportsNone - MWPEF_libfolder0 - MWPEF_sortcodeNone - MWPEF_expandbss0 - MWPEF_sharedata0 - MWPEF_olddefversion0 - MWPEF_oldimpversion0 - MWPEF_currentversion0 - MWPEF_fragmentname - MWPEF_collapsereloads0 - - - MWProject_PPC_typeApplication - MWProject_PPC_outfilea.out - MWProject_PPC_filecreator???? - MWProject_PPC_filetypeAPPL - MWProject_PPC_size384 - MWProject_PPC_minsize384 - MWProject_PPC_stacksize64 - MWProject_PPC_flags22720 - MWProject_PPC_symfilename - MWProject_PPC_rsrcname - MWProject_PPC_rsrcheaderNative - MWProject_PPC_rsrctype???? - MWProject_PPC_rsrcid0 - MWProject_PPC_rsrcflags0 - MWProject_PPC_rsrcstore0 - MWProject_PPC_rsrcmerge0 - MWProject_PPC_flatrsrc0 - MWProject_PPC_flatrsrcoutputdir - Path: - PathFormatMacOS - PathRootProject - - MWProject_PPC_flatrsrcfilename - - - MWAssembler_PPC_auxheader0 - MWAssembler_PPC_symmodeMac - MWAssembler_PPC_dialectPPC - MWAssembler_PPC_prefixfile - MWAssembler_PPC_typecheck0 - MWAssembler_PPC_warnings0 - MWAssembler_PPC_casesensitive0 - - - MWRez_Language_maxwidth80 - MWRez_Language_scriptRoman - MWRez_Language_alignmentAlign1 - MWRez_Language_filtermodeFilterSkip - MWRez_Language_suppresswarnings0 - MWRez_Language_escapecontrolchars1 - MWRez_Language_prefixname - MWRez_Language_filteredtypes'CODE' 'DATA' 'PICT' - - - MWWinRC_prefixname - - - MWCodeGen_X86_processorGeneric - MWCodeGen_X86_alignmentbytes8 - MWCodeGen_X86_exceptionsZeroOverhead - MWCodeGen_X86_extinst_mmx0 - MWCodeGen_X86_extinst_3dnow0 - MWCodeGen_X86_use_mmx_3dnow_convention0 - MWCodeGen_X86_machinecodelisting0 - MWCodeGen_X86_intrinsics0 - MWCodeGen_X86_syminfo0 - MWCodeGen_X86_codeviewinfo1 - MWCodeGen_X86_extinst_cmov_fcomi0 - MWCodeGen_X86_extinst_sse0 - - - PDisasmX86_showHeaderstrue - PDisasmX86_showSymTabtrue - PDisasmX86_showCodetrue - PDisasmX86_showSourcefalse - PDisasmX86_showHextrue - PDisasmX86_showRelocationtrue - PDisasmX86_showCommentsfalse - PDisasmX86_showDebugfalse - PDisasmX86_showExceptionsfalse - PDisasmX86_showDatatrue - PDisasmX86_showRawfalse - PDisasmX86_verbosefalse - - - MWDebugger_X86_Exceptions - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - GlobalOptimizer_X86_optimizationlevelLevel0 - GlobalOptimizer_X86_optforSpeed - - - MWLinker_X86_entrypointusageDefault - MWLinker_X86_entrypoint - MWLinker_X86_subsystemWinGUI - MWLinker_X86_subsysmajorid4 - MWLinker_X86_subsysminorid0 - MWLinker_X86_usrmajorid0 - MWLinker_X86_usrminorid0 - MWLinker_X86_commandfile - MWLinker_X86_generatemap0 - MWLinker_X86_linksym0 - MWLinker_X86_linkCV1 - - - MWProject_X86_typeApplication - MWProject_X86_outfilenoname.exe - MWProject_X86_baseaddress4194304 - MWProject_X86_maxstacksize1024 - MWProject_X86_minstacksize4 - MWProject_X86_size1024 - MWProject_X86_minsize4 - MWProject_X86_importlib - xpidl Settings - 00010001010111416253796E635376632E686561646572737373000000000000 - 0000000000000000 - - - - - Name - nsIAbSync.idl - MacOS - Text - - - - Name - nsIAbSyncDriver.idl - MacOS - Text - - - - Name - nsIAbSyncListener.idl - MacOS - Text - - - - Name - nsIAbSyncPostEngine.idl - MacOS - Text - - - - Name - nsIAbSyncPostListener.idl - MacOS - Text - - - - Name - nsIAbSyncMojo.idl - MacOS - Text - - - - - - Name - nsIAbSync.idl - MacOS - - - Name - nsIAbSyncDriver.idl - MacOS - - - Name - nsIAbSyncListener.idl - MacOS - - - Name - nsIAbSyncPostEngine.idl - MacOS - - - Name - nsIAbSyncPostListener.idl - MacOS - - - Name - nsIAbSyncMojo.idl - MacOS - - - - - AbSyncSvc.xpt - - - - UserSourceTrees - - - AlwaysSearchUserPathsfalse - InterpretDOSAndUnixPathsfalse - RequireFrameworkStyleIncludesfalse - UserSearchPaths - - SearchPath - Path::public: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SearchPath - Path::::dist:idl: - PathFormatMacOS - PathRootProject - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - SystemSearchPaths - - SearchPath - Path: - PathFormatMacOS - PathRootCodeWarrior - - Recursivetrue - FrameworkPathfalse - HostFlagsAll - - - - - MWRuntimeSettings_WorkingDirectory - MWRuntimeSettings_CommandLine - MWRuntimeSettings_HostApplication - Path - PathFormatGeneric - PathRootAbsolute - - MWRuntimeSettings_EnvVars - - - Linkerxpt Linker - PreLinker - PostLinker - TargetnameAbSyncSvc.xpt - OutputDirectory - Path: - PathFormatMacOS - PathRootProject - - SaveEntriesUsingRelativePathsfalse - - - FileMappings - - FileTypeRSRC - FileExtension - CompilerRez - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.bh - CompilerBalloon Help - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.c - CompilerRunTSScript - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.idl - Compilerxpidl - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypeTEXT - FileExtension.r - CompilerRez - EditLanguageRez - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - FileTypersrc - FileExtension - CompilerRez - EditLanguage - Precompilefalse - Launchabletrue - ResourceFiletrue - IgnoredByMakefalse - - - FileExtension.xpt - Compiler - EditLanguage - Precompilefalse - Launchablefalse - ResourceFilefalse - IgnoredByMakefalse - - - - - CacheModDatestrue - ActivateBrowsertrue - DumpBrowserInfofalse - CacheSubprojectstrue - UseThirdPartyDebuggerfalse - DebuggerAppPath - Path - PathFormatGeneric - PathRootAbsolute - - DebuggerCmdLineArgs - DebuggerWorkingDir - Path - PathFormatGeneric - PathRootAbsolute - - - - LogSystemMessagestrue - AutoTargetDLLsfalse - StopAtWatchpointstrue - PauseWhileRunningfalse - PauseInterval5 - PauseUIFlags0 - AltExePath - Path - PathFormatGeneric - PathRootAbsolute - - StopAtTempBPOnLaunchtrue - CacheSymbolicstrue - TempBPFunctionNamemain - TempBPType0 - - - Enabledfalse - ConnectionName - DownloadPath - LaunchRemoteAppfalse - RemoteAppPath - - - OtherExecutables - - - CustomColor1 - Red0 - Green32767 - Blue0 - - CustomColor2 - Red0 - Green32767 - Blue0 - - CustomColor3 - Red0 - Green32767 - Blue0 - - CustomColor4 - Red0 - Green32767 - Blue0 - - - - MWFrontEnd_C_cplusplus0 - MWFrontEnd_C_checkprotos0 - MWFrontEnd_C_arm0 - MWFrontEnd_C_trigraphs0 - MWFrontEnd_C_onlystdkeywords0 - MWFrontEnd_C_enumsalwaysint0 - MWFrontEnd_C_mpwpointerstyle0 - MWFrontEnd_C_prefixname - MWFrontEnd_C_ansistrict0 - MWFrontEnd_C_mpwcnewline0 - MWFrontEnd_C_wchar_type1 - MWFrontEnd_C_enableexceptions1 - MWFrontEnd_C_dontreusestrings0 - MWFrontEnd_C_poolstrings0 - MWFrontEnd_C_dontinline0 - MWFrontEnd_C_useRTTI1 - MWFrontEnd_C_multibyteaware0 - MWFrontEnd_C_unsignedchars0 - MWFrontEnd_C_autoinline0 - MWFrontEnd_C_booltruefalse1 - MWFrontEnd_C_direct_to_som0 - MWFrontEnd_C_som_env_check0 - MWFrontEnd_C_alwaysinline0 - MWFrontEnd_C_inlinelevel0 - MWFrontEnd_C_ecplusplus0 - MWFrontEnd_C_objective_c0 - MWFrontEnd_C_defer_codegen0 - - - MWWarning_C_warn_illpragma0 - MWWarning_C_warn_emptydecl0 - MWWarning_C_warn_possunwant0 - MWWarning_C_warn_unusedvar0 - MWWarning_C_warn_unusedarg0 - MWWarning_C_warn_extracomma0 - MWWarning_C_pedantic0 - MWWarning_C_warningerrors0 - MWWarning_C_warn_hidevirtual0 - MWWarning_C_warn_implicitconv0 - MWWarning_C_warn_notinlined0 - MWWarning_C_warn_structclass0 - - - MWFTP_Post_hostName - MWFTP_Post_username - MWFTP_Post_password0 - MWFTP_Post_remoteDir - MWFTP_Post_ftp_PathVersion0 - MWFTP_Post_ftp_PathType0 - MWFTP_Post_ftp_PathFormat0 - MWFTP_Post_ftp_tree - MWFTP_Post_uploadDir - MWFTP_Post_ftp_port21 - MWFTP_Post_SendBin1 - MWFTP_Post_ShouldLog1 - - - MWCommandLine_Java_clsName - MWCommandLine_Java_args - - - MWVJavaDebugging_Protocol1 - MWVJavaDebugging_JDKVersion1 - MWVJavaDebugging_TimeOut10 - MWVJavaDebugging_SupportSlowDevicesfalse - - - MWJava_Language_optimizefalse - MWJava_Language_warnDeprecatedfalse - MWJava_Language_emitMapfalse - MWJava_Language_strictFileNamesfalse - MWJava_Language_strictFileHierarchyfalse - MWJava_Language_1_1_Compatiblefalse - MWJava_Language_emitHeaders0 - MWJava_Language_headerTypeJNINativeHeaders - MWJava_Language_packageFilter - MWJava_Language_genCommentstrue - MWJava_Language_genHeadersfalse - - - MWJava_MRJAppBuilder_outFileMRJApplication - MWJava_MRJAppBuilder_mergefalse - MWJava_MRJAppBuilder_quitMenutrue - MWJava_MRJAppBuilder_growfalse - MWJava_MRJAppBuilder_stdoutTypeConsole - MWJava_MRJAppBuilder_stderrTypeConsole - MWJava_MRJAppBuilder_stdinTypeConsole - MWJava_MRJAppBuilder_appIconPVersion0 - MWJava_MRJAppBuilder_appIconPType0 - MWJava_MRJAppBuilder_appIconPFormat0 - MWJava_MRJAppBuilder_appIconPTree - MWJava_MRJAppBuilder_appIconFile - MWJava_MRJAppBuilder_splashScreenPVersion0 - MWJava_MRJAppBuilder_splashScreenPType0 - MWJava_MRJAppBuilder_splashScreenPFormat0 - MWJava_MRJAppBuilder_splashScreenPTree - MWJava_MRJAppBuilder_splashScreenPICTFile - MWJava_MRJAppBuilder_aboutName - MWJava_MRJAppBuilder_stdoutPVersion0 - MWJava_MRJAppBuilder_stdoutPType0 - MWJava_MRJAppBuilder_stdoutPFormat0 - MWJava_MRJAppBuilder_stdoutPTree - MWJava_MRJAppBuilder_stdoutFile - MWJava_MRJAppBuilder_stdoutAppendfalse - MWJava_MRJAppBuilder_stderrPType0 - MWJava_MRJAppBuilder_stderrPFormat0 - MWJava_MRJAppBuilder_stderrPTree - MWJava_MRJAppBuilder_stderrFile - MWJava_MRJAppBuilder_stderrAppendfalse - MWJava_MRJAppBuilder_stdinPType0 - MWJava_MRJAppBuilder_stdinPFormat0 - MWJava_MRJAppBuilder_stdinPTree - MWJava_MRJAppBuilder_stdinFile - - - MWJava_Output_outputtypeJarFile - MWJava_Output_outfileJavaClasses.jar - MWJava_Output_ftype1514754080 - MWJava_Output_fcreator1297570384 - MWJava_Output_compress0 - MWJava_Output_genManifest0 - MWJava_Output_trunctypeFront - MWJava_Output_deleteClasses0 - MWJava_Output_consoleApp1 - - - MWJava_Proj_projtypeApplet - MWJava_Proj_mainClassName - MWJava_Proj_HTMLAppCreator1463898714 - MWJava_Proj_HTMLAppName - MWJava_Proj_PathVersion0 - MWJava_Proj_PathType0 - MWJava_Proj_PathFormat0 - MWJava_Proj_tree - MWJava_Proj_HTMLAppWin32Name - MWJava_Proj_compress0 - MWJava_Proj_useVM1 - MWJava_Proj_vmarguments - MWJava_Proj_vmName - MWJava_Proj_simPropFile - - - MWJavaDoc_Proj_Version1 - MWJavaDoc_Proj_Depricated1 - MWJavaDoc_Proj_Author1 - MWJavaDoc_Proj_Index1 - MWJavaDoc_Proj_Tree1 - MWJavaDoc_Proj_SunResolveToSame0 - MWJavaDoc_Proj_Shortnames1 - MWJavaDoc_Proj_Folder0 - MWJavaDoc_Proj_GenerateAPILinks0 - MWJavaDoc_Proj_scopePublic - MWJavaDoc_Proj_fcreator1297303877 - MWJavaDoc_Proj_encodingName - MWJavaDoc_Proj_decodingName - MWJavaDoc_Proj_javaPackagePathhttp://java.sun.com/products/jdk/1.1/docs/api/ - - - MWMerge_MacOS_projectTypeApplication - MWMerge_MacOS_outputNameMerge Out - MWMerge_MacOS_outputCreator???? - MWMerge_MacOS_outputTypeAPPL - MWMerge_MacOS_suppressWarning0 - MWMerge_MacOS_copyFragments1 - MWMerge_MacOS_copyResources1 - MWMerge_MacOS_flattenResource0 - MWMerge_MacOS_flatFileNamea.rsrc - MWMerge_MacOS_flatFileOutputPath - Path: - PathFormatMacOS - PathRootProject - - MWMerge_MacOS_skipResources - DLGX - ckid - Proj - WSPC - - - - FileLockedfalse - ResourcesMapIsReadOnlyfalse - PrinterDriverIsMultiFinderCompatiblefalse - Invisiblefalse - HasBundlefalse - NameLockedfalse - Stationeryfalse - HasCustomIconfalse - Sharedfalse - HasBeenInitedfalse - Label0 - Comments - - - MWMacOSPackager_UsePackager0 - MWMacOSPackager_FolderToPackage - Path: - PathFormatMacOS - PathRootProject - - MWMacOSPackager_CreateClassicAlias0 - MWMacOSPackager_ClassicAliasMethodUseTargetOutput - MWMacOSPackager_ClassicAliasPath - Path: - PathFormatMacOS - PathRootProject - - MWMacOSPackager_CreatePkgInfo0 - MWMacOSPackager_PkgCreatorType???? - MWMacOSPackager_PkgFileTypeAPPL - - - MWCodeGen_PPC_structalignmentMC68K - MWCodeGen_PPC_tracebacktablesNone - MWCodeGen_PPC_processorGeneric - MWCodeGen_PPC_readonlystrings0 - MWCodeGen_PPC_tocdata1 - MWCodeGen_PPC_profiler0 - MWCodeGen_PPC_fpcontract1 - MWCodeGen_PPC_schedule0 - MWCodeGen_PPC_peephole1 - MWCodeGen_PPC_processorspecific0 - MWCodeGen_PPC_altivec0 - MWCodeGen_PPC_vectortocdata0 - MWCodeGen_PPC_vrsave0 - - - MWCodeGen_MachO_structalignmentPPC - MWCodeGen_MachO_tracebacktablesNone - MWCodeGen_MachO_processorGeneric - MWCodeGen_MachO_readonlystrings0 - MWCodeGen_MachO_profiler0 - MWCodeGen_MachO_fpcontract1 - MWCodeGen_MachO_schedule0 - MWCodeGen_MachO_peephole1 - MWCodeGen_MachO_processorspecific0 - MWCodeGen_MachO_altivec0 - MWCodeGen_MachO_vrsave1 - MWCodeGen_MachO_common0 - MWCodeGen_MachO_implicit_templates1 - - - MWDisassembler_PPC_showcode1 - MWDisassembler_PPC_extended1 - MWDisassembler_PPC_mix0 - MWDisassembler_PPC_nohex0 - MWDisassembler_PPC_showdata1 - MWDisassembler_PPC_showexceptions1 - MWDisassembler_PPC_showsym0 - MWDisassembler_PPC_shownames1 - - - GlobalOptimizer_PPC_optimizationlevelLevel0 - GlobalOptimizer_PPC_optforSpeed - - - MWLinker_PPC_linksym1 - MWLinker_PPC_symfullpath1 - MWLinker_PPC_linkmap0 - MWLinker_PPC_nolinkwarnings0 - MWLinker_PPC_dontdeadstripinitcode0 - MWLinker_PPC_permitmultdefs0 - MWLinker_PPC_linkmodeFast - MWLinker_PPC_initname - MWLinker_PPC_mainname__start - MWLinker_PPC_termname - - - MWLinker_MachO_exportsNone - MWLinker_MachO_mainnamestart - MWLinker_MachO_currentversion0 - MWLinker_MachO_compatibleversion0 - MWLinker_MachO_symfullpath0 - MWLinker_MachO_supresswarnings0 - MWLinker_MachO_multisymerror0 - MWLinker_MachO_prebind1 - MWLinker_MachO_deadstrip1 - MWLinker_MachO_objectivecsemantics0 - MWLinker_MachO_whichfileloaded0 - MWLinker_MachO_whyfileloaded0 - MWLinker_MachO_readonlyrelocsErrors - MWLinker_MachO_undefinedsymbolsErrors - MWLinker_MachO_twolevelnamespace1 - MWLinker_MachO_stripdebugsymbols0 - - - MWProject_MachO_typeExecutable - MWProject_MachO_outfilea.exe - MWProject_MachO_filecreator???? - MWProject_MachO_filetypeMEXE - MWProject_MachO_stacksize64 - MWProject_MachO_stackaddress0 - MWProject_MachO_flatrsrc1 - MWProject_MachO_flatrsrcfilenamea.rsrc - MWProject_MachO_flatrsrcoutputdir - Path: - PathFormatMacOS - PathRootProject - - MWProject_MachO_installpath./ - - - MWPEF_exportsNone - MWPEF_libfolder0 - MWPEF_sortcodeNone - MWPEF_expandbss0 - MWPEF_sharedata0 - MWPEF_olddefversion0 - MWPEF_oldimpversion0 - MWPEF_currentversion0 - MWPEF_fragmentname - MWPEF_collapsereloads0 - - - MWProject_PPC_typeApplication - MWProject_PPC_outfilea.out - MWProject_PPC_filecreator???? - MWProject_PPC_filetypeAPPL - MWProject_PPC_size384 - MWProject_PPC_minsize384 - MWProject_PPC_stacksize64 - MWProject_PPC_flags22720 - MWProject_PPC_symfilename - MWProject_PPC_rsrcname - MWProject_PPC_rsrcheaderNative - MWProject_PPC_rsrctype???? - MWProject_PPC_rsrcid0 - MWProject_PPC_rsrcflags0 - MWProject_PPC_rsrcstore0 - MWProject_PPC_rsrcmerge0 - MWProject_PPC_flatrsrc0 - MWProject_PPC_flatrsrcoutputdir - Path: - PathFormatMacOS - PathRootProject - - MWProject_PPC_flatrsrcfilename - - - MWAssembler_PPC_auxheader0 - MWAssembler_PPC_symmodeMac - MWAssembler_PPC_dialectPPC - MWAssembler_PPC_prefixfile - MWAssembler_PPC_typecheck0 - MWAssembler_PPC_warnings0 - MWAssembler_PPC_casesensitive0 - - - MWRez_Language_maxwidth80 - MWRez_Language_scriptRoman - MWRez_Language_alignmentAlign1 - MWRez_Language_filtermodeFilterSkip - MWRez_Language_suppresswarnings0 - MWRez_Language_escapecontrolchars1 - MWRez_Language_prefixname - MWRez_Language_filteredtypes'CODE' 'DATA' 'PICT' - - - MWWinRC_prefixname - - - MWCodeGen_X86_processorGeneric - MWCodeGen_X86_alignmentbytes8 - MWCodeGen_X86_exceptionsZeroOverhead - MWCodeGen_X86_extinst_mmx0 - MWCodeGen_X86_extinst_3dnow0 - MWCodeGen_X86_use_mmx_3dnow_convention0 - MWCodeGen_X86_machinecodelisting0 - MWCodeGen_X86_intrinsics0 - MWCodeGen_X86_syminfo0 - MWCodeGen_X86_codeviewinfo1 - MWCodeGen_X86_extinst_cmov_fcomi0 - MWCodeGen_X86_extinst_sse0 - - - PDisasmX86_showHeaderstrue - PDisasmX86_showSymTabtrue - PDisasmX86_showCodetrue - PDisasmX86_showSourcefalse - PDisasmX86_showHextrue - PDisasmX86_showRelocationtrue - PDisasmX86_showCommentsfalse - PDisasmX86_showDebugfalse - PDisasmX86_showExceptionsfalse - PDisasmX86_showDatatrue - PDisasmX86_showRawfalse - PDisasmX86_verbosefalse - - - MWDebugger_X86_Exceptions - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - GlobalOptimizer_X86_optimizationlevelLevel0 - GlobalOptimizer_X86_optforSpeed - - - MWLinker_X86_entrypointusageDefault - MWLinker_X86_entrypoint - MWLinker_X86_subsystemWinGUI - MWLinker_X86_subsysmajorid4 - MWLinker_X86_subsysminorid0 - MWLinker_X86_usrmajorid0 - MWLinker_X86_usrminorid0 - MWLinker_X86_commandfile - MWLinker_X86_generatemap0 - MWLinker_X86_linksym0 - MWLinker_X86_linkCV1 - - - MWProject_X86_typeApplication - MWProject_X86_outfilenoname.exe - MWProject_X86_baseaddress4194304 - MWProject_X86_maxstacksize1024 - MWProject_X86_minstacksize4 - MWProject_X86_size1024 - MWProject_X86_minsize4 - MWProject_X86_importlib - xpidl Settings - 0001000301010D416253796E635376632E787074747400000000000000000000 - 0000000000000000 - - - - - Name - nsIAbSync.idl - MacOS - Text - - - - Name - nsIAbSyncDriver.idl - MacOS - Text - - - - Name - nsIAbSyncListener.idl - MacOS - Text - - - - Name - nsIAbSyncPostEngine.idl - MacOS - Text - - - - Name - nsIAbSyncPostListener.idl - MacOS - Text - - - - Name - nsIAbSyncMojo.idl - MacOS - Text - - - - - - Name - nsIAbSync.idl - MacOS - - - Name - nsIAbSyncDriver.idl - MacOS - - - Name - nsIAbSyncListener.idl - MacOS - - - Name - nsIAbSyncPostEngine.idl - MacOS - - - Name - nsIAbSyncPostListener.idl - MacOS - - - Name - nsIAbSyncMojo.idl - MacOS - - - - - - - headers - AbSyncSvc.xpt - - - - - headers - Name - nsIAbSync.idl - MacOS - - - headers - Name - nsIAbSyncDriver.idl - MacOS - - - headers - Name - nsIAbSyncListener.idl - MacOS - - - headers - Name - nsIAbSyncPostEngine.idl - MacOS - - - headers - Name - nsIAbSyncPostListener.idl - MacOS - - - headers - Name - nsIAbSyncMojo.idl - MacOS - - - - diff --git a/mozilla/mailnews/absync/macbuild/abSyncPrefix.h b/mozilla/mailnews/absync/macbuild/abSyncPrefix.h deleted file mode 100644 index a5430f119e9..00000000000 --- a/mozilla/mailnews/absync/macbuild/abSyncPrefix.h +++ /dev/null @@ -1,25 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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 Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - - - -#include "MacPrefix.h" diff --git a/mozilla/mailnews/absync/macbuild/abSyncPrefixDebug.h b/mozilla/mailnews/absync/macbuild/abSyncPrefixDebug.h deleted file mode 100644 index 145b3cc22b7..00000000000 --- a/mozilla/mailnews/absync/macbuild/abSyncPrefixDebug.h +++ /dev/null @@ -1,25 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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 Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - */ - - - -#include "MacPrefix_debug.h" diff --git a/mozilla/mailnews/absync/public/Makefile.in b/mozilla/mailnews/absync/public/Makefile.in deleted file mode 100644 index da219abb236..00000000000 --- a/mozilla/mailnews/absync/public/Makefile.in +++ /dev/null @@ -1,42 +0,0 @@ -# -# The contents of this file are subject to the Netscape 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/NPL/ -# -# 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 Netscape are -# Copyright (C) 1998 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# - -DEPTH = ../../.. -topsrcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ - -include $(DEPTH)/config/autoconf.mk - -MODULE = absyncsvc -XPIDL_MODULE = absync - -XPIDLSRCS = \ - nsIAbSync.idl \ - nsIAbSyncMojo.idl \ - nsIAbSyncListener.idl \ - nsIAbSyncPostEngine.idl \ - nsIAbSyncPostListener.idl \ - nsIAbSyncDriver.idl \ - $(NULL) - -include $(topsrcdir)/config/rules.mk - diff --git a/mozilla/mailnews/absync/public/nsIAbSync.idl b/mozilla/mailnews/absync/public/nsIAbSync.idl deleted file mode 100644 index d57e4b54619..00000000000 --- a/mozilla/mailnews/absync/public/nsIAbSync.idl +++ /dev/null @@ -1,69 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * 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 NPL, 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 NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ -#include "nsrootidl.idl" -#include "nsIAbSyncListener.idl" -#include "nsIMsgStatusFeedback.idl" - -[uuid(3c9cbef8-070b-4123-98b2-9297443a8cd1)] -interface nsIAbSyncState -{ - const long nsIAbSyncIdle = 0; - const long nsIAbSyncRunning = 1; -}; - - -[scriptable, uuid(74872D27-0A4E-11d4-8FD6-00A024A7D144)] -interface nsIAbSync : nsISupports { - /* - * This is the primary interface for performing AB Sync operations - */ - - /* Add or remove a listener for this particular sync operation */ - void AddSyncListener(in nsIAbSyncListener aListener); - void RemoveSyncListener(in nsIAbSyncListener aListener); - - /* Get the nsIAbSyncPostEngineState of the sync operation */ - PRInt32 GetCurrentState(); - - /* - * Send the protocol request and get a transaction ID in return that - * will be sent along with all sync listener operations - */ - void PerformAbSync(in nsIDOMWindowInternal aDOMWindow, out PRInt32 aTransactionID); - void CancelAbSync(); - void SetAbSyncUser(in string aUser); -}; diff --git a/mozilla/mailnews/absync/public/nsIAbSyncDriver.idl b/mozilla/mailnews/absync/public/nsIAbSyncDriver.idl deleted file mode 100644 index d6b695df450..00000000000 --- a/mozilla/mailnews/absync/public/nsIAbSyncDriver.idl +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * 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 NPL, 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 NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#include "nsrootidl.idl" -#include "nsIAbSyncListener.idl" -#include "nsIMsgStatusFeedback.idl" - -[scriptable, uuid(91FDFEE1-EFBC-11d3-8F97-000073757374)] -interface nsIAbSyncDriver : nsIAbSyncListener -{ - void KickIt(in nsIMsgStatusFeedback aStatus, in nsIDOMWindowInternal aDOMWindow); - void CancelIt(); -}; - diff --git a/mozilla/mailnews/absync/public/nsIAbSyncListener.idl b/mozilla/mailnews/absync/public/nsIAbSyncListener.idl deleted file mode 100644 index 5eeb3475c92..00000000000 --- a/mozilla/mailnews/absync/public/nsIAbSyncListener.idl +++ /dev/null @@ -1,96 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * 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 NPL, 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 NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#include "nsISupports.idl" -#include "nsrootidl.idl" - -%{C++ -%} - -[scriptable, uuid(E0ED29E0-098A-11d4-8FD6-00A024A7D144)] -interface nsIAbSyncListener : nsISupports { - - /** - * Notify the observer that the AB Sync Authorization operation has begun. - * - */ - void OnStartAuthOperation(); - - /** - * Notify the observer that the AB Sync operation has been completed. - * - * This method is called regardless of whether the the operation was - * successful. - * - * aTransactionID - the ID for this particular request - * aStatus - Status code for the sync request - * aMsg - A text string describing the error (if any). - * aCookie - hmmm...cooookies! - */ - void OnStopAuthOperation(in nsresult aStatus, in wstring aMsg, in string aCookie); - - /** - * Notify the observer that the AB Sync operation has begun. This method is - * called only once, at the beginning of a sync transaction - * - */ - void OnStartOperation(in PRInt32 aTransactionID, in PRUint32 aMsgSize); - - /** - * Notify the observer that progress as occurred for the AB Sync operation - */ - void OnProgress(in PRInt32 aTransactionID, in PRUint32 aProgress, in PRUint32 aProgressMax); - - /** - * Notify the observer with a status message for sync operation - */ - void OnStatus(in PRInt32 aTransactionID, in wstring aMsg); - - /** - * Notify the observer that the AB Sync operation has been completed. - * - * This method is called regardless of whether the the operation was - * successful. - * - * aTransactionID - the ID for this particular request - * aStatus - Status code for the sync request - * aMsg - A text string describing the error (if any). - */ - void OnStopOperation(in PRInt32 aTransactionID, in nsresult aStatus, - in wstring aMsg); -}; - diff --git a/mozilla/mailnews/absync/public/nsIAbSyncMojo.idl b/mozilla/mailnews/absync/public/nsIAbSyncMojo.idl deleted file mode 100644 index 2278cef6cb7..00000000000 --- a/mozilla/mailnews/absync/public/nsIAbSyncMojo.idl +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * 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 NPL, 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 NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ -#include "nsISupports.idl" -#include "nsIStreamListener.idl" -#include "nsIDocShell.idl" - -%{C++ -#define NS_AB_SYNC_MOJO_CID \ - { 0x842cc263, 0x5255, 0x1144, \ - { 0xcc, 0xb8, 0x44, 0x45, 0x53, 0xff, 0x0, 0x2 } } - -#define NS_AB_SYNC_MOJO_CONTRACTID \ - "@mozilla.org/absync/absyncmojo;1" -%} - -[scriptable, uuid(74872D27-0A4E-11d4-8FD6-BEEF24A7D144)] -interface nsIAbSyncMojo : nsISupports { - /* - * This is the primary interface for performing AB Sync mojo operations - */ - string BuildMojoString(in nsIDocShell aRootDocShell); - void StartAbSyncMojo(in nsIStreamListener aListener, - in nsIDocShell aRootDocShell, - in string aUser); - void GetAbSyncMojoResults(out string aMojoUser, out string aMojoString, - out string aMojoSpec, out long aMojoPort); - void CancelTheMojo(); -}; diff --git a/mozilla/mailnews/absync/public/nsIAbSyncPostEngine.idl b/mozilla/mailnews/absync/public/nsIAbSyncPostEngine.idl deleted file mode 100644 index 229d69e4bad..00000000000 --- a/mozilla/mailnews/absync/public/nsIAbSyncPostEngine.idl +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * 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 NPL, 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 NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ -#include "nsISupports.idl" -#include "nsIAbSyncPostListener.idl" -#include "nsIDocShell.idl" - -[scriptable, uuid(E0ED29D3-BEEF-11d4-8FD6-00A024A7D144)] -interface nsIAbSyncPostEngineState -{ - const long nsIAbSyncPostIdle = 0; - const long nsIAbSyncPostRunning = 1; - const long nsIAbSyncAuthenticationRunning = 2; -}; - -[scriptable, uuid(E0ED29D3-098A-11d4-8FD6-00A024A7D144)] -interface nsIAbSyncPostEngine : nsISupports { - /* - * This is the primary interface for posting operations to the - * Address Book server in the sky - */ - - /* Add or remove a listener for this particular sync operation */ - void AddPostListener(in nsIAbSyncPostListener aListener); - void RemovePostListener(in nsIAbSyncPostListener aListener); - - /* Get the nsIAbSyncPostEngineState of the sync operation */ - string BuildMojoString(in nsIDocShell aRootDocShell); - PRInt32 GetCurrentState(); - void GetMojoUserAndSnack(out string aMojoUser, out string aMojoSnack); - - /* - * Send the protocol request and get a transaction ID in return that - * will be sent along with all sync listener operations - */ - void SendAbRequest(in string aSpec, in PRInt32 aPort, in string aProtocolRequest, in PRInt32 aTransactionID, - in nsIDocShell aDocShell, in string aUser); - - /* - * Cancel it! - */ - void CancelAbSync(); -}; diff --git a/mozilla/mailnews/absync/public/nsIAbSyncPostListener.idl b/mozilla/mailnews/absync/public/nsIAbSyncPostListener.idl deleted file mode 100644 index 4fc2d829579..00000000000 --- a/mozilla/mailnews/absync/public/nsIAbSyncPostListener.idl +++ /dev/null @@ -1,99 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * 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 NPL, 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 NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#include "nsISupports.idl" -#include "nsrootidl.idl" - -%{C++ -%} - -[scriptable, uuid(E0ED29E0-098A-11d4-8FD6-00A024A7BEEF)] -interface nsIAbSyncPostListener : nsISupports { - - /** - * Notify the observer that the AB Sync Authorization operation has begun. - * - */ - void OnStartAuthOperation(); - - /** - * Notify the observer that the AB Sync operation has been completed. - * - * This method is called regardless of whether the the operation was - * successful. - * - * aTransactionID - the ID for this particular request - * aStatus - Status code for the sync request - * aMsg - A text string describing the error (if any). - * aCookie - hmmm...cooookies! - */ - void OnStopAuthOperation(in nsresult aStatus, in wstring aMsg, in string aCookie); - - /** - * Notify the observer that the AB Sync operation has begun. This method is - * called only once, at the beginning of a sync transaction - * - */ - void OnStartOperation(in PRInt32 aTransactionID, in PRUint32 aMsgSize); - - /** - * Notify the observer that progress as occurred for the AB Sync operation - */ - void OnProgress(in PRInt32 aTransactionID, in PRUint32 aProgress, in PRUint32 aProgressMax); - - /** - * Notify the observer with a status message for sync operation - */ - void OnStatus(in PRInt32 aTransactionID, in wstring aMsg); - - /** - * Notify the observer that the AB Sync operation has been sent. This - * method is called once when the networking library has finished processing - * the sync operation. - * - * This method is called regardless of whether the the operation was - * successful. - * - * aTransactionID - the ID for this particular request - * aStatus - Status code for the sync request - * aMsg - A text string describing the error (if any). - * aProtocolResponse - The protocol response sent by the AB server - */ - void OnStopOperation(in PRInt32 aTransactionID, in nsresult aStatus, - in wstring aMsg, in string aProtocolResponse); -}; - diff --git a/mozilla/mailnews/absync/resources/locale/en-US/MANIFEST b/mozilla/mailnews/absync/resources/locale/en-US/MANIFEST deleted file mode 100644 index 3a8135b4343..00000000000 --- a/mozilla/mailnews/absync/resources/locale/en-US/MANIFEST +++ /dev/null @@ -1 +0,0 @@ -absync.properties diff --git a/mozilla/mailnews/absync/resources/locale/en-US/absync.properties b/mozilla/mailnews/absync/resources/locale/en-US/absync.properties deleted file mode 100644 index 1781dfb13ec..00000000000 --- a/mozilla/mailnews/absync/resources/locale/en-US/absync.properties +++ /dev/null @@ -1,40 +0,0 @@ -# The contents of this file are subject to the Netscape 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/NPL/ -# -# 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 Netscape are -# Copyright (C) 1998 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# - -# -# The following are used by the Mailing list dialog -# -syncDoneSuccess=Synchronization completed. -syncDoneFailed=Synchronization Failed. -syncDoneCancelled=Synchronization cancelled by user. -syncProgress=Synchronization received %d bytes... -syncStarting=Synchronization starting with %d byte request... -syncConnect=Synchronization connecting to server... -syncStartingAuth=Synchronization authentication started... -syncAuthSuccess=Synchronization authentication complete. -syncAuthFailed=Synchronization authentication failed. -syncInvalidResponse=The server returned invalid response! -syncServerError=The server returned the error: %s -syncNeedPrefs=You need to fill in your Address Book Synchronization preferences before attempting a synchronization operation. -passwordPrompt=Enter your Netscape.com User Name and Password for Address Book Synchronization -passwordTitle=Enter Password -passwordError=You must enter a valid screen name and password for Address Book Synchronization -syncInProgress=Address Book Synchronization in progress...please wait... -exceedMaxRecordError=Synchronization failed because your Personal Address Book has exceeded the maximum limit of 1500 entries. Remove some entries from your Personal Address Book, and then try again. diff --git a/mozilla/mailnews/absync/src/Makefile.in b/mozilla/mailnews/absync/src/Makefile.in deleted file mode 100644 index b886bb34184..00000000000 --- a/mozilla/mailnews/absync/src/Makefile.in +++ /dev/null @@ -1,77 +0,0 @@ -# -# The contents of this file are subject to the Netscape 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/NPL/ -# -# 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 Netscape are -# Copyright (C) 1998 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# - -DEPTH = ../../.. -topsrcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ - -include $(DEPTH)/config/autoconf.mk - -MODULE = absyncsvc -XPIDL_MODULE = absync -LIBRARY_NAME = absync_s -META_COMPONENT = mail -REQUIRES = xpcom \ - string \ - necko \ - mime \ - docshell \ - uriloader \ - pref \ - widget \ - msgbase \ - msgbaseutil \ - dom \ - rdf \ - addrbook \ - intl \ - mork \ - mimetype \ - windowwatcher \ - unicharutil \ - $(NULL) - -CPPSRCS = \ - nsAbSyncPostEngine.cpp \ - nsAbSync.cpp \ - nsAbSyncCRCModel.cpp \ - nsABSyncDriver.cpp \ - nsSyncDecoderRing.cpp \ - $(NULL) - -EXPORTS = \ - nsAbSyncPostEngine.h \ - nsAbSync.h \ - nsAbSyncCRCModel.h \ - nsABSyncDriver.h \ - nsSyncDecoderRing.h \ - $(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 - -ifeq ($(OS_ARCH), Linux) -DEFINES += -D_BSD_SOURCE -endif - diff --git a/mozilla/mailnews/absync/src/nsABSyncDriver.cpp b/mozilla/mailnews/absync/src/nsABSyncDriver.cpp deleted file mode 100644 index 9f0da895ad1..00000000000 --- a/mozilla/mailnews/absync/src/nsABSyncDriver.cpp +++ /dev/null @@ -1,283 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * 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 NPL, 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 NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ -#include "nsABSyncDriver.h" -#include "nsIAbSync.h" -#include "nsAbSyncCID.h" -#include "nsIServiceManager.h" -#include "nsTextFormatter.h" -#include "nsIStringBundle.h" -#include "prmem.h" -#include "nsString.h" -#include "nsCRT.h" - -NS_IMPL_THREADSAFE_ISUPPORTS1(nsAbSyncDriver, nsIAbSyncDriver) -//NS_IMPL_ISUPPORTS1(nsAbSyncDriver, nsIAbSyncDriver) - -static NS_DEFINE_CID(kAbSync, NS_ABSYNC_SERVICE_CID); - -nsAbSyncDriver::nsAbSyncDriver() -{ - /* member initializers and constructor code */ - - mTransactionID = -1; - mStatus = nsnull; -} - -nsAbSyncDriver::~nsAbSyncDriver() -{ - /* destructor code */ -} - -/** - * Notify the observer that the AB Sync Authorization operation has begun. - * - */ -NS_IMETHODIMP -nsAbSyncDriver::OnStartAuthOperation(void) -{ - if (mStatus) - { - PRUnichar *outValue = nsnull; - - // Tweak the button... - mStatus->StartMeteors(); - mStatus->ShowProgress(0); - - outValue = GetString(NS_LITERAL_STRING("syncStartingAuth").get()); - - mStatus->ShowStatusString(outValue); - PR_FREEIF(outValue); - } - - return NS_OK; -} - -/** - * Notify the observer that the AB Sync operation has been completed. - * - * This method is called regardless of whether the the operation was - * successful. - * - * aTransactionID - the ID for this particular request - * aStatus - Status code for the sync request - * aMsg - A text string describing the error (if any). - * aCookie - hmmm...cooookies! - */ -NS_IMETHODIMP -nsAbSyncDriver::OnStopAuthOperation(nsresult aStatus, const PRUnichar *aMsg, const char *aCookie) -{ - if (mStatus) - { - PRUnichar *outValue = nsnull; - - if (NS_SUCCEEDED(aStatus)) - outValue = GetString(NS_LITERAL_STRING("syncAuthSuccess").get()); - else - outValue = GetString(NS_LITERAL_STRING("syncAuthFailed").get()); - - mStatus->ShowStatusString(outValue); - PR_FREEIF(outValue); - } - - return NS_OK; -} - -/* void OnStartOperation (in PRInt32 aTransactionID, in PRUint32 aMsgSize); */ -NS_IMETHODIMP nsAbSyncDriver::OnStartOperation(PRInt32 aTransactionID, PRUint32 aMsgSize) -{ - if (mStatus) - { - PRUnichar *outValue = nsnull; - PRUnichar *msgValue = nsnull; - - // Tweak the button... - mStatus->StartMeteors(); - mStatus->ShowProgress(50); - - outValue = GetString(NS_LITERAL_STRING("syncStarting").get()); - msgValue = nsTextFormatter::smprintf(outValue, aMsgSize); - - mStatus->ShowStatusString(msgValue); - - PR_FREEIF(outValue); - PR_FREEIF(msgValue); - } - - return NS_OK; -} - -/* void OnProgress (in PRInt32 aTransactionID, in PRUint32 aProgress, in PRUint32 aProgressMax); */ -NS_IMETHODIMP nsAbSyncDriver::OnProgress(PRInt32 aTransactionID, PRUint32 aProgress, PRUint32 aProgressMax) -{ - if (mStatus) - { - PRUnichar *outValue = nsnull; - PRUnichar *msgValue = nsnull; - - outValue = GetString(NS_LITERAL_STRING("syncProgress").get()); - msgValue = nsTextFormatter::smprintf(outValue, aProgress); - - mStatus->ShowStatusString(msgValue); - PR_FREEIF(outValue); - PR_FREEIF(msgValue); - } - - return NS_OK; -} - -/* void OnStatus (in PRInt32 aTransactionID, in wstring aMsg); */ -NS_IMETHODIMP nsAbSyncDriver::OnStatus(PRInt32 aTransactionID, const PRUnichar *aMsg) -{ - return mStatus->ShowStatusString(aMsg); -} - -/* void OnStopOperation (in PRInt32 aTransactionID, in nsresult aStatus, in wstring aMsg); */ -NS_IMETHODIMP nsAbSyncDriver::OnStopOperation(PRInt32 aTransactionID, nsresult aStatus, const PRUnichar *aMsg) -{ - if (mStatus) - { - PRUnichar *outValue = nsnull; - - // Tweak the button... - mStatus->StopMeteors(); - mStatus->CloseWindow(); - - if (NS_SUCCEEDED(aStatus)) - outValue = GetString(NS_LITERAL_STRING("syncDoneSuccess").get()); - else - { - if (mCancelled) - outValue = GetString(NS_LITERAL_STRING("syncDoneCancelled").get()); - else - outValue = GetString(NS_LITERAL_STRING("syncDoneFailed").get()); - } - - mStatus->ShowStatusString(outValue); - PR_FREEIF(outValue); - } - - return NS_OK; -} - -/* void KickIt (); */ -NS_IMETHODIMP nsAbSyncDriver::KickIt(nsIMsgStatusFeedback *aStatus, nsIDOMWindowInternal *aDocShell) -{ - nsresult rv = NS_OK; - PRInt32 stateVar; - nsCOMPtr sync(do_GetService(kAbSync, &rv)); - if (NS_FAILED(rv) || !sync) - return rv; - - mCancelled = PR_FALSE; - sync->GetCurrentState(&stateVar); - if (stateVar != nsIAbSyncState::nsIAbSyncIdle) - return NS_ERROR_FAILURE; - - mStatus = aStatus; - - // Add ourselves to the party! - sync->AddSyncListener((nsIAbSyncListener *)this); - - rv = sync->PerformAbSync(aDocShell, &mTransactionID); - if (NS_SUCCEEDED(rv)) - { - if (mStatus) - { - PRUnichar *msgValue = nsnull; - msgValue = GetString(NS_LITERAL_STRING("syncStartingAuth").get()); - mStatus->ShowStatusString(msgValue); - PR_FREEIF(msgValue); - } - } - else - { - // We failed, turn the button back on... - mStatus->StopMeteors(); - mStatus->CloseWindow(); - } - return rv; -} - -#define AB_STRING_URL "chrome://messenger/locale/addressbook/absync.properties" - -PRUnichar * -nsAbSyncDriver::GetString(const PRUnichar *aStringName) -{ - nsresult res = NS_OK; - PRUnichar *ptrv = nsnull; - - if (!mStringBundle) - { - static const char propertyURL[] = AB_STRING_URL; - - nsCOMPtr sBundleService = - do_GetService(NS_STRINGBUNDLE_CONTRACTID, &res); - if (NS_SUCCEEDED(res) && (nsnull != sBundleService)) - { - res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mStringBundle)); - } - } - - if (mStringBundle) - res = mStringBundle->GetStringFromName(aStringName, &ptrv); - - if ( NS_SUCCEEDED(res) && (ptrv) ) - return ptrv; - else - return nsCRT::strdup(aStringName); -} - -// -// What if we want to stop the operation? Call this! -// -NS_IMETHODIMP nsAbSyncDriver::CancelIt() -{ - nsresult rv = NS_OK; - PRInt32 stateVar; - - mCancelled = PR_TRUE; - nsCOMPtr sync(do_GetService(kAbSync, &rv)); - if (NS_FAILED(rv) || !sync) - return rv; - - sync->GetCurrentState(&stateVar); - if (stateVar == nsIAbSyncState::nsIAbSyncIdle) - return NS_ERROR_FAILURE; - - // Cancel this mess... - return sync->CancelAbSync(); -} diff --git a/mozilla/mailnews/absync/src/nsABSyncDriver.h b/mozilla/mailnews/absync/src/nsABSyncDriver.h deleted file mode 100644 index 2ca76f17d17..00000000000 --- a/mozilla/mailnews/absync/src/nsABSyncDriver.h +++ /dev/null @@ -1,66 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * 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 NPL, 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 NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#ifndef __nsAbSyncDriver_h__ -#define __nsAbSyncDriver_h__ - -#include "nsIAbSyncDriver.h" -#include "nsIMsgStatusFeedback.h" -#include "nsIStringBundle.h" -#include "nsCOMPtr.h" - -class nsAbSyncDriver : public nsIAbSyncDriver -{ -public: - NS_DECL_ISUPPORTS - NS_DECL_NSIABSYNCDRIVER - NS_DECL_NSIABSYNCLISTENER - - nsAbSyncDriver(); - virtual ~nsAbSyncDriver(); - /* additional members */ - PRUnichar *GetString(const PRUnichar *aStringName); - -private: - - nsCOMPtr mStringBundle; - PRInt32 mTransactionID; - nsCOMPtr mStatus; - PRBool mCancelled; -}; - -#endif /* __nsAbSyncDriver_h__ */ diff --git a/mozilla/mailnews/absync/src/nsAbSync.cpp b/mozilla/mailnews/absync/src/nsAbSync.cpp deleted file mode 100644 index dd53198930d..00000000000 --- a/mozilla/mailnews/absync/src/nsAbSync.cpp +++ /dev/null @@ -1,3110 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * 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 NPL, 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 NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ -#include "nsAbSync.h" -#include "prmem.h" -#include "nsAbSyncCID.h" -#include "nsIPref.h" -#include "nsIServiceManager.h" -#include "prprf.h" -#include "nsIAddrBookSession.h" -#include "nsAbBaseCID.h" -#include "nsIRDFResource.h" -#include "nsIRDFService.h" -#include "nsRDFCID.h" -#include "nsIDirectoryService.h" -#include "nsAppDirectoryServiceDefs.h" -#include "nsXPIDLString.h" -#include "nsReadableUtils.h" -#include "nsEscape.h" -#include "nsSyncDecoderRing.h" -#include "plstr.h" -#include "nsString.h" -#include "nsReadableUtils.h" -#include "nsUnicharUtils.h" -#include "nsTextFormatter.h" -#include "nsIStringBundle.h" -#include "nsMsgI18N.h" -#include "nsIScriptGlobalObject.h" -#include "nsIInterfaceRequestor.h" -#include "nsIInterfaceRequestorUtils.h" -#include "nsIDocShellTreeItem.h" -#include "nsIDocShellTreeNode.h" -#include "nsIPrompt.h" -#include "nsIWindowWatcher.h" - -static NS_DEFINE_CID(kCAbSyncPostEngineCID, NS_ABSYNC_POST_ENGINE_CID); -static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID); -static NS_DEFINE_CID(kAbCardPropertyCID, NS_ABCARDPROPERTY_CID); - -/* Implementation file */ -NS_IMPL_ISUPPORTS1(nsAbSync, nsIAbSync) - -nsAbSync::nsAbSync() -{ - // For listener array stuff... - mListenerArrayCount = 0; - mListenerArray = nsnull; - mStringBundle = nsnull; - mRootDocShell = nsnull; - mUserName = nsnull; - - InternalInit(); - InitSchemaColumns(); -} - -void -nsAbSync::InternalInit() -{ - /* member initializers and constructor code */ - mCurrentState = nsIAbSyncState::nsIAbSyncIdle; - mTransactionID = 100; - mPostEngine = nsnull; - - mAbSyncPort = 5000; - mAbSyncAddressBook = nsnull; - mAbSyncAddressBookFileName = nsnull; - mHistoryFile = nsnull; - mOldSyncMapingTable = nsnull; - mNewSyncMapingTable = nsnull; - mNewServerTable = nsnull; - - mLastChangeNum = 1; - - mLocale.Assign(NS_LITERAL_STRING("")); - mDeletedRecordTags = nsnull; - mDeletedRecordValues = nsnull; - mNewRecordTags = nsnull; - mNewRecordValues = nsnull; - - mPhoneTypes = nsnull; - mPhoneValues = nsnull; - - mLockFile = nsnull; - mLastSyncFailed = PR_FALSE; - - mCrashTableSize = 0; - mCrashTable = nsnull; -} - -nsresult -nsAbSync::CleanServerTable(nsVoidArray *aArray) -{ - if (!aArray) - return NS_OK; - - for (PRInt32 i=0; iCount(); i++) - { - syncMappingRecord *tRec = (syncMappingRecord *)aArray->ElementAt(i); - if (!tRec) - continue; - - nsCRT::free((char *)tRec); - } - - delete aArray; - return NS_OK; -} - -nsresult -nsAbSync::InternalCleanup(nsresult aResult) -{ - /* cleanup code */ - DeleteListeners(); - - PR_FREEIF(mAbSyncAddressBook); - PR_FREEIF(mAbSyncAddressBookFileName); - - PR_FREEIF(mOldSyncMapingTable); - PR_FREEIF(mNewSyncMapingTable); - - PR_FREEIF(mCrashTable); - - CleanServerTable(mNewServerTable); - - if (mHistoryFile) - mHistoryFile->CloseStream(); - - if (mLockFile) - { - mLockFile->CloseStream(); - - if (NS_SUCCEEDED(aResult)) - mLockFile->Delete(PR_FALSE); - } - - if (mDeletedRecordTags) - { - delete mDeletedRecordTags; - mDeletedRecordTags = nsnull; - } - - if (mDeletedRecordValues) - { - delete mDeletedRecordValues; - mDeletedRecordValues = nsnull; - } - - if (mNewRecordTags) - { - delete mNewRecordTags; - mNewRecordTags = nsnull; - } - - if (mNewRecordValues) - { - delete mNewRecordValues; - mNewRecordValues = nsnull; - } - - if (mPhoneTypes) - { - delete mPhoneTypes; - mPhoneTypes = nsnull; - } - - if (mPhoneValues) - { - delete mPhoneValues; - mPhoneValues = nsnull; - } - - return NS_OK; -} - -nsAbSync::~nsAbSync() -{ - if (mPostEngine) - mPostEngine->RemovePostListener((nsIAbSyncPostListener *)this); - - InternalCleanup(NS_ERROR_FAILURE); -} - -NS_IMETHODIMP -nsAbSync::InitSchemaColumns() -{ - // First, setup the local address book fields... - mSchemaMappingList[0].abField = kFirstNameColumn; - mSchemaMappingList[1].abField = kLastNameColumn; - mSchemaMappingList[2].abField = kDisplayNameColumn; - mSchemaMappingList[3].abField = kNicknameColumn; - mSchemaMappingList[4].abField = kPriEmailColumn; - mSchemaMappingList[5].abField = k2ndEmailColumn; - mSchemaMappingList[6].abField = kPreferMailFormatColumn; - mSchemaMappingList[7].abField = kWorkPhoneColumn; - mSchemaMappingList[8].abField = kHomePhoneColumn; - mSchemaMappingList[9].abField = kFaxColumn; - mSchemaMappingList[10].abField = kPagerColumn; - mSchemaMappingList[11].abField = kCellularColumn; - mSchemaMappingList[12].abField = kHomeAddressColumn; - mSchemaMappingList[13].abField = kHomeAddress2Column; - mSchemaMappingList[14].abField = kHomeCityColumn; - mSchemaMappingList[15].abField = kHomeStateColumn; - mSchemaMappingList[16].abField = kHomeZipCodeColumn; - mSchemaMappingList[17].abField = kHomeCountryColumn; - mSchemaMappingList[18].abField = kWorkAddressColumn; - mSchemaMappingList[19].abField = kWorkAddress2Column; - mSchemaMappingList[20].abField = kWorkCityColumn; - mSchemaMappingList[21].abField = kWorkStateColumn; - mSchemaMappingList[22].abField = kWorkZipCodeColumn; - mSchemaMappingList[23].abField = kWorkCountryColumn; - mSchemaMappingList[24].abField = kJobTitleColumn; - mSchemaMappingList[25].abField = kDepartmentColumn; - mSchemaMappingList[26].abField = kCompanyColumn; - mSchemaMappingList[27].abField = kWebPage1Column; - mSchemaMappingList[28].abField = kWebPage2Column; - mSchemaMappingList[29].abField = kBirthYearColumn; - mSchemaMappingList[30].abField = kBirthMonthColumn; - mSchemaMappingList[31].abField = kBirthDayColumn; - mSchemaMappingList[32].abField = kCustom1Column; - mSchemaMappingList[33].abField = kCustom2Column; - mSchemaMappingList[34].abField = kCustom3Column; - mSchemaMappingList[35].abField = kCustom4Column; - mSchemaMappingList[36].abField = kNotesColumn; - mSchemaMappingList[37].abField = kLastModifiedDateColumn; - - // Now setup the server fields... - mSchemaMappingList[0].serverField = kServerFirstNameColumn; - mSchemaMappingList[1].serverField = kServerLastNameColumn; - mSchemaMappingList[2].serverField = kServerDisplayNameColumn; - mSchemaMappingList[3].serverField = kServerNicknameColumn; - mSchemaMappingList[4].serverField = kServerPriEmailColumn; - mSchemaMappingList[5].serverField = kServer2ndEmailColumn; - mSchemaMappingList[6].serverField = kServerPlainTextColumn; - mSchemaMappingList[7].serverField = kServerWorkPhoneColumn; - mSchemaMappingList[8].serverField = kServerHomePhoneColumn; - mSchemaMappingList[9].serverField = kServerFaxColumn; - mSchemaMappingList[10].serverField = kServerPagerColumn; - mSchemaMappingList[11].serverField = kServerCellularColumn; - mSchemaMappingList[12].serverField = kServerHomeAddressColumn; - mSchemaMappingList[13].serverField = kServerHomeAddress2Column; - mSchemaMappingList[14].serverField = kServerHomeCityColumn; - mSchemaMappingList[15].serverField = kServerHomeStateColumn; - mSchemaMappingList[16].serverField = kServerHomeZipCodeColumn; - mSchemaMappingList[17].serverField = kServerHomeCountryColumn; - mSchemaMappingList[18].serverField = kServerWorkAddressColumn; - mSchemaMappingList[19].serverField = kServerWorkAddress2Column; - mSchemaMappingList[20].serverField = kServerWorkCityColumn; - mSchemaMappingList[21].serverField = kServerWorkStateColumn; - mSchemaMappingList[22].serverField = kServerWorkZipCodeColumn; - mSchemaMappingList[23].serverField = kServerWorkCountryColumn; - mSchemaMappingList[24].serverField = kServerJobTitleColumn; - mSchemaMappingList[25].serverField = kServerDepartmentColumn; - mSchemaMappingList[26].serverField = kServerCompanyColumn; - mSchemaMappingList[27].serverField = kServerWebPage1Column; - mSchemaMappingList[28].serverField = kServerWebPage2Column; - mSchemaMappingList[29].serverField = kServerBirthYearColumn; - mSchemaMappingList[30].serverField = kServerBirthMonthColumn; - mSchemaMappingList[31].serverField = kServerBirthDayColumn; - mSchemaMappingList[32].serverField = kServerCustom1Column; - mSchemaMappingList[33].serverField = kServerCustom2Column; - mSchemaMappingList[34].serverField = kServerCustom3Column; - mSchemaMappingList[35].serverField = kServerCustom4Column; - mSchemaMappingList[36].serverField = kServerNotesColumn; - mSchemaMappingList[37].serverField = kServerLastModifiedDateColumn; - - return NS_OK; -} - -nsresult -nsAbSync::DisplayErrorMessage(const PRUnichar * msg) -{ - nsresult rv = NS_OK; - - if ((!msg) || (!*msg)) - return NS_ERROR_INVALID_ARG; - - if (mRootDocShell) - { - nsCOMPtr dialog; - dialog = do_GetInterface(mRootDocShell, &rv); - if (dialog) - { - rv = dialog->Alert(nsnull, msg); - rv = NS_OK; - } - } - else - rv = NS_ERROR_NULL_POINTER; - - // If we failed before, fall back to the non-parented modal dialog - if (NS_FAILED(rv)) - { - nsCOMPtr dialog; - nsCOMPtr wwatch(do_GetService(NS_WINDOWWATCHER_CONTRACTID)); - if (wwatch) - wwatch->GetNewPrompter(0, getter_AddRefs(dialog)); - - if (!dialog) - return NS_ERROR_FAILURE; - rv = dialog->Alert(nsnull, msg); - } - - return rv; -} - -nsresult -nsAbSync::SetDOMWindow(nsIDOMWindowInternal *aWindow) -{ - if (!aWindow) - return NS_ERROR_NULL_POINTER; - - nsresult rv = NS_OK; - - nsCOMPtr globalScript(do_QueryInterface((nsISupports *)aWindow)); - nsCOMPtr docShell; - if (globalScript) - globalScript->GetDocShell(getter_AddRefs(docShell)); - - nsCOMPtr docShellAsItem(do_QueryInterface(docShell)); - if(docShellAsItem) - { - nsCOMPtr rootAsItem; - docShellAsItem->GetSameTypeRootTreeItem(getter_AddRefs(rootAsItem)); - - nsCOMPtr rootAsNode(do_QueryInterface(rootAsItem)); - nsCOMPtr temp_docShell(do_QueryInterface(rootAsItem)); - mRootDocShell = temp_docShell; - } - - return rv; -} - -/* void SetAbSyncUser (in string aUser); */ -NS_IMETHODIMP -nsAbSync::SetAbSyncUser(const char *aUser) -{ - if (aUser) - mUserName = nsCRT::strdup(aUser); - return NS_OK; -} - -/* void AddSyncListener (in nsIAbSyncListener aListener); */ -NS_IMETHODIMP nsAbSync::AddSyncListener(nsIAbSyncListener *aListener) -{ - if ( (mListenerArrayCount > 0) || mListenerArray ) - { - ++mListenerArrayCount; - mListenerArray = (nsIAbSyncListener **) - PR_Realloc(*mListenerArray, sizeof(nsIAbSyncListener *) * mListenerArrayCount); - if (!mListenerArray) - return NS_ERROR_OUT_OF_MEMORY; - else - { - mListenerArray[mListenerArrayCount - 1] = aListener; - return NS_OK; - } - } - else - { - mListenerArrayCount = 1; - mListenerArray = (nsIAbSyncListener **) PR_Malloc(sizeof(nsIAbSyncListener *) * mListenerArrayCount); - if (!mListenerArray) - return NS_ERROR_OUT_OF_MEMORY; - - memset(mListenerArray, 0, (sizeof(nsIAbSyncListener *) * mListenerArrayCount)); - - mListenerArray[0] = aListener; - NS_ADDREF(mListenerArray[0]); - return NS_OK; - } -} - -/* void RemoveSyncListener (in nsIAbSyncListener aListener); */ -NS_IMETHODIMP nsAbSync::RemoveSyncListener(nsIAbSyncListener *aListener) -{ - PRInt32 i; - for (i=0; iOnStartAuthOperation(); - - return NS_OK; -} - -nsresult -nsAbSync::NotifyListenersOnStopAuthOperation(nsresult aStatus, const PRUnichar *aMsg, const char *aCookie) -{ - PRInt32 i; - for (i=0; iOnStopAuthOperation(aStatus, aMsg, aCookie); - - return NS_OK; -} - -nsresult -nsAbSync::NotifyListenersOnStartSync(PRInt32 aTransactionID, const PRUint32 aMsgSize) -{ - PRInt32 i; - for (i=0; iOnStartOperation(aTransactionID, aMsgSize); - - return NS_OK; -} - -nsresult -nsAbSync::NotifyListenersOnProgress(PRInt32 aTransactionID, PRUint32 aProgress, PRUint32 aProgressMax) -{ - PRInt32 i; - for (i=0; iOnProgress(aTransactionID, aProgress, aProgressMax); - - return NS_OK; -} - -nsresult -nsAbSync::NotifyListenersOnStatus(PRInt32 aTransactionID, const PRUnichar *aMsg) -{ - PRInt32 i; - for (i=0; iOnStatus(aTransactionID, aMsg); - - return NS_OK; -} - -nsresult -nsAbSync::NotifyListenersOnStopSync(PRInt32 aTransactionID, nsresult aStatus, - const PRUnichar *aMsg) -{ - PRInt32 i; - for (i=0; iOnStopOperation(aTransactionID, aStatus, aMsg); - - return NS_OK; -} - - -/** - * Notify the observer that the AB Sync Authorization operation has begun. - * - */ -NS_IMETHODIMP -nsAbSync::OnStartAuthOperation(void) -{ - NotifyListenersOnStartAuthOperation(); - return NS_OK; -} - -/** - * Notify the observer that the AB Sync operation has been completed. - * - * This method is called regardless of whether the the operation was - * successful. - * - * aTransactionID - the ID for this particular request - * aStatus - Status code for the sync request - * aMsg - A text string describing the error (if any). - * aCookie - hmmm...cooookies! - */ -NS_IMETHODIMP -nsAbSync::OnStopAuthOperation(nsresult aStatus, const PRUnichar *aMsg, const char *aCookie) -{ - NotifyListenersOnStopAuthOperation(aStatus, aMsg, aCookie); - return NS_OK; -} - -/* void OnStartOperation (in PRInt32 aTransactionID, in PRUint32 aMsgSize); */ -NS_IMETHODIMP nsAbSync::OnStartOperation(PRInt32 aTransactionID, PRUint32 aMsgSize) -{ - NotifyListenersOnStartSync(aTransactionID, aMsgSize); - return NS_OK; -} - -/* void OnProgress (in PRInt32 aTransactionID, in PRUint32 aProgress, in PRUint32 aProgressMax); */ -NS_IMETHODIMP nsAbSync::OnProgress(PRInt32 aTransactionID, PRUint32 aProgress, PRUint32 aProgressMax) -{ - NotifyListenersOnProgress(aTransactionID, aProgress, aProgressMax); - return NS_OK; -} - -/* void OnStatus (in PRInt32 aTransactionID, in wstring aMsg); */ -NS_IMETHODIMP nsAbSync::OnStatus(PRInt32 aTransactionID, const PRUnichar *aMsg) -{ - NotifyListenersOnStatus(aTransactionID, aMsg); - return NS_OK; -} - -/* void OnStopOperation (in PRInt32 aTransactionID, in nsresult aStatus, in wstring aMsg, out string aProtocolResponse); */ -NS_IMETHODIMP nsAbSync::OnStopOperation(PRInt32 aTransactionID, nsresult aStatus, const PRUnichar *aMsg, const char *aProtocolResponse) -{ - nsresult rv = aStatus; - - // - // Now, figure out what the server told us to do with the sync operation. - // - if ( (aProtocolResponse) && (NS_SUCCEEDED(aStatus)) ) - rv = ProcessServerResponse(aProtocolResponse); - - NotifyListenersOnStopSync(aTransactionID, rv, aMsg); - InternalCleanup(aStatus); - - mCurrentState = nsIAbSyncState::nsIAbSyncIdle; - -#ifdef DEBUG_rhp - printf("ABSYNC: OnStopOperation: Status = %d\n", aStatus); -#endif - return NS_OK; -} - -//////////////////////////////////////////////////////////////////////////////////////// -// -// This is the implementation of the actual sync logic. -// -//////////////////////////////////////////////////////////////////////////////////////// - -/* PRInt32 GetCurrentState (); */ -NS_IMETHODIMP nsAbSync::GetCurrentState(PRInt32 *_retval) -{ - *_retval = mCurrentState; - return NS_OK; -} - -/* void PerformAbSync (out PRInt32 aTransactionID); */ -NS_IMETHODIMP nsAbSync::CancelAbSync() -{ - if (!mPostEngine) - return NS_ERROR_FAILURE; - - return mPostEngine->CancelAbSync(); -} - -/* void PerformAbSync (out PRInt32 aTransactionID); */ -NS_IMETHODIMP nsAbSync::PerformAbSync(nsIDOMWindowInternal *aDOMWindow, PRInt32 *aTransactionID) -{ - nsresult rv; - char *protocolRequest = nsnull; - char *prefixStr = nsnull; - char *clientIDStr = nsnull; - - // We'll need later... - SetDOMWindow(aDOMWindow); - - // If we are already running...don't let anything new start... - if (mCurrentState != nsIAbSyncState::nsIAbSyncIdle) - return NS_ERROR_FAILURE; - - // Make sure everything is set back to NULL's - InternalInit(); - - // Ok, now get the server/port number we should be hitting with - // this request as well as the local address book we will be - // syncing with... - // - nsCOMPtr prefs(do_GetService(NS_PREF_CONTRACTID, &rv)); - NS_ENSURE_SUCCESS(rv, rv); - - prefs->CopyCharPref("mail.absync.address_book", &mAbSyncAddressBook); - prefs->GetIntPref ("mail.absync.last_change", &mLastChangeNum); - if (NS_FAILED(prefs->GetIntPref("mail.absync.port", &mAbSyncPort))) - mAbSyncPort = 5000; - - // More sanity... - if (mLastChangeNum == 0) - mLastChangeNum = 1; - - // Get the string arrays setup for the phone numbers... - mPhoneTypes = new nsStringArray(); - mPhoneValues = new nsStringArray(); - - // Ok, we need to see if a particular address book was in the prefs - // If not, then we will use the default, but if there was one specified, - // we need to do a prefs lookup and get the file name of interest - // The pref format is: user_pref("ldap_2.servers.SherrysAddressBook.filename", "abook-1.mab"); - // - if ( (mAbSyncAddressBook) && (*mAbSyncAddressBook) ) - { - nsCString prefId("ldap_2.servers."); - prefId.Append(mAbSyncAddressBook); - prefId.Append(".filename"); - - prefs->CopyCharPref(prefId.get(), &mAbSyncAddressBookFileName); - } - - mTransactionID++; - - // First, analyze the situation locally and build up a string that we - // will need to post. - // - rv = AnalyzeTheLocalAddressBook(); - if (NS_FAILED(rv)) - goto EarlyExit; - - // We can keep this object around for reuse... - if (!mPostEngine) - { - rv = nsComponentManager::CreateInstance(kCAbSyncPostEngineCID, NULL, NS_GET_IID(nsIAbSyncPostEngine), getter_AddRefs(mPostEngine)); - NS_ENSURE_SUCCESS(rv, rv); - - mPostEngine->AddPostListener((nsIAbSyncPostListener *)this); - } - - rv = mPostEngine->BuildMojoString(mRootDocShell, &clientIDStr); - if (NS_FAILED(rv) || (!clientIDStr)) - goto EarlyExit; - - if (mPostString.IsEmpty()) - prefixStr = PR_smprintf("last=%u&protocol=%s&client=%s&ver=%s", - mLastChangeNum, ABSYNC_PROTOCOL, - clientIDStr, ABSYNC_VERSION); - else - prefixStr = PR_smprintf("last=%u&protocol=%s&client=%s&ver=%s&", - mLastChangeNum, ABSYNC_PROTOCOL, - clientIDStr, ABSYNC_VERSION); - - if (!prefixStr) - { - rv = NS_ERROR_OUT_OF_MEMORY; - OnStopOperation(mTransactionID, NS_ERROR_OUT_OF_MEMORY, nsnull, nsnull); - goto EarlyExit; - } - - mPostString.Insert(NS_ConvertASCIItoUCS2(prefixStr), 0); - nsCRT::free(prefixStr); - - protocolRequest = ToNewCString(mPostString); - if (!protocolRequest) - goto EarlyExit; - - // Ok, FIRE! - rv = mPostEngine->SendAbRequest(nsnull, mAbSyncPort, protocolRequest, mTransactionID, mRootDocShell, mUserName); - if (NS_SUCCEEDED(rv)) - { - mCurrentState = nsIAbSyncState::nsIAbSyncRunning; - } - else - { - OnStopOperation(mTransactionID, rv, nsnull, nsnull); - goto EarlyExit; - } - -EarlyExit: - PR_FREEIF(protocolRequest); - PR_FREEIF(clientIDStr); - - if (NS_FAILED(rv)) - InternalCleanup(rv); - return rv; -} - -NS_IMETHODIMP -nsAbSync::OpenAB(char *aAbName, nsIAddrDatabase **aDatabase) -{ - if (!aDatabase) - return NS_ERROR_FAILURE; - - nsresult rv = NS_OK; - nsFileSpec* dbPath = nsnull; - - nsCOMPtr abSession = - do_GetService(NS_ADDRBOOKSESSION_CONTRACTID, &rv); - if(NS_SUCCEEDED(rv)) - abSession->GetUserProfileDirectory(&dbPath); - - if (dbPath) - { - if (!aAbName) - (*dbPath) += "abook.mab"; - else - (*dbPath) += aAbName; - - nsCOMPtr addrDBFactory = - do_GetService(NS_ADDRDATABASE_CONTRACTID, &rv); - - if (NS_SUCCEEDED(rv) && addrDBFactory) - rv = addrDBFactory->Open(dbPath, PR_TRUE, aDatabase, PR_TRUE); - } - else - rv = NS_ERROR_FAILURE; - - delete dbPath; - - return rv; -} - -NS_IMETHODIMP -nsAbSync::GenerateProtocolForCard(nsIAbCard *aCard, PRBool aAddId, nsString &protLine) -{ - PRUnichar *aName = nsnull; - nsString tProtLine; - PRInt32 phoneCount = 1; - const char *phoneType = nsnull; - - protLine.Truncate(); - - if (aAddId) - { - PRUint32 aKey; - nsresult rv = NS_OK; - - nsCOMPtr dbcard(do_QueryInterface(aCard, &rv)); - NS_ENSURE_SUCCESS(rv, rv); - if (NS_FAILED(dbcard->GetKey(&aKey))) - return NS_ERROR_FAILURE; - -#ifdef DEBUG_rhp - printf("ABSYNC: GENERATING PROTOCOL FOR CARD - Address Book Card Key: %d\n", aKey); -#endif - - char *tVal = PR_smprintf("%d", (aKey * -1)); - if (tVal) - { - tProtLine.Append(NS_LITERAL_STRING("%26cid%3D") + NS_ConvertASCIItoUCS2(tVal)); - nsCRT::free(tVal); - } - } - - for (PRInt32 i=0; iGetCardValue(mSchemaMappingList[i].abField, &aName)) && (aName) && (*aName)) - { - // These are unknown tags we are omitting... - const nsAString& prefix = - Substring(mSchemaMappingList[i].serverField, 0, 5); - if (NS_LITERAL_STRING("OMIT:").Equals(prefix, - nsCaseInsensitiveStringComparator())) - continue; - - // Reset the type... - phoneType = nsnull; - // If this is a phone number, we have to special case this because - // phone #'s are handled differently than all other tags...sigh! - // - if (!nsCRT::strncasecmp(mSchemaMappingList[i].abField, kWorkPhoneColumn, strlen(kWorkPhoneColumn))) - phoneType = ABSYNC_WORK_PHONE_TYPE; - else if (!nsCRT::strncasecmp(mSchemaMappingList[i].abField, kHomePhoneColumn, strlen(kHomePhoneColumn))) - phoneType = ABSYNC_HOME_PHONE_TYPE; - else if (!nsCRT::strncasecmp(mSchemaMappingList[i].abField, kFaxColumn, strlen(kFaxColumn))) - phoneType = ABSYNC_FAX_PHONE_TYPE; - else if (!nsCRT::strncasecmp(mSchemaMappingList[i].abField, kPagerColumn, strlen(kPagerColumn))) - phoneType = ABSYNC_PAGER_PHONE_TYPE; - else if (!nsCRT::strncasecmp(mSchemaMappingList[i].abField, kCellularColumn, strlen(kCellularColumn))) - phoneType = ABSYNC_CELL_PHONE_TYPE; - - if (phoneType) - { - char *pVal = PR_smprintf("phone%d", phoneCount); - if (pVal) - { - tProtLine.Append(NS_LITERAL_STRING("&") + - NS_ConvertASCIItoUCS2(pVal) + - NS_LITERAL_STRING("=")); - - AddValueToProtocolLine(aName, tProtLine); - - tProtLine.Append(NS_LITERAL_STRING("&") + - NS_ConvertASCIItoUCS2(pVal) + - NS_LITERAL_STRING("_type=") + - NS_ConvertASCIItoUCS2(phoneType)); - PR_FREEIF(pVal); - phoneCount++; - } - } - else // Good ole' normal tag... - { - tProtLine.Append(NS_LITERAL_STRING("&") + - mSchemaMappingList[i].serverField + - NS_LITERAL_STRING("=")); - AddValueToProtocolLine(aName, tProtLine); - } - - PR_FREEIF(aName); - } - } - - if (!tProtLine.IsEmpty()) - { - // Now, check if this is that flag for the plain text email selection...if so, - // then tack this information on as well... - PRUint32 format = nsIAbPreferMailFormat::unknown; - if (NS_SUCCEEDED(aCard->GetPreferMailFormat(&format))) - { - if (format != nsIAbPreferMailFormat::html) - aName = ToNewUnicode(NS_LITERAL_STRING("0")); - else - aName = ToNewUnicode(NS_LITERAL_STRING("1")); - - // Just some sanity... - if (aName) - { - tProtLine.Append(NS_LITERAL_STRING("&") + - kServerPlainTextColumn + - NS_LITERAL_STRING("=")); - AddValueToProtocolLine(aName, tProtLine); - - PR_FREEIF(aName); - } - } - - // If the aim screen name is present then add it to the protocol string. - nsresult rv; - nsCOMPtr dbcard(do_QueryInterface(aCard, &rv)); - if (NS_SUCCEEDED(rv) && dbcard) - { - nsCOMPtr prefs(do_GetService(NS_PREF_CONTRACTID, &rv)); - if (NS_SUCCEEDED(rv)) - { - PRUint32 i, prefCount, prefixLen=strlen(SYNC_PREF_PREFIX_CLIENT_MAP); - char** prefNames; - - rv = prefs->GetChildList(SYNC_PREF_PREFIX_CLIENT_MAP, &prefCount, &prefNames); - if (NS_SUCCEEDED(rv) && prefCount > 0) - { - for (i = 0; i < prefCount; i++) - { - nsXPIDLString genericValue; - rv = dbcard->GetStringAttribute(prefNames[i]+prefixLen, getter_Copies(genericValue)); - if (NS_SUCCEEDED(rv) && genericValue.Length()) - { - nsXPIDLCString mapValue; - rv = prefs->CopyCharPref(prefNames[i], getter_Copies(mapValue)); - if (NS_SUCCEEDED(rv) && mapValue.Length()) - { - // Add name tag and value to the protocol string. - tProtLine.Append(NS_LITERAL_STRING("&")); - tProtLine.AppendWithConversion(mapValue); - tProtLine.Append(NS_LITERAL_STRING("=")); - AddValueToProtocolLine(genericValue.get(), tProtLine); - } - } - } // end of for (i = 0; i < prefCount; i++) - - NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(prefCount, prefNames); - } - } - } - - char *tLine = ToNewCString(tProtLine); - if (!tLine) - return NS_ERROR_OUT_OF_MEMORY; - - char *escData = nsEscape(tLine, url_Path); - if (escData) - { - tProtLine = NS_ConvertASCIItoUCS2(escData); - } - - PR_FREEIF(tLine); - PR_FREEIF(escData); - protLine = tProtLine; - } - - return NS_OK; -} - -nsresult nsAbSync::AddValueToProtocolLine(const PRUnichar *value, nsString &protocolLine) -{ - // Escape the value string. - char *utfString = ToNewUTF8String(nsDependentString(value)); - char *escapedStr = nsEscape(utfString, url_Path); - if (escapedStr) - { - PR_FREEIF(utfString); - utfString = escapedStr; - } - if (utfString) - { - protocolLine.Append(NS_ConvertASCIItoUCS2(utfString)); - PR_FREEIF(utfString); - } - else - protocolLine.Append(value); - - return NS_OK; -} - -long -GetCRC(char *str) -{ - cm_t crcModel; - p_cm_t p = &crcModel; - - /* - Name : Crc-32 - Width : 32 - Poly : 04C11DB7 - Init : FFFFFFFF - RefIn : True - RefOut : True - XorOut : FFFFFFFF - Check : CBF43926 - */ - p->cm_width = 32; - p->cm_poly = 0x4C11DB7; - p->cm_init = 0xFFFFFFFF; - p->cm_refin = PR_TRUE; - p->cm_refot = PR_TRUE; - p->cm_xorot = 0xFFFFFFFF; - - char *pChar = str; - cm_ini( p); - for (PRUint32 i = 0; i < strlen(str); i++, pChar++) - cm_nxt( p, *pChar); - - return( cm_crc( p) ); -} - -PRBool -nsAbSync::ThisCardHasChanged(nsIAbCard *aCard, syncMappingRecord *newSyncRecord, nsString &protLine) -{ - syncMappingRecord *historyRecord = nsnull; - PRUint32 counter = 0; - nsString tempProtocolLine; - - // First, null out the protocol return line - protLine.Truncate(); - - // Use the localID for this entry to lookup the old history record in the - // cached array - // - if (mOldSyncMapingTable) - { - while (counter < mOldTableSize) - { - if (mOldSyncMapingTable[counter].localID == newSyncRecord->localID) - { - historyRecord = &(mOldSyncMapingTable[counter]); - break; - } - - counter++; - } - } - - // - // Now, build up the compare protocol line for this entry. - // - if (NS_FAILED(GenerateProtocolForCard(aCard, PR_FALSE, tempProtocolLine))) - return PR_FALSE; - - if (tempProtocolLine.IsEmpty()) - return PR_FALSE; - - // Get the CRC for this temp entry line... - char *tLine = ToNewCString(tempProtocolLine); - if (!tLine) - return PR_FALSE; - newSyncRecord->CRC = GetCRC(tLine); - nsCRT::free(tLine); - - // - // #define SYNC_MODIFIED 0x0001 // Must modify record on server - // #define SYNC_ADD 0x0002 // Must add record to server - // #define SYNC_DELETED 0x0004 // Must delete record from server - // #define SYNC_RETRY 0x0008 // Sent to server but failed...must retry! - // #define SYNC_RENUMBER 0x0010 // Renumber on the server - // - // If we have a history record, we need to carry over old items! - if (historyRecord) - { - newSyncRecord->serverID = historyRecord->serverID; - historyRecord->flags |= SYNC_PROCESSED; - } - - // If this is a record that has changed from comparing CRC's, then - // when can generate a line that should be tacked on to the output - // going up to the server - // - if ( (!historyRecord) || (historyRecord->CRC != newSyncRecord->CRC) ) - { - PRUint32 aKey; - - if (!historyRecord) - { - newSyncRecord->flags |= SYNC_ADD; - - nsresult rv = NS_OK; - nsCOMPtr dbcard(do_QueryInterface(aCard, &rv)); - NS_ENSURE_SUCCESS(rv, rv); - if (NS_FAILED(dbcard->GetKey(&aKey))) - return PR_FALSE; - - // Ugh...this should never happen...BUT?? - if (aKey <= 0) - return PR_FALSE; - - // Needs to be negative, so make it so! - char *tVal = PR_smprintf("%d", (aKey * -1)); - if (tVal) - { - protLine.Append(NS_LITERAL_STRING("%26cid%3D") + - NS_ConvertASCIItoUCS2(tVal) + - tempProtocolLine); - nsCRT::free(tVal); - } - else - { - return PR_FALSE; - } - } - else - { - newSyncRecord->flags |= SYNC_MODIFIED; - - char *tVal2 = PR_smprintf("%d", historyRecord->serverID); - if (tVal2) - { - protLine.Append(NS_LITERAL_STRING("%26id%3D") + - NS_ConvertASCIItoUCS2(tVal2) + - tempProtocolLine); - nsCRT::free(tVal2); - } - else - { - return PR_FALSE; - } - } - - return PR_TRUE; - } - else // This is the same record as before. - { - return PR_FALSE; - } - - return PR_FALSE; -} - -char* -BuildSyncTimestamp(void) -{ - static char result[75] = ""; - PRExplodedTime now; - char buffer[128] = ""; - - // Generate envelope line in format of: From - Sat Apr 18 20:01:49 1998 - // - // Use PR_FormatTimeUSEnglish() to format the date in US English format, - // then figure out what our local GMT offset is, and append it (since - // PR_FormatTimeUSEnglish() can't do that.) Generate four digit years as - // per RFC 1123 (superceding RFC 822.) - // - PR_ExplodeTime(PR_Now(), PR_LocalTimeParameters, &now); - PR_FormatTimeUSEnglish(buffer, sizeof(buffer), - "%a %b %d %H:%M:%S %Y", - &now); - - // This value must be in ctime() format, with English abbreviations. - // PL_strftime("... %c ...") is no good, because it is localized. - // - PL_strcpy(result, "Last - "); - PL_strcpy(result + 7, buffer); - PL_strcpy(result + 7 + 24, CRLF); - return result; -} - -NS_IMETHODIMP -nsAbSync::AnalyzeAllRecords(nsIAddrDatabase *aDatabase, nsIAbDirectory *directory) -{ - nsresult rv = NS_OK; - nsIEnumerator *cardEnum = nsnull; - nsCOMPtr obj = nsnull; - PRBool exists = PR_FALSE; - PRUint32 readCount = 0; - PRInt32 readSize = 0; - PRUint32 workCounter = 0; - nsString singleProtocolLine; - - // Init size vars... - mOldTableSize = 0; - mNewTableSize = 0; - PR_FREEIF(mOldSyncMapingTable); - PR_FREEIF(mNewSyncMapingTable); - CleanServerTable(mNewServerTable); - mCurrentPostRecord = 1; - -#ifdef DEBUG_rhp - printf("ABSYNC: AnalyzeAllRecords:\n"); -#endif - - // - // First thing we need to do is open the absync.dat file - // to compare against the last sync operation. - // - // we want /absync.dat - // - - nsCOMPtr historyFile; - nsCOMPtr lockFile; - - rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(historyFile)); - NS_ENSURE_SUCCESS(rv, rv); - rv = historyFile->AppendNative(NS_LITERAL_CSTRING("absync.dat")); - NS_ENSURE_SUCCESS(rv, rv); - - // TODO: Convert the rest of the code to use - // nsIFile and avoid this conversion hack. - do - { - rv = NS_NewFileSpecFromIFile(historyFile, getter_AddRefs(mHistoryFile)); - if (NS_FAILED(rv)) break; - } - while (0); - - NS_ASSERTION(NS_SUCCEEDED(rv),"ab sync: failed to specify history file"); - if (NS_FAILED(rv)) - { - rv = NS_ERROR_FAILURE; - goto GetOut; - } - - // Now see if we actually have an old table to work with? - // If not, this is the first sync operation. - // - //mOldSyncMapingTable = nsnull; - //mNewSyncMapingTable = nsnull; - mHistoryFile->Exists(&exists); - - // Do this here to be used in case of a crash recovery situation... - rv = aDatabase->EnumerateCards(directory, &cardEnum); - if (NS_FAILED(rv) || (!cardEnum)) - { - rv = NS_ERROR_FAILURE; - goto GetOut; - } - - // - // Now, lets get a lot smarter about failures that may happen during the sync - // operation. If this happens, we should do all that is possible to prevent - // duplicate entries from getting stored in an address book. To that end, we - // will create an "absync.lck" file that will only exist during the synchronization - // operation. The only time the lock file should be on disk at this point is if the - // last sync operation failed. If so, we should build a compare list of the current - // address book and only insert entries that don't have matching CRC's - // - // Note: be very tolerant if any of this stuff fails ... - - rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(lockFile)); - if (NS_SUCCEEDED(rv)) - { - rv = lockFile->AppendNative(NS_LITERAL_CSTRING("absync.lck")); - if (NS_SUCCEEDED(rv)) - { - - // TODO: Convert the rest of the code to use - // nsIFile and avoid this conversion hack. - do - { - rv = NS_NewFileSpecFromIFile(lockFile, getter_AddRefs(mLockFile)); - if (NS_FAILED(rv)) break; - } - while (0); - - if (NS_SUCCEEDED(rv)) - { - PRBool tExists = PR_FALSE; - - mLockFile->Exists(&tExists); - if (tExists) - { - mLastSyncFailed = PR_TRUE; - - // Ok, we got here which means that the last operation must have failed and - // we should build a table of the CRC's of the address book we have locally - // and prevent us from adding the same person twice. Hope this works. - // - cardEnum->First(); - do - { - mCrashTableSize++; - } while (NS_SUCCEEDED(cardEnum->Next())); - - mCrashTable = (syncMappingRecord *) PR_MALLOC(mCrashTableSize * sizeof(syncMappingRecord)); - if (!mCrashTable) - { - mCrashTableSize = 0; - } - else - { - // Init the memory! - memset(mCrashTable, 0, (mCrashTableSize * sizeof(syncMappingRecord)) ); - nsString tProtLine; - - rv = NS_OK; - cardEnum->First(); - do - { - if (NS_FAILED(cardEnum->CurrentItem(getter_AddRefs(obj)))) - break; - else - { - nsCOMPtr card; - card = do_QueryInterface(obj, &rv); - if ( NS_SUCCEEDED(rv) && (card) ) - { - // First, we need to fill out the localID for this entry. This should - // be the ID from the local database for this card entry - // - PRUint32 aKey; - nsresult rv = NS_OK; - nsCOMPtr dbcard(do_QueryInterface(card, &rv)); - if (NS_FAILED(rv) || !dbcard) - continue; - if (NS_FAILED(dbcard->GetKey(&aKey))) - continue; - - // Ugh...this should never happen...BUT?? - if (aKey <= 0) - continue; - - // Ok, now get the data for this record.... - mCrashTable[workCounter].localID = aKey; - if (NS_SUCCEEDED(GenerateProtocolForCard(card, PR_FALSE, tProtLine))) - { - char *tCRCLine = ToNewCString(tProtLine); - if (tCRCLine) - { - mCrashTable[workCounter].CRC = GetCRC(tCRCLine); - PR_FREEIF(tCRCLine); - } - } - } - } - - workCounter++; - } while (NS_SUCCEEDED(cardEnum->Next())); - } - } - else // If here, create the lock file - { - if (NS_SUCCEEDED(mLockFile->OpenStreamForWriting())) - { - char *tMsg = BuildSyncTimestamp(); - PRInt32 tWriteSize; - - mLockFile->Write(tMsg, strlen(tMsg), &tWriteSize); - mLockFile->CloseStream(); - } - } - } - } - } - - // If the old table exists, then we need to load it up! - if (exists) - { - if (NS_SUCCEEDED(mHistoryFile->GetFileSize(&mOldTableSize))) - { - if (NS_FAILED(mHistoryFile->OpenStreamForReading())) - { - rv = NS_ERROR_OUT_OF_MEMORY; - goto GetOut; - } - - mOldSyncMapingTable = (syncMappingRecord *) PR_MALLOC(mOldTableSize); - if (!mOldSyncMapingTable) - { - rv = NS_ERROR_OUT_OF_MEMORY; - goto GetOut; - } - - // Init the memory! - memset(mOldSyncMapingTable, 0, mOldTableSize); - - // Now get the number of records in the table size! - mOldTableSize /= sizeof(syncMappingRecord); - - // Now read the history file into memory! - while (readCount < mOldTableSize) - { - //if (NS_FAILED(mHistoryFile->Read((char **)&(mOldSyncMapingTable[readCount]), - // sizeof(syncMappingRecord), &readSize)) - // || (readSize != sizeof(syncMappingRecord))) - syncMappingRecord *tRecord = &mOldSyncMapingTable[readCount]; - if (NS_FAILED(mHistoryFile->Read((char **)&tRecord, - sizeof(syncMappingRecord), &readSize)) - || (readSize != sizeof(syncMappingRecord))) - { - rv = NS_ERROR_OUT_OF_MEMORY; - goto GetOut; - } - -#ifdef DEBUG_rhp - printf("------ Entry #%d --------\n", readCount); - printf("Old Sync Table: %d\n", mOldSyncMapingTable[readCount].serverID); - printf("Old Sync Table: %d\n", mOldSyncMapingTable[readCount].localID); - printf("Old Sync Table: %d\n", mOldSyncMapingTable[readCount].CRC); - printf("Old Sync Table: %d\n", mOldSyncMapingTable[readCount].flags); -#endif - - readCount++; - } - } - } - - // - // Now create the NEW sync mapping table that we will use for this - // current operation. First, we have to count the total number of - // entries...ugh. - // - cardEnum->First(); - do - { - mNewTableSize++; - } while (NS_SUCCEEDED(cardEnum->Next())); - - mNewSyncMapingTable = (syncMappingRecord *) PR_MALLOC(mNewTableSize * sizeof(syncMappingRecord)); - if (!mNewSyncMapingTable) - { - rv = NS_ERROR_OUT_OF_MEMORY; - goto GetOut; - } - - // Init the memory! - memset(mNewSyncMapingTable, 0, (mNewTableSize * sizeof(syncMappingRecord)) ); - - rv = NS_OK; - workCounter =0; - cardEnum->First(); - do - { - if (NS_FAILED(cardEnum->CurrentItem(getter_AddRefs(obj)))) - break; - else - { - nsCOMPtr card; - card = do_QueryInterface(obj, &rv); - if ( NS_SUCCEEDED(rv) && (card) ) - { - // First, we need to fill out the localID for this entry. This should - // be the ID from the local database for this card entry - // - PRUint32 aKey; - nsresult rv = NS_OK; - nsCOMPtr dbcard(do_QueryInterface(card, &rv)); - if (NS_FAILED(rv) || !dbcard) - continue; - if (NS_FAILED(dbcard->GetKey(&aKey))) - continue; - - // Ugh...this should never happen...BUT?? - if (aKey <= 0) - continue; - - mNewSyncMapingTable[workCounter].localID = aKey; - - if (ThisCardHasChanged(card, &(mNewSyncMapingTable[workCounter]), singleProtocolLine)) - { - // If we get here, we should look at the flags in the mNewSyncMapingTable to see - // what we should add to the protocol header area and then tack on the singleProtcolLine - // we got back from this call. - // - // Need the separator for multiple operations... - if (!mPostString.IsEmpty()) - mPostString.Append(NS_LITERAL_STRING("&")); - - if (mNewSyncMapingTable[workCounter].flags & SYNC_ADD) - { -#ifdef DEBUG_rhp - char *t = ToNewCString(singleProtocolLine); - printf("ABSYNC: ADDING Card: %s\n", t); - PR_FREEIF(t); -#endif - char *tVal3 = PR_smprintf("%d", mCurrentPostRecord); - if (tVal3) - { - mPostString.Append(NS_ConvertASCIItoUCS2(tVal3) + - NS_LITERAL_STRING("=")); - } - - mPostString.Append(NS_ConvertASCIItoUCS2(SYNC_ESCAPE_ADDUSER) + - singleProtocolLine); - - PR_FREEIF(tVal3); - mCurrentPostRecord++; - } - else if (mNewSyncMapingTable[workCounter].flags & SYNC_MODIFIED) - { -#ifdef DEBUG_rhp - char *t = ToNewCString(singleProtocolLine); - printf("ABSYNC: MODIFYING Card: %s\n", t); - PR_FREEIF(t); -#endif - char *tVal4 = PR_smprintf("%d", mCurrentPostRecord); - if (tVal4) - { - mPostString.Append(NS_ConvertASCIItoUCS2(tVal4) + - NS_LITERAL_STRING("=")); - } - - mPostString.Append(NS_ConvertASCIItoUCS2(SYNC_ESCAPE_MOD) + - singleProtocolLine); - PR_FREEIF(tVal4); - mCurrentPostRecord++; - } - } - } - } - - workCounter++; - } while (NS_SUCCEEDED(cardEnum->Next())); - - // - // Now, when we get here, we should go through the old history and see if - // there are records we need to delete since we didn't touch them when comparing - // against the current address book - // - readCount = 0; - while (readCount < mOldTableSize) - { - if (!(mOldSyncMapingTable[readCount].flags && SYNC_PROCESSED)) - { - // Need the separator for multiple operations... - if (!mPostString.IsEmpty()) - mPostString.Append(NS_LITERAL_STRING("&")); - - char *tVal = PR_smprintf("%d", mOldSyncMapingTable[readCount].serverID); - if (tVal) - { -#ifdef DEBUG_rhp - printf("ABSYNC: DELETING Card: %d\n", mOldSyncMapingTable[readCount].serverID); -#endif - - char *tVal2 = PR_smprintf("%d", mCurrentPostRecord); - if (tVal2) - { - mPostString.Append(NS_ConvertASCIItoUCS2(tVal2) + - NS_LITERAL_STRING("=")); - } - - mPostString.Append(NS_ConvertASCIItoUCS2(SYNC_ESCAPE_DEL) + - NS_LITERAL_STRING("%26id=") + - NS_ConvertASCIItoUCS2(tVal)); - nsCRT::free(tVal); - nsCRT::free(tVal2); - mCurrentPostRecord++; - } - } - - readCount++; - } - -GetOut: - if (cardEnum) - delete cardEnum; - - if (mHistoryFile) - mHistoryFile->CloseStream(); - - if (NS_FAILED(rv)) - { - mOldTableSize = 0; - mNewTableSize = 0; - PR_FREEIF(mOldSyncMapingTable); - PR_FREEIF(mNewSyncMapingTable); - } - - // Ok, get out! - return rv; -} - -nsresult -nsAbSync::AnalyzeTheLocalAddressBook() -{ - // Time to build the mPostString - // - nsresult rv = NS_OK; - nsIAddrDatabase *aDatabase = nsnull; - - // Get the address book entry - nsCOMPtr resource = nsnull; - nsCOMPtr directory = nsnull; - - // Init to null... - mPostString.Truncate(); - - // Now, open the database...for now, make it the default - rv = OpenAB(mAbSyncAddressBookFileName, &aDatabase); - if (NS_FAILED(rv)) - return rv; - - // Get the RDF service... - nsCOMPtr rdfService(do_GetService(kRDFServiceCID, &rv)); - if (NS_FAILED(rv)) - goto EarlyExit; - - // this should not be hardcoded to abook.mab - // this works for any address book...not sure why - // absync on go againt abook.mab - candice - rv = rdfService->GetResource(kPersonalAddressbookUri, getter_AddRefs(resource)); - if (NS_FAILED(rv)) - goto EarlyExit; - - // query interface - directory = do_QueryInterface(resource, &rv); - if (NS_FAILED(rv)) - goto EarlyExit; - - // Ok, Now we need to analyze the records in the database against - // the sync history file and see what has changed. If it has changed, - // then we need to create the mPostString protocol stuff to make - // the changes - // - rv = AnalyzeAllRecords(aDatabase, directory); - -EarlyExit: - // Database is open...make sure to close it - if (aDatabase) - { - aDatabase->Close(PR_TRUE); - } - NS_IF_RELEASE(aDatabase); - return rv; -} - -nsresult -nsAbSync::PatchHistoryTableWithNewID(PRInt32 clientID, PRInt32 serverID, PRInt32 aMultiplier, ulong crc) -{ - for (PRUint32 i = 0; i < mNewTableSize; i++) - { - if (mNewSyncMapingTable[i].localID == (clientID * aMultiplier)) - { -#ifdef DEBUG_rhp - printf("ABSYNC: PATCHING History Table - Client: %d - Server: %d\n", clientID, serverID); -#endif - - mNewSyncMapingTable[i].serverID = serverID; - // Patch CRC if it's not 0. - if (crc) - mNewSyncMapingTable[i].CRC = crc; - return NS_OK; - } - } - - return NS_ERROR_FAILURE; -} - -/////////////////////////////////////////////// -// The following is for protocol parsing -/////////////////////////////////////////////// -#define SERVER_ERROR "err " - -#define SERVER_OP_RETURN "~op_return" -#define SERVER_OP_RETURN_LOCALE "dlocale=" -#define SERVER_OP_RETURN_RENAME "op=ren" -#define SERVER_OP_RETURN_CID "cid=" -#define SERVER_OP_RETURN_SID "sid=" - -#define SERVER_NEW_RECORDS "~new_records_section " - -#define SERVER_DELETED_RECORDS "~deleted_records_section " - -#define SERVER_LAST_CHANGED "~last_chg" - -nsresult -nsAbSync::ExtractInteger(char *aLine, char *aTag, char aDelim, PRInt32 *aRetVal) -{ - *aRetVal = 0; - - if ((!aLine) || (!aTag)) - return NS_ERROR_FAILURE; - - char *fLoc = PL_strstr(aLine, aTag); - if (!fLoc) - return NS_ERROR_FAILURE; - - fLoc += strlen(aTag); - if (!*fLoc) - return NS_ERROR_FAILURE; - - char *endLoc = fLoc; - while ( (*endLoc) && (*endLoc != aDelim) ) - endLoc++; - - // Terminate it temporarily... - char saveLoc = '\0'; - if (*endLoc) - { - saveLoc = *endLoc; - *endLoc = '\0'; - } - - *aRetVal = atoi(fLoc); - *endLoc = saveLoc; - return NS_OK; -} - -char * -nsAbSync::ExtractCharacterString(char *aLine, char *aTag, char aDelim) -{ - if ((!aLine) || (!aTag)) - return nsnull; - - char *fLoc = PL_strstr(aLine, aTag); - if (!fLoc) - return nsnull; - - fLoc += strlen(aTag); - if (!*fLoc) - return nsnull; - - char *endLoc = fLoc; - while ( (*endLoc) && (*endLoc != aDelim) ) - endLoc++; - - // Terminate it temporarily... - char saveLoc = '\0'; - if (*endLoc) - { - saveLoc = *endLoc; - *endLoc = '\0'; - } - - char *returnValue = nsCRT::strdup(fLoc); - *endLoc = saveLoc; - return returnValue; -} - -// Return true if the server returned an error... -PRBool -nsAbSync::ErrorFromServer(char **errString) -{ - if (!nsCRT::strncasecmp(mProtocolOffset, SERVER_ERROR, strlen(SERVER_ERROR))) - { - *errString = mProtocolOffset + strlen(SERVER_ERROR); - return PR_TRUE; - } - else - return PR_FALSE; -} - -// If this returns true, we are done with the data... -PRBool -nsAbSync::EndOfStream() -{ - if ( (!*mProtocolOffset) ) - return PR_TRUE; - else - return PR_FALSE; -} - -nsresult -nsAbSync::ProcessOpReturn() -{ - char *workLine = nsnull; - - while ((workLine = ExtractCurrentLine()) != nsnull) - { - if (!*workLine) // end of this section - break; - - // Find the right tag and do something with it! - // First a locale for the data - if (!nsCRT::strncasecmp(workLine, SERVER_OP_RETURN_LOCALE, - strlen(SERVER_OP_RETURN_LOCALE))) - { - char *locale = workLine; - locale += strlen(SERVER_OP_RETURN_LOCALE); - if (*locale) - mLocale = NS_ConvertASCIItoUCS2(locale); - } - // this is for renaming records from the server... - else if (!nsCRT::strncasecmp(workLine, SERVER_OP_RETURN_RENAME, - strlen(SERVER_OP_RETURN_RENAME))) - { - char *renop = workLine; - renop += strlen(SERVER_OP_RETURN_RENAME); - if (*renop) - { - nsresult rv = NS_OK; - PRInt32 clientID, serverID; - - rv = ExtractInteger(renop, SERVER_OP_RETURN_CID, ' ', &clientID); - rv += ExtractInteger(renop, SERVER_OP_RETURN_SID, ' ', &serverID); - if (NS_SUCCEEDED(rv)) - { - PatchHistoryTableWithNewID(clientID, serverID, -1, 0); - } - } - } - - PR_FREEIF(workLine); - } - - return NS_OK; -} - -nsresult -nsAbSync::LocateClientIDFromServerID(PRInt32 aServerID, PRInt32 *aClientID) -{ - PRUint32 i; - - for (i=0; i obj = nsnull; - PRUint32 aKey; - - // First off, find the aServerID in the history database and find - // the local client ID for this server ID - // - PRInt32 clientID; - if (NS_FAILED(LocateClientIDFromServerID(aServerID, &clientID))) - { - return NS_ERROR_FAILURE; - } - - // Time to find the entry to delete! - // - nsresult rv = NS_OK; - nsIAddrDatabase *aDatabase = nsnull; - - // Get the address book entry - nsCOMPtr resource = nsnull; - nsCOMPtr directory = nsnull; - - // Now, open the database...for now, make it the default - rv = OpenAB(mAbSyncAddressBookFileName, &aDatabase); - if (NS_FAILED(rv)) - return rv; - - // Get the RDF service... - nsCOMPtr rdfService(do_GetService(kRDFServiceCID, &rv)); - if (NS_FAILED(rv)) - goto EarlyExit; - - // this should not be hardcoded to abook.mab - // this works for any address book...not sure why - // absync on go againt abook.mab - candice - rv = rdfService->GetResource(kPersonalAddressbookUri, getter_AddRefs(resource)); - if (NS_FAILED(rv)) - goto EarlyExit; - - // query interface - directory = do_QueryInterface(resource, &rv); - if (NS_FAILED(rv)) - goto EarlyExit; - - rv = aDatabase->EnumerateCards(directory, &cardEnum); - if (NS_FAILED(rv) || (!cardEnum)) - { - rv = NS_ERROR_FAILURE; - goto EarlyExit; - } - - // - // Now we have to find the entry and delete it from the database! - // - cardEnum->First(); - do - { - if (NS_FAILED(cardEnum->CurrentItem(getter_AddRefs(obj)))) - continue; - else - { - nsCOMPtr card; - card = do_QueryInterface(obj, &rv); - - nsresult rv = NS_OK; - nsCOMPtr dbcard(do_QueryInterface(card, &rv)); - if (NS_FAILED(rv) || !dbcard) - continue; - if (NS_FAILED(dbcard->GetKey(&aKey))) - continue; - - if ((PRInt32) aKey == clientID) - { - rv = aDatabase->DeleteCard(card, PR_TRUE); - break; - } - } - - } while (NS_SUCCEEDED(cardEnum->Next())); - -EarlyExit: - if (cardEnum) - delete cardEnum; - - // Database is open...make sure to close it - if (aDatabase) - { - aDatabase->Close(PR_TRUE); - } - NS_IF_RELEASE(aDatabase); - return rv; -} - -nsresult -nsAbSync::DeleteRecord() -{ - PRInt32 i = 0; - nsresult rv = NS_ERROR_FAILURE; - - for (i=0; iCount(); i+=mDeletedRecordTags->Count()) - { - nsString *val = mDeletedRecordValues->StringAt(i); - if ( (!val) || val->IsEmpty() ) - continue; - - PRInt32 aErrorCode; - PRInt32 delID = val->ToInteger(&aErrorCode); - if (NS_FAILED(aErrorCode)) - continue; - - rv = DeleteCardByServerID(delID); - } - - return rv; -} - -nsresult -nsAbSync::DeleteList() -{ - PRInt32 i = 0; - nsresult rv = NS_ERROR_FAILURE; - - for (i=0; iCount(); i+=mDeletedRecordTags->Count()) - { - nsString *val = mDeletedRecordValues->StringAt(i); - if ( (!val) || val->IsEmpty() ) - continue; - - PRInt32 aErrorCode; - PRInt32 delID = val->ToInteger(&aErrorCode); - if (NS_FAILED(aErrorCode)) - continue; - - // RICHIE_TODO - Ok, delete a list by a server ID - } - - return rv; -} - -nsresult -nsAbSync::DeleteGroup() -{ - PRInt32 i = 0; - nsresult rv = NS_ERROR_FAILURE; - - for (i=0; iCount(); i+=mDeletedRecordTags->Count()) - { - nsString *val = mDeletedRecordValues->StringAt(i); - if ( (!val) || val->IsEmpty() ) - continue; - - PRInt32 aErrorCode; - PRInt32 delID = val->ToInteger(&aErrorCode); - if (NS_FAILED(aErrorCode)) - continue; - - // RICHIE_TODO - Ok, delete a group by a server ID - } - - return rv; -} - -nsresult -nsAbSync::ProcessDeletedRecords() -{ - char *workLine; - nsresult rv = NS_OK; - - // Ok, first thing we need to do is get all of the tags for - // deleted records. - // - mDeletedRecordTags = new nsStringArray(); - if (!mDeletedRecordTags) - return NS_ERROR_OUT_OF_MEMORY; - - mDeletedRecordValues = new nsStringArray(); - if (!mDeletedRecordValues) - return NS_ERROR_OUT_OF_MEMORY; - - while ((workLine = ExtractCurrentLine()) != nsnull) - { - if (!*workLine) // end of this section - break; - - mDeletedRecordTags->AppendString(nsString(NS_ConvertASCIItoUCS2(workLine))); - PR_FREEIF(workLine); - } - - // Now, see what the next line is...if its a CRLF, then we - // really don't have anything to do here and we can just return - // - while ((workLine = ExtractCurrentLine()) != nsnull) - { - if (!*workLine) - break; - - // Ok, if we are here, then we need to loop and get the values - // for the tags in question starting at the second since the - // first has already been eaten - // - mDeletedRecordValues->AppendString(nsString(NS_ConvertASCIItoUCS2(workLine))); - for (PRInt32 i=0; iCount(); i++) - { - workLine = ExtractCurrentLine(); - if (!workLine) - return NS_ERROR_FAILURE; - - mDeletedRecordValues->AppendString(nsString(NS_ConvertASCIItoUCS2(workLine))); - } - } - - // Ok, now that we are here, we check to see if we have anything - // in the records array. If we do, then deal with it! - // - // If nothing in the array...just return! - if (mDeletedRecordValues->Count() == 0) - return NS_OK; - - PRInt32 tType = DetermineTagType(mDeletedRecordTags); - switch (tType) - { - case SYNC_SINGLE_USER_TYPE: - rv += DeleteRecord(); - break; - - case SYNC_MAILLIST_TYPE: - rv += DeleteList(); - break; - - case SYNC_GROUP_TYPE: - rv += DeleteGroup(); - break; - - case SYNC_UNKNOWN_TYPE: - default: - rv = NS_ERROR_FAILURE; - break; - } - - return rv; -} - -nsresult -nsAbSync::ProcessLastChange() -{ - char *aLine = nsnull; - - if (EndOfStream()) - return NS_ERROR_FAILURE; - - if ( (aLine = ExtractCurrentLine()) != nsnull) - { - if (*aLine) - { - mLastChangeNum = atoi(aLine); - PR_FREEIF(aLine); - } - return NS_OK; - } - else - return NS_ERROR_FAILURE; -} - -char * -nsAbSync::ExtractCurrentLine() -{ - nsString extractString; - - while ( (*mProtocolOffset) && - ( (*mProtocolOffset != nsCRT::CR) && (*mProtocolOffset != nsCRT::LF) ) - ) - { - extractString.Append(PRUnichar(*mProtocolOffset)); - mProtocolOffset++; - } - - if (!*mProtocolOffset) - return nsnull; - else - { - while ( (*mProtocolOffset) && - (*mProtocolOffset == nsCRT::CR) ) - mProtocolOffset++; - - if (*mProtocolOffset == nsCRT::LF) - mProtocolOffset++; - - char *tString = ToNewCString(extractString); - if (tString) - { - char *ret = nsUnescape(tString); - return ret; - } - else - return nsnull; - } -} - -nsresult -nsAbSync::AdvanceToNextLine() -{ - // First, find first nsCRT::CR or nsCRT::LF... - while ( (*mProtocolOffset) && - ( (*mProtocolOffset != nsCRT::CR) && (*mProtocolOffset != nsCRT::LF) ) - ) - { - mProtocolOffset++; - } - - // now, make sure we are past the LF... - if (*mProtocolOffset) - { - while ( (*mProtocolOffset) && - (*mProtocolOffset != nsCRT::LF) ) - mProtocolOffset++; - - if (*mProtocolOffset == nsCRT::LF) - mProtocolOffset++; - } - - return NS_OK; // at end..but this is ok... -} - -nsresult -nsAbSync::AdvanceToNextSection() -{ - // If we are sitting on a section...bump past it... - mProtocolOffset++; - while (!EndOfStream() && *mProtocolOffset != '~') - AdvanceToNextLine(); - return NS_OK; -} - -// See if we are sitting on a particular tag...and eat if if we are -PRBool -nsAbSync::TagHit(const char *aTag, PRBool advanceToNextLine) -{ - if ((!aTag) || (!*aTag)) - return PR_FALSE; - - if (!nsCRT::strncasecmp(mProtocolOffset, aTag, strlen(aTag))) - { - if (advanceToNextLine) - AdvanceToNextLine(); - else - mProtocolOffset += strlen(aTag); - return PR_TRUE; - } - else - return PR_FALSE; -} - -PRBool -nsAbSync::ParseNextSection() -{ - nsresult rv = NS_OK; - - if (TagHit(SERVER_OP_RETURN, PR_TRUE)) - rv = ProcessOpReturn(); - else if (TagHit(SERVER_NEW_RECORDS, PR_TRUE)) - rv = ProcessNewRecords(); - else if (TagHit(SERVER_DELETED_RECORDS, PR_TRUE)) - rv = ProcessDeletedRecords(); - else if (TagHit(SERVER_LAST_CHANGED, PR_TRUE)) - rv = ProcessLastChange(); - else // We shouldn't get here...but if we do... - rv = AdvanceToNextSection(); - - // If this is a failure, then get to the next section! - if (NS_FAILED(rv)) - AdvanceToNextSection(); - - return PR_TRUE; -} - -// -// This is the response side of getting things back from the server -// -nsresult -nsAbSync::ProcessServerResponse(const char *aProtocolResponse) -{ - nsresult rv = NS_OK; - PRUint32 writeCount = 0; - PRInt32 writeSize = 0; - char *errorString; - PRBool parseOk = PR_TRUE; - - // If no response, then this is a problem... - if (!aProtocolResponse) - { - PRUnichar *outValue = GetString(NS_LITERAL_STRING("syncInvalidResponse").get()); - DisplayErrorMessage(outValue); - PR_FREEIF(outValue); - return NS_ERROR_FAILURE; - } - - // Assign the vars... - mProtocolResponse = (char *)aProtocolResponse; - mProtocolOffset = (char *)aProtocolResponse; - - if (ErrorFromServer(&errorString)) - { - PRUnichar *msgValue, *outValue=nsnull; - - // Covert server exceed max record msg here. - if (! nsCRT::strncasecmp(errorString, SYNC_ERROR_EXCEED_MAX_RECORD, strlen(SYNC_ERROR_EXCEED_MAX_RECORD))) - msgValue = GetString(NS_LITERAL_STRING("exceedMaxRecordError").get()); - else - { - outValue = GetString(NS_LITERAL_STRING("syncServerError").get()); - msgValue = nsTextFormatter::smprintf(outValue, errorString); - } - - DisplayErrorMessage(msgValue); - - PR_FREEIF(outValue); - PR_FREEIF(msgValue); - - return NS_ERROR_FAILURE; - } - - while ( (!EndOfStream()) && (parseOk) ) - { - parseOk = ParseNextSection(); - } - - // Now, write out the history file with the new information - // - if (!mHistoryFile) - { - rv = NS_ERROR_OUT_OF_MEMORY; - goto ExitEarly; - } - - if (NS_FAILED(mHistoryFile->OpenStreamForWriting())) - { - rv = NS_ERROR_OUT_OF_MEMORY; - goto ExitEarly; - } - - // Ok, this handles the entries that we knew about before we started. - while (writeCount < mNewTableSize) - { - // Sanity one more time... - if (mNewSyncMapingTable[writeCount].serverID != 0) - { - if (NS_FAILED(mHistoryFile->Write((char *)&(mNewSyncMapingTable[writeCount]), - sizeof(syncMappingRecord), &writeSize)) - || (writeSize != sizeof(syncMappingRecord))) - { - rv = NS_ERROR_OUT_OF_MEMORY; - goto ExitEarly; - } - } - - writeCount++; - } - - // These are entries that we got back from the server that are new - // to us! - writeCount = 0; - if (mNewServerTable) - { - while (writeCount < (PRUint32) mNewServerTable->Count()) - { - syncMappingRecord *tRec = (syncMappingRecord *)mNewServerTable->ElementAt(writeCount); - if (!tRec) - continue; - - if (NS_FAILED(mHistoryFile->Write((char *)(tRec), - sizeof(syncMappingRecord), &writeSize)) - || (writeSize != sizeof(syncMappingRecord))) - { - rv = NS_ERROR_OUT_OF_MEMORY; - goto ExitEarly; - } - - writeCount++; - } - } - - if (mHistoryFile) - mHistoryFile->CloseStream(); - -ExitEarly: - if (mLastChangeNum > 1) - { - nsCOMPtr prefs(do_GetService(NS_PREF_CONTRACTID, &rv)); - if (NS_SUCCEEDED(rv) && prefs) - { - prefs->SetIntPref("mail.absync.last_change", mLastChangeNum); - } - } - - return NS_OK; -} - -PRInt32 -nsAbSync::DetermineTagType(nsStringArray *aArray) -{ - PRBool gotRecordID = PR_FALSE; - PRBool gotListID = PR_FALSE; - PRBool gotGroupID = PR_FALSE; - - for (PRInt32 i = 0; iCount(); i++) - { - nsString *val = mNewRecordTags->StringAt(0); - if ( (!val) || (val->IsEmpty()) ) - continue; - - if (val->Equals(NS_LITERAL_STRING("record_id"))) - gotRecordID = PR_TRUE; - else if (val->Equals(NS_LITERAL_STRING("list_id"))) - gotListID = PR_TRUE; - else if (val->Equals(NS_LITERAL_STRING("group_id"))) - gotGroupID = PR_TRUE; - } - - if (gotGroupID) - return SYNC_GROUP_TYPE; - else if (gotListID) - return SYNC_MAILLIST_TYPE; - else if (gotRecordID) - return SYNC_SINGLE_USER_TYPE; - else - // If we get here, don't have a clue! - return SYNC_UNKNOWN_TYPE; -} - -nsresult -nsAbSync::ProcessNewRecords() -{ - char *workLine; - nsresult rv = NS_OK; - - // Ok, first thing we need to do is get all of the tags for - // new records. These are the server tags for address book fields. - // - mNewRecordTags = new nsStringArray(); - if (!mNewRecordTags) - return NS_ERROR_OUT_OF_MEMORY; - - mNewRecordValues = new nsStringArray(); - if (!mNewRecordValues) - return NS_ERROR_OUT_OF_MEMORY; - - while ((workLine = ExtractCurrentLine()) != nsnull) - { - if (!*workLine) // end of this section - break; - - mNewRecordTags->AppendString(nsString(NS_ConvertASCIItoUCS2(workLine))); - PR_FREEIF(workLine); - } - - // Now, see what the next line is...if its a CRLF, then we - // really don't have anything to do here and we can just return - // - while ((workLine = ExtractCurrentLine()) != nsnull) - { - if (!*workLine) - break; - - // Ok, if we are here, then we need to loop and get the values - // for the tags in question starting at the second since the - // first has already been eaten - // - mNewRecordValues->AppendString(nsString(NS_ConvertASCIItoUCS2(workLine))); - PR_FREEIF(workLine); - for (PRInt32 i=0; i<(mNewRecordTags->Count()-1); i++) - { - workLine = ExtractCurrentLine(); - if (!workLine) - return NS_ERROR_FAILURE; - - mNewRecordValues->AppendString(nsString(NS_ConvertASCIItoUCS2(workLine))); - PR_FREEIF(workLine); - } - - // Eat the CRLF! - workLine = ExtractCurrentLine(); - PR_FREEIF(workLine); - } - - // Ok, now that we are here, we need to figure out what type - // of addition to the address book this is. - // - // But first...sanity! If nothing in the array...just return! - if (mNewRecordValues->Count() == 0) - return NS_OK; - - PRInt32 tType = DetermineTagType(mNewRecordTags); - switch (tType) - { - case SYNC_SINGLE_USER_TYPE: - rv = AddNewUsers(); - break; - - case SYNC_MAILLIST_TYPE: - break; - - case SYNC_GROUP_TYPE: - break; - - case SYNC_UNKNOWN_TYPE: - default: - return NS_ERROR_FAILURE; - } - - return rv; -} - -nsresult -nsAbSync::FindCardByClientID(PRInt32 aClientID, - nsIAddrDatabase *aDatabase, - nsIAbDirectory *directory, - nsIAbCard **aReturnCard) -{ - nsIEnumerator *cardEnum = nsnull; - nsCOMPtr obj = nsnull; - PRUint32 aKey; - nsresult rv = NS_ERROR_FAILURE; - - // Time to find the entry to play with! - // - *aReturnCard = nsnull; - rv = aDatabase->EnumerateCards(directory, &cardEnum); - if (NS_FAILED(rv) || (!cardEnum)) - { - rv = NS_ERROR_FAILURE; - goto EarlyExit; - } - - // - // Now we have to find the entry and return it! - // - cardEnum->First(); - do - { - if (NS_FAILED(cardEnum->CurrentItem(getter_AddRefs(obj)))) - continue; - else - { - nsCOMPtr card; - card = do_QueryInterface(obj, &rv); - - nsresult rv=NS_OK; - nsCOMPtr dbcard(do_QueryInterface(card, &rv)); - if (NS_FAILED(rv) || !dbcard) - continue; - if (NS_FAILED(dbcard->GetKey(&aKey))) - continue; - - // Found IT! - if ((PRInt32) aKey == aClientID) - { - *aReturnCard = card; - rv = NS_OK; - break; - } - } - - } while (NS_SUCCEEDED(cardEnum->Next())); - -EarlyExit: - if (cardEnum) - delete cardEnum; - - return rv; -} - -// -// This routine will be used to hunt through an index of CRC's to see if this -// address book card has already been added to the local database. If so, don't -// duplicate! -// -PRBool -nsAbSync::CardAlreadyInAddressBook(nsIAbCard *newCard, - PRInt32 *aClientID, - ulong *aRetCRC) -{ - PRUint32 i; - nsString tProtLine; - PRBool rVal = PR_FALSE; - - // First, generate a protocol line for this new card... - if (NS_FAILED(GenerateProtocolForCard(newCard, PR_FALSE, tProtLine))) - return PR_FALSE; - - char *tCRCLine = ToNewCString(tProtLine); - if (!tCRCLine) - return PR_FALSE; - - ulong workCRC = GetCRC(tCRCLine); - for (i=0; iCount(); j++) - { - nsString *val = mNewRecordValues->StringAt((aPersonIndex*(mNewRecordTags->Count())) + j); - if ( (val) && (!val->IsEmpty()) ) - { - // See if this is the record_id... - nsString *tagVal = mNewRecordTags->StringAt(j); - if (tagVal->Equals(NS_LITERAL_STRING("record_id"))) - { - PRInt32 errorCode; - *aServerID = val->ToInteger(&errorCode); - break; - } - } - } - - // Hmm...no server ID...not good...well, better return anyway - if (*aServerID == 0) - return 0; - - // If didn't find the client ID, better bail out! - if (NS_FAILED(LocateClientIDFromServerID(*aServerID, &clientID))) - return 0; - - // Now, we have the clientID, need to find the address book card in the - // database for this client ID... - if (NS_FAILED(FindCardByClientID(clientID, aDatabase, directory, newCard))) - { - *aServerID = 0; - return 0; - } - else - return clientID; -} - -nsresult -nsAbSync::AddNewUsers() -{ - nsresult rv = NS_OK; - nsIAddrDatabase *aDatabase = nsnull; - PRInt32 addCount = 0; - PRInt32 i,j; - PRInt32 serverID; - PRInt32 localID; - nsCOMPtr newCard; - nsIAbCard *tCard = nsnull; - nsString tempProtocolLine; - PRBool isNewCard = PR_TRUE; - - // Get the address book entry - nsCOMPtr resource = nsnull; - nsCOMPtr directory = nsnull; - - // Do a sanity check...if the numbers don't add up, then - // return an error - // - if ( (mNewRecordValues->Count() % mNewRecordTags->Count()) != 0) - return NS_ERROR_FAILURE; - - // Get the add count... - addCount = mNewRecordValues->Count() / mNewRecordTags->Count(); - - // Now, open the database...for now, make it the default - rv = OpenAB(mAbSyncAddressBookFileName, &aDatabase); - if (NS_FAILED(rv)) - return rv; - - // Get the RDF service... - nsCOMPtr rdfService(do_GetService(kRDFServiceCID, &rv)); - if (NS_FAILED(rv)) - goto EarlyExit; - - // this should not be hardcoded to abook.mab - // this works for any address book...not sure why - // absync on go againt abook.mab - candice - rv = rdfService->GetResource(kPersonalAddressbookUri, getter_AddRefs(resource)); - if (NS_FAILED(rv)) - goto EarlyExit; - - // query interface - directory = do_QueryInterface(resource, &rv); - if (NS_FAILED(rv)) - goto EarlyExit; - - // Create the new array for history if it is still null... - if (!mNewServerTable) - { - mNewServerTable = new nsVoidArray(); - if (!mNewServerTable) - { - rv = NS_ERROR_OUT_OF_MEMORY; - goto EarlyExit; - } - } - - // - // - // Create the new card that we will eventually add to the - // database... - // - for (i = 0; i < addCount; i++) - { - serverID = 0; // for safety - - // - // Ok, if we are here, then we need to figure out if this is really a NEW card - // or just an update of an existing card that is already on this client. - // - // NOTE: i is the entry of the person we are working on! - // - localID = HuntForExistingABEntryInServerRecord(i, aDatabase, directory, &serverID, &tCard); - if ( (localID > 0) && (nsnull != tCard)) - { - // This is an existing entry in the local address book - // We need to dig out the card entry or just assign something here - newCard = tCard; - isNewCard = PR_FALSE; - } - else - { - // This is a new entry! - rv = nsComponentManager::CreateInstance(kAbCardPropertyCID, nsnull, NS_GET_IID(nsIAbCard), - getter_AddRefs(newCard)); - isNewCard = PR_TRUE; - } - - if (NS_FAILED(rv) || !newCard) - { - rv = NS_ERROR_OUT_OF_MEMORY; - goto EarlyExit; - } - - for (j = 0; j < mNewRecordTags->Count(); j++) - { - nsString *val = mNewRecordValues->StringAt((i*(mNewRecordTags->Count())) + j); - if ( (val) && (!val->IsEmpty()) ) - { - // See if this is the record_id, keep it around for later... - nsString *tagVal = mNewRecordTags->StringAt(j); - if (tagVal->Equals(NS_LITERAL_STRING("record_id"))) - { - PRInt32 errorCode; - serverID = val->ToInteger(&errorCode); - -#ifdef DEBUG_rhp - printf("ABSYNC: ADDING Card: %d\n", serverID); -#endif - } - - // Ok, "val" could still be URL Encoded, so we need to decode - // first and then pass into the call... - // - char *myTStr = ToNewCString(*val); - if (myTStr) - { - char *ret = nsUnescape(myTStr); - if (ret) - { - val->AssignWithConversion(ret); - PR_FREEIF(ret); - } - } - AddValueToNewCard(newCard, mNewRecordTags->StringAt(j), val); - } - } - - // Now do the phone numbers...they are special??? - ProcessPhoneNumbersTheyAreSpecial(newCard); - - // Ok, now that we are here, we should check if this is a recover from a crash situation. - // If it is, then we should try to find the CRC for this entry in the local address book - // and tweak a new flag if it is already there. - // - PRBool cardAlreadyThere = PR_FALSE; - ulong tempCRC; - - if (mLastSyncFailed) - cardAlreadyThere = CardAlreadyInAddressBook(newCard, &localID, &tempCRC); - - // Ok, now, lets be extra nice and see if we should build a display name for the - // card. - // - PRUnichar *tDispName = nsnull; - if (NS_SUCCEEDED(newCard->GetCardValue(kDisplayNameColumn, &tDispName))) - { - if ( (!tDispName) || (!*tDispName) ) - { - PRUnichar *tFirstName = nsnull; - PRUnichar *tLastName = nsnull; - nsString tFullName; - - newCard->GetCardValue(kFirstNameColumn, &tFirstName); - newCard->GetCardValue(kLastNameColumn, &tLastName); - - if (tFirstName) - { - tFullName.Append(tFirstName); - if (tLastName) - tFullName.Append(NS_LITERAL_STRING(" ")); - } - - if (tLastName) - tFullName.Append(tLastName); - - PR_FREEIF(tFirstName); - PR_FREEIF(tLastName); - - // Ok, now we should add a display name... - newCard->SetDisplayName(tFullName.get()); - } - else - PR_FREEIF(tDispName); - } - - // Ok, now we need to modify or add the card! ONLY IF ITS NOT THERE ALREADY - if (!cardAlreadyThere) - { - if (!isNewCard) - rv = aDatabase->EditCard(newCard, PR_TRUE); - else - { - // hack - // there is no way (currently) to set generic attributes on simple abcardproperties - // so we have to use a mdbcard instead. We can remove this once #128567 is fixed. - nsCOMPtr dbcard = do_CreateInstance(NS_ABMDBCARD_CONTRACTID, &rv); - if (NS_FAILED(rv)) - continue; - - nsCOMPtr card = do_QueryInterface(dbcard, &rv); - if (NS_FAILED(rv)) - continue; - - rv = card->Copy(newCard); - if (NS_FAILED(rv)) - continue; - - dbcard->SetAbDatabase(aDatabase); - PRUint32 tID; - // card has to be a mdbcard, or tID will come back as 0 - rv = aDatabase->CreateNewCardAndAddToDBWithKey(card, PR_TRUE, &tID); - localID = (PRInt32) tID; - newCard = card; - } - } - - // hack - // we only support one generic column/value and we need to do this - // AFTER we have a mdbcard. We can remove this once #128567 is fixed. - if (!mCurrentGenericColumn.IsEmpty()) - { - nsCOMPtr dbcard = do_QueryInterface(newCard, &rv); - if (NS_FAILED(rv)) - continue; - - rv = dbcard->SetStringAttribute(mCurrentGenericColumn.get(), mCurrentGenericValue.get()); - if (NS_FAILED(rv)) - continue; - - mCurrentGenericColumn.Truncate(); - mCurrentGenericValue.Truncate(); - } - - // - // Now, calculate the NEW CRC for the new or updated card... - // - syncMappingRecord *newSyncRecord = (syncMappingRecord *)PR_Malloc(sizeof(syncMappingRecord)); - if (newSyncRecord) - { - if (NS_FAILED(GenerateProtocolForCard(newCard, PR_FALSE, tempProtocolLine))) - continue; - - // Get the CRC for this temp entry line... - char *tLine = ToNewCString(tempProtocolLine); - if (!tLine) - continue; - - if (!isNewCard) - { - // First try to patch the old table if this is an old card...if that - // fails, then flip the flag to TRUE and have a new record created - // in newSyncRecord - // - if (NS_FAILED(PatchHistoryTableWithNewID(localID, serverID, 1, GetCRC(tLine)))) - isNewCard = PR_TRUE; - } - - if (isNewCard) - { - memset(newSyncRecord, 0, sizeof(syncMappingRecord)); - newSyncRecord->CRC = GetCRC(tLine); - newSyncRecord->serverID = serverID; - newSyncRecord->localID = localID; - mNewServerTable->AppendElement((void *)newSyncRecord); - } - else - { - PR_FREEIF(newSyncRecord); - } - - nsCRT::free(tLine); - } - - newCard = nsnull; - } - -EarlyExit: - // Database is open...make sure to close it - if (aDatabase) - { - aDatabase->Close(PR_TRUE); - } - NS_IF_RELEASE(aDatabase); - return rv; -} - -PRInt32 -nsAbSync::GetTypeOfPhoneNumber(const nsAString& tagName) -{ - NS_NAMED_LITERAL_STRING(typePostfix, "_type"); - const nsAString& compValue = tagName + typePostfix; - - for (PRInt32 i=0; iCount(); i++) - { - nsString *val = mPhoneTypes->StringAt(i); - if ( (!val) || val->IsEmpty() ) - continue; - - const nsAString& valPrefix = Substring(*val, 0, compValue.Length()); - if (compValue.Equals(valPrefix, nsCaseInsensitiveStringComparator())) - { - nsString phoneType; - - phoneType.Assign(*val); - PRInt32 loc = phoneType.FindChar('='); - if (loc == -1) - continue; - - phoneType.Cut(0, loc+1); - if (phoneType.Equals(NS_LITERAL_STRING(ABSYNC_HOME_PHONE_TYPE), - nsCaseInsensitiveStringComparator())) - return ABSYNC_HOME_PHONE_ID; - else if (phoneType.Equals(NS_LITERAL_STRING(ABSYNC_WORK_PHONE_TYPE), - nsCaseInsensitiveStringComparator())) - return ABSYNC_WORK_PHONE_ID; - else if (phoneType.Equals(NS_LITERAL_STRING(ABSYNC_FAX_PHONE_TYPE), - nsCaseInsensitiveStringComparator())) - return ABSYNC_FAX_PHONE_ID; - else if (phoneType.Equals(NS_LITERAL_STRING(ABSYNC_PAGER_PHONE_TYPE), - nsCaseInsensitiveStringComparator())) - return ABSYNC_PAGER_PHONE_ID; - else if (phoneType.Equals(NS_LITERAL_STRING(ABSYNC_CELL_PHONE_TYPE), - nsCaseInsensitiveStringComparator())) - return ABSYNC_CELL_PHONE_ID; - } - } - - // If we get here...drop back to the defaults...why, oh why is it this way? - // - if (tagName.Equals(NS_LITERAL_STRING("phone1"))) - return ABSYNC_HOME_PHONE_ID; - else if (tagName.Equals(NS_LITERAL_STRING("phone2"))) - return ABSYNC_WORK_PHONE_ID; - else if (tagName.Equals(NS_LITERAL_STRING("phone3"))) - return ABSYNC_FAX_PHONE_ID; - else if (tagName.Equals(NS_LITERAL_STRING("phone4"))) - return ABSYNC_PAGER_PHONE_ID; - else if (tagName.Equals(NS_LITERAL_STRING("phone5"))) - return ABSYNC_CELL_PHONE_ID; - - return 0; -} - -nsresult -nsAbSync::ProcessPhoneNumbersTheyAreSpecial(nsIAbCard *aCard) -{ - PRInt32 i; - nsString tagName; - nsString phoneNumber; - PRInt32 loc; - - for (i=0; iCount(); i++) - { - nsString *val = mPhoneValues->StringAt(i); - if ( (!val) || val->IsEmpty() ) - continue; - - tagName.Assign(*val); - phoneNumber.Assign(*val); - loc = tagName.FindChar('='); - if (loc == -1) - continue; - - tagName.Cut(loc, (tagName.Length() - loc)); - phoneNumber.Cut(0, loc+1); - - PRInt32 pType = GetTypeOfPhoneNumber(tagName); - if (pType == 0) - continue; - - if (pType == ABSYNC_PAGER_PHONE_ID) - aCard->SetPagerNumber(phoneNumber.get()); - else if (pType == ABSYNC_HOME_PHONE_ID) - aCard->SetHomePhone(phoneNumber.get()); - else if (pType == ABSYNC_WORK_PHONE_ID) - aCard->SetWorkPhone(phoneNumber.get()); - else if (pType == ABSYNC_FAX_PHONE_ID) - aCard->SetFaxNumber(phoneNumber.get()); - else if (pType == ABSYNC_CELL_PHONE_ID) - aCard->SetCellularNumber(phoneNumber.get()); - } - - // Reset the phone arrays for next card. - mPhoneValues->Clear(); - mPhoneTypes->Clear(); - - return NS_OK; -} - -nsresult -nsAbSync::AddValueToNewCard(nsIAbCard *aCard, nsString *aTagName, nsString *aTagValue) -{ - nsresult rv = NS_OK; - - // - // First, we are going to special case the phone entries because they seem to - // be handled differently than all other tags. All other tags are unique with no specifiers - // as to their type...this is not the case with phone numbers. - // - PRUnichar aChar = '_'; - nsString outValue; - char *tValue = nsnull; - - tValue = ToNewCString(*aTagValue); - if (tValue) - { - rv = nsMsgI18NConvertToUnicode(nsCAutoString("UTF-8"), nsCAutoString(tValue), outValue); - if (NS_SUCCEEDED(rv)) - aTagValue->Assign(outValue); - PR_FREEIF(tValue); - } - - if (Substring(*aTagName, 0, 5).Equals(NS_LITERAL_STRING("phone"), - nsCaseInsensitiveStringComparator())) - { - nsString tempVal; - tempVal.Append(*aTagName + - NS_LITERAL_STRING("=") + - *aTagValue); - - if (aTagName->FindChar(aChar) != -1) - mPhoneTypes->AppendString(tempVal); - else - mPhoneValues->AppendString(tempVal); - - return NS_OK; - } - - // Ok, we need to figure out what the tag name from the server maps to and assign - // this value the new nsIAbCard - // - if (aTagName->Equals(kServerFirstNameColumn)) - aCard->SetFirstName(aTagValue->get()); - else if (aTagName->Equals(kServerLastNameColumn)) - aCard->SetLastName(aTagValue->get()); - else if (aTagName->Equals(kServerDisplayNameColumn)) - aCard->SetDisplayName(aTagValue->get()); - else if (aTagName->Equals(kServerNicknameColumn)) - aCard->SetNickName(aTagValue->get()); - else if (aTagName->Equals(kServerPriEmailColumn)) - { -#ifdef DEBUG_rhp - char *t = ToNewCString(*aTagValue); - printf("Email: %s\n", t); - PR_FREEIF(t); -#endif - aCard->SetPrimaryEmail(aTagValue->get()); - } - else if (aTagName->Equals(kServer2ndEmailColumn)) - aCard->SetSecondEmail(aTagValue->get()); - else if (aTagName->Equals(kServerHomeAddressColumn)) - aCard->SetHomeAddress(aTagValue->get()); - else if (aTagName->Equals(kServerHomeAddress2Column)) - aCard->SetHomeAddress2(aTagValue->get()); - else if (aTagName->Equals(kServerHomeCityColumn)) - aCard->SetHomeCity(aTagValue->get()); - else if (aTagName->Equals(kServerHomeStateColumn)) - aCard->SetHomeState(aTagValue->get()); - else if (aTagName->Equals(kServerHomeZipCodeColumn)) - aCard->SetHomeZipCode(aTagValue->get()); - else if (aTagName->Equals(kServerHomeCountryColumn)) - aCard->SetHomeCountry(aTagValue->get()); - else if (aTagName->Equals(kServerWorkAddressColumn)) - aCard->SetWorkAddress(aTagValue->get()); - else if (aTagName->Equals(kServerWorkAddress2Column)) - aCard->SetWorkAddress2(aTagValue->get()); - else if (aTagName->Equals(kServerWorkCityColumn)) - aCard->SetWorkCity(aTagValue->get()); - else if (aTagName->Equals(kServerWorkStateColumn)) - aCard->SetWorkState(aTagValue->get()); - else if (aTagName->Equals(kServerWorkZipCodeColumn)) - aCard->SetWorkZipCode(aTagValue->get()); - else if (aTagName->Equals(kServerWorkCountryColumn)) - aCard->SetWorkCountry(aTagValue->get()); - else if (aTagName->Equals(kServerJobTitleColumn)) - aCard->SetJobTitle(aTagValue->get()); - else if (aTagName->Equals(kServerNotesColumn)) - aCard->SetNotes(aTagValue->get()); - else if (aTagName->Equals(kServerWebPage1Column)) - aCard->SetWebPage1(aTagValue->get()); - else if (aTagName->Equals(kServerDepartmentColumn)) - aCard->SetDepartment(aTagValue->get()); - else if (aTagName->Equals(kServerCompanyColumn)) - aCard->SetCompany(aTagValue->get()); - else if (aTagName->Equals(kServerWebPage2Column)) - aCard->SetWebPage2(aTagValue->get()); - else if (aTagName->Equals(kServerCustom1Column)) - aCard->SetCustom1(aTagValue->get()); - else if (aTagName->Equals(kServerCustom2Column)) - aCard->SetCustom2(aTagValue->get()); - else if (aTagName->Equals(kServerCustom3Column)) - aCard->SetCustom3(aTagValue->get()); - else if (aTagName->Equals(kServerCustom4Column)) - aCard->SetCustom4(aTagValue->get()); - else if (aTagName->Equals(kServerPlainTextColumn)) - { - // This is plain text pref...have to add a little logic. - if (aTagValue->Equals(NS_LITERAL_STRING("1"))) - aCard->SetPreferMailFormat(nsIAbPreferMailFormat::html); - else if (aTagValue->Equals(NS_LITERAL_STRING("0"))) - aCard->SetPreferMailFormat(nsIAbPreferMailFormat::unknown); - } - else if (aTagName->Length() && aTagValue->Length()) - { - // See if it's a generic tag defined by external source (like netscape). - nsCAutoString prefName; - nsXPIDLCString mapValue; - - nsCOMPtr prefs(do_GetService(NS_PREF_CONTRACTID, &rv)); - NS_ENSURE_SUCCESS(rv, rv); - - prefName = SYNC_PREF_PREFIX_SERVER_MAP; - prefName += NS_LossyConvertUCS2toASCII((*aTagName).get()); - - rv = prefs->CopyCharPref(prefName.get(), getter_Copies(mapValue)); - if (NS_SUCCEEDED(rv) && mapValue.Length()) - { - // OK, this generic column is predefined so remember it. - // Note: we only support one generic column for now and - // this code can be replaced by what's provided by #128567 - // to set generic column/value pairs once #128567 is fixed. - mCurrentGenericColumn = mapValue; - mCurrentGenericValue = aTagValue->get(); - } - } - - return rv; -} - -#define AB_STRING_URL "chrome://messenger/locale/addressbook/absync.properties" - -PRUnichar * -nsAbSync::GetString(const PRUnichar *aStringName) -{ - nsresult res = NS_OK; - PRUnichar *ptrv = nsnull; - - if (!mStringBundle) - { - static const char propertyURL[] = AB_STRING_URL; - - nsCOMPtr sBundleService = - do_GetService(NS_STRINGBUNDLE_CONTRACTID, &res); - if (NS_SUCCEEDED(res) && (nsnull != sBundleService)) - { - res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mStringBundle)); - } - } - - if (mStringBundle) - res = mStringBundle->GetStringFromName(aStringName, &ptrv); - - if ( NS_SUCCEEDED(res) && (ptrv) ) - return ptrv; - else - return nsCRT::strdup(aStringName); -} - -/************ UNUSED FOR NOW -aCard->SetBirthYear(aTagValue->get()); -aCard->SetBirthMonth(aTagValue->get()); -aCard->SetBirthDay(aTagValue->get()); -char *kServerBirthYearColumn = "OMIT:BirthYear"; -char *kServerBirthMonthColumn = "OMIT:BirthMonth"; -char *kServerBirthDayColumn = "OMIT:BirthDay"; -**********************************************/ - -/************* FOR MAILING LISTS -aCard->SetIsMailList(aTagValue->get()); -************* FOR MAILING LISTS ***************/ diff --git a/mozilla/mailnews/absync/src/nsAbSync.h b/mozilla/mailnews/absync/src/nsAbSync.h deleted file mode 100644 index e9f4c9a30c9..00000000000 --- a/mozilla/mailnews/absync/src/nsAbSync.h +++ /dev/null @@ -1,294 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * 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 NPL, 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 NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#ifndef __nsIAbSync_h__ -#define __nsIAbSync_h__ - -#include "nsIAbSync.h" -#include "nsIAbSyncPostListener.h" -#include "nsIAbSyncPostEngine.h" -#include "nsCOMPtr.h" -#include "nsIAddrDatabase.h" -#include "nsIAbDirectory.h" -#include "nsIAbMDBCard.h" -#include "nsAbSyncCRCModel.h" -#include "nsVoidArray.h" -#include "nsIStringBundle.h" -#include "nsIDocShell.h" -#include "nsIFileSpec.h" - -// -// Basic Sync Logic -// Keep a Sync mapping table like: -// -// ServerRecordID - Unique ID for a record provided by the -// UAB server. -// LocalRecordID - Local Unique ID, for mobile devices this -// is assigned by the mobile device. -// CRC - CRC of the record last time we synced. -// Flags - Operation to apply to this record. ADD -// if it's new, MOD if it's been modified, -// RET if it was already sent to the server -// but an error occured, etc. -// -// Step 1: -// When the user begins a sync, run through the local database and update the -// sync mapping table. If the CRC has changed, mark the entry modified, if -// it's a new record, add an entry and mark it new, if a record was deleted, -// mark the entry deleted, etc. -// -// Sync approach - server handles all conflict resolution: -// -// Step 2: -// Using the sync mapping table and the local records database, generate the change -// list to send to the server. Mark any modified or new record with the RET (retry) -// flag. -// -// Step 3: -// Get the response back from the server. Since the communication was successful, -// clear the RET (retry) flag on all records. Then apply the server changes back -// to the local database (updating the CRC's in the process). Save the changes to -// the local database, clear the sync mapping table flags and save the new sync -// mapping table. -// -typedef struct { - PRInt32 serverID; - PRInt32 localID; - ulong CRC; - PRUint32 flags; -} syncMappingRecord; - -#define SYNC_MODIFIED 0x0001 // Must modify record on server -#define SYNC_ADD 0x0002 // Must add record to server -#define SYNC_DELETED 0x0004 // Must delete record from server -#define SYNC_RETRY 0x0008 // Sent to server but failed...must retry! -#define SYNC_RENUMBER 0x0010 // Renumber on the server -#define SYNC_PROCESSED 0x8000 // We processed the entry...nothing to do - -#define SYNC_ALLTAGS 1000 -#define SYNC_EMAILS 2000 -#define ABSYNC_PROTOCOL "2.2.1.1.2.1.2.2.1.1.1.2" -#define ABSYNC_VERSION "Demo" - -#define ABSYNC_HOME_PHONE_TYPE "Home" -#define ABSYNC_WORK_PHONE_TYPE "Work" -#define ABSYNC_FAX_PHONE_TYPE "Fax" -#define ABSYNC_PAGER_PHONE_TYPE "Pager" -#define ABSYNC_CELL_PHONE_TYPE "Cellular" -#define ABSYNC_HOME_PHONE_ID 1 -#define ABSYNC_WORK_PHONE_ID 2 -#define ABSYNC_FAX_PHONE_ID 3 -#define ABSYNC_PAGER_PHONE_ID 4 -#define ABSYNC_CELL_PHONE_ID 5 - -#define SYNC_ESCAPE_ADDUSER "op%3Dadd" -#define SYNC_ESCAPE_MOD "op%3Dmod" -#define SYNC_ESCAPE_DEL "op%3Ddel" - -//mailing list -#define SYNC_ESCAPE_MAIL_ADD "op%3DmaillistCreate" -#define SYNC_ESCAPE_MAIL_MOD "op%3DmaillistRen" -#define SYNC_ESCAPE_MAIL_DEL "op%3DmaillistDel" -#define SYNC_ESCAPE_MAIL_EMAIL_MOD "op%3DemailstringUpdate" -#define SYNC_ESCAPE_MAIL_CONTACT_ADD "op%3DmaillistAdd" -#define SYNC_ESCAPE_MAIL_CONTACT_DEL "op%3DmaillistMemberDel" - -// group -#define SYNC_ESCAPE_GROUP_DEL "op%3DgrpDel" - -// Defines for what type of add this may be? -#define SYNC_SINGLE_USER_TYPE 1 -#define SYNC_MAILLIST_TYPE 2 -#define SYNC_GROUP_TYPE 3 -#define SYNC_UNKNOWN_TYPE 0 - -// Server errors that need to be converted to more user-friendly ones. -#define SYNC_ERROR_EXCEED_MAX_RECORD "exceed max record" - -// Generic name tag for AIM screen name -#define SYNC_PREF_PREFIX_CLIENT_MAP "mail.absync.client_map." -#define SYNC_PREF_PREFIX_SERVER_MAP "mail.absync.server_map." - -// -// We need this structure for mapping our field names to the server -// field names -// -#define kMaxColumns 38 - -typedef struct { - const char *abField; - nsString serverField; -} schemaStruct; - -class nsAbSync : public nsIAbSync, public nsIAbSyncPostListener -{ -public: - NS_DECL_ISUPPORTS - NS_DECL_NSIABSYNC - NS_DECL_NSIABSYNCPOSTLISTENER - - nsAbSync(); - virtual ~nsAbSync(); - /* additional members */ - -private: - // Handy methods for listeners... - nsresult DeleteListeners(); - nsresult NotifyListenersOnStartSync(PRInt32 aTransactionID, const PRUint32 aMsgSize); - nsresult NotifyListenersOnProgress(PRInt32 aTransactionID, PRUint32 aProgress, PRUint32 aProgressMax); - nsresult NotifyListenersOnStatus(PRInt32 aTransactionID, const PRUnichar *aMsg); - nsresult NotifyListenersOnStopSync(PRInt32 aTransactionID, nsresult aStatus, const PRUnichar *aMsg); - nsresult NotifyListenersOnStartAuthOperation(void); - nsresult NotifyListenersOnStopAuthOperation(nsresult aStatus, const PRUnichar *aMsg, const char *aCookie); - - nsresult AnalyzeTheLocalAddressBook(); - nsresult ProcessServerResponse(const char *aProtocolResponse); - NS_IMETHOD InitSchemaColumns(); - - NS_IMETHOD OpenAB(char *aAbName, nsIAddrDatabase **aDatabase); - NS_IMETHOD AnalyzeAllRecords(nsIAddrDatabase *aDatabase, nsIAbDirectory *directory); - NS_IMETHOD GenerateProtocolForCard(nsIAbCard *aCard, PRBool aAddId, nsString &protLine); - PRBool ThisCardHasChanged(nsIAbCard *aCard, syncMappingRecord *syncRecord, nsString &protLine); - void InternalInit(); - nsresult InternalCleanup(nsresult aResult); - nsresult CleanServerTable(nsVoidArray *aArray); - PRUnichar *GetString(const PRUnichar *aStringName); - nsresult DisplayErrorMessage(const PRUnichar * msg); - nsresult SetDOMWindow(nsIDOMWindowInternal *aWindow); - - nsCOMPtr mPostEngine; - nsString mPostString; - nsIAbSyncListener **mListenerArray; - PRInt32 mListenerArrayCount; - PRInt32 mCurrentState; - - PRInt32 mLastChangeNum; - char *mUserName; - nsCOMPtr mStringBundle; - - // Setting for ABSync operations... - char *mAbSyncServer; - PRInt32 mAbSyncPort; - char *mAbSyncAddressBook; - char *mAbSyncAddressBookFileName; - - PRInt32 mTransactionID; - PRInt32 mCurrentPostRecord; - - nsCOMPtr mHistoryFile; - nsCOMPtr mLockFile; - PRBool mLastSyncFailed; - - PRUint32 mOldTableSize; - syncMappingRecord *mOldSyncMapingTable; // Old history table... - PRUint32 mNewTableSize; - syncMappingRecord *mNewSyncMapingTable; // New table after reading address book - nsVoidArray *mNewServerTable; // New entries from the server - - PRUint32 mCrashTableSize; - syncMappingRecord *mCrashTable; // Comparison table for crash recovery... - - char *mProtocolResponse; // what the server said... - char *mProtocolOffset; // where in the buffer are we? - - schemaStruct mSchemaMappingList[kMaxColumns]; - - /////////////////////////////////////////////// - // The following is for protocol parsing - /////////////////////////////////////////////// - PRBool EndOfStream(); // If this returns true, we are done with the data... - PRBool ParseNextSection(); // Deal with next section - nsresult AdvanceToNextLine(); - nsresult AdvanceToNextSection(); - char *ExtractCurrentLine(); - nsresult ExtractInteger(char *aLine, char *aTag, char aDelim, PRInt32 *aRetVal); - char *ExtractCharacterString(char *aLine, char *aTag, char aDelim); - - nsresult PatchHistoryTableWithNewID(PRInt32 clientID, PRInt32 serverID, PRInt32 aMultiplier, ulong crc); - nsresult DeleteRecord(); - nsresult DeleteList(); - nsresult DeleteGroup(); - nsresult DeleteCardByServerID(PRInt32 aServerID); - nsresult LocateClientIDFromServerID(PRInt32 aServerID, PRInt32 *aClientID); - PRInt32 DetermineTagType(nsStringArray *aArray); - nsresult AddNewUsers(); - nsresult AddValueToNewCard(nsIAbCard *aCard, nsString *aTagName, nsString *aTagValue); - - PRBool TagHit(const char *aTag, PRBool advanceToNextLine); // See if we are sitting on a particular tag...and advance if asked - PRBool ErrorFromServer(char **errString); // Return true if the server returned an error... - nsresult ProcessOpReturn(); - nsresult ProcessNewRecords(); - nsresult ProcessDeletedRecords(); - nsresult ProcessLastChange(); - nsresult ProcessPhoneNumbersTheyAreSpecial(nsIAbCard *aCard); - PRInt32 GetTypeOfPhoneNumber(const nsAString& tagName); - nsresult AddValueToProtocolLine(const PRUnichar *value, nsString &protocolLine); - - // For updating... - PRInt32 HuntForExistingABEntryInServerRecord(PRInt32 aPersonIndex, - nsIAddrDatabase *aDatabase, - nsIAbDirectory *directory, - PRInt32 *aServerID, - nsIAbCard **newCard); - - nsresult FindCardByClientID(PRInt32 aClientID, - nsIAddrDatabase *aDatabase, - nsIAbDirectory *directory, - nsIAbCard **aReturnCard); - - PRBool CardAlreadyInAddressBook(nsIAbCard *newCard, - PRInt32 *aClientID, - ulong *aRetCRC); - - nsString mLocale; // Charset of returned data! - nsStringArray *mDeletedRecordTags; // The deleted record tags from the server... - nsStringArray *mDeletedRecordValues; // The deleted record values from the server... - - nsStringArray *mNewRecordTags; // The new record tags from the server... - nsStringArray *mNewRecordValues; // The new record values from the server... - - // Only support one column/value pair for now until #128567 is fixed to allow multiple pairs to be set. - nsCString mCurrentGenericColumn; // New generic column from server. - nsString mCurrentGenericValue; // New generic value from server. - - nsStringArray *mPhoneTypes; // Phone number types... - nsStringArray *mPhoneValues; // Phone number values... - - nsIDocShell *mRootDocShell; // For use in prompts -}; - -#endif /* __nsIAbSync_h__ */ diff --git a/mozilla/mailnews/absync/src/nsAbSyncCRCModel.cpp b/mozilla/mailnews/absync/src/nsAbSyncCRCModel.cpp deleted file mode 100644 index da0ac34115c..00000000000 --- a/mozilla/mailnews/absync/src/nsAbSyncCRCModel.cpp +++ /dev/null @@ -1,137 +0,0 @@ -/******************************************************************************/ -/* Start of crcmodel.c */ -/******************************************************************************/ -/* */ -/* Author : Ross Williams (ross@guest.adelaide.edu.au.). */ -/* Date : 3 June 1993. */ -/* Status : Public domain. */ -/* */ -/* Description : This is the implementation (.c) file for the reference */ -/* implementation of the Rocksoft^tm Model CRC Algorithm. For more */ -/* information on the Rocksoft^tm Model CRC Algorithm, see the document */ -/* titled "A Painless Guide to CRC Error Detection Algorithms" by Ross */ -/* Williams (ross@guest.adelaide.edu.au.). This document is likely to be in */ -/* "ftp.adelaide.edu.au/pub/rocksoft". */ -/* */ -/* Note: Rocksoft is a trademark of Rocksoft Pty Ltd, Adelaide, Australia. */ -/* */ -/******************************************************************************/ -/* */ -/* Implementation Notes */ -/* -------------------- */ -/* To avoid inconsistencies, the specification of each function is not echoed */ -/* here. See the header file for a description of these functions. */ -/* This package is light on checking because I want to keep it short and */ -/* simple and portable (i.e. it would be too messy to distribute my entire */ -/* C culture (e.g. assertions package) with this package. */ -/* */ -/******************************************************************************/ - -#include "nsAbSyncCRCModel.h" - -/******************************************************************************/ - -/* The following definitions make the code more readable. */ - -#define BITMASK(X) (1L << (X)) -#define MASK32 0xFFFFFFFFL -#define LOCAL static - -/******************************************************************************/ - -LOCAL ulong reflect P_((ulong v,int b)); -LOCAL ulong reflect (ulong v, int b) -/* Returns the value v with the bottom b [0,32] bits reflected. */ -/* Example: reflect(0x3e23L,3) == 0x3e26 */ -{ - int i; - ulong t = v; - for (i=0; i>=1; - } - return v; -} - -/******************************************************************************/ - -LOCAL ulong widmask P_((p_cm_t)); -LOCAL ulong widmask (p_cm_t p_cm) -/* Returns a longword whose value is (2^p_cm->cm_width)-1. */ -/* The trick is to do this portably (e.g. without doing <<32). */ -{ - return (((1L<<(p_cm->cm_width-1))-1L)<<1)|1L; -} - -/******************************************************************************/ - -void cm_ini (p_cm_t p_cm) -{ - p_cm->cm_reg = p_cm->cm_init; -} - -/******************************************************************************/ - -void cm_nxt (p_cm_t p_cm, int ch) -{ - int i; - ulong uch = (ulong) ch; - ulong topbit = BITMASK(p_cm->cm_width-1); - - if (p_cm->cm_refin) uch = reflect(uch,8); - p_cm->cm_reg ^= (uch << (p_cm->cm_width-8)); - for (i=0; i<8; i++) - { - if (p_cm->cm_reg & topbit) - p_cm->cm_reg = (p_cm->cm_reg << 1) ^ p_cm->cm_poly; - else - p_cm->cm_reg <<= 1; - p_cm->cm_reg &= widmask(p_cm); - } -} - -/******************************************************************************/ - -void cm_blk (p_cm_t p_cm,p_ubyte_ blk_adr,ulong blk_len) -{ - while (blk_len--) cm_nxt(p_cm,*blk_adr++); -} - -/******************************************************************************/ - -ulong cm_crc (p_cm_t p_cm) -{ - if (p_cm->cm_refot) - return p_cm->cm_xorot ^ reflect(p_cm->cm_reg,p_cm->cm_width); - else - return p_cm->cm_xorot ^ p_cm->cm_reg; -} - -/******************************************************************************/ - -ulong cm_tab (p_cm_t p_cm,int index) -{ - int i; - ulong r; - ulong topbit = BITMASK(p_cm->cm_width-1); - ulong inbyte = (ulong) index; - - if (p_cm->cm_refin) inbyte = reflect(inbyte,8); - r = inbyte << (p_cm->cm_width-8); - for (i=0; i<8; i++) - if (r & topbit) - r = (r << 1) ^ p_cm->cm_poly; - else - r<<=1; - if (p_cm->cm_refin) r = reflect(r,p_cm->cm_width); - return r & widmask(p_cm); -} - -/******************************************************************************/ -/* End of crcmodel.c */ -/******************************************************************************/ - diff --git a/mozilla/mailnews/absync/src/nsAbSyncCRCModel.h b/mozilla/mailnews/absync/src/nsAbSyncCRCModel.h deleted file mode 100644 index c90339651eb..00000000000 --- a/mozilla/mailnews/absync/src/nsAbSyncCRCModel.h +++ /dev/null @@ -1,149 +0,0 @@ -/******************************************************************************/ -/* Start of crcmodel.h */ -/******************************************************************************/ -/* */ -/* Author : Ross Williams (ross@guest.adelaide.edu.au.). */ -/* Date : 3 June 1993. */ -/* Status : Public domain. */ -/* */ -/* Description : This is the header (.h) file for the reference */ -/* implementation of the Rocksoft^tm Model CRC Algorithm. For more */ -/* information on the Rocksoft^tm Model CRC Algorithm, see the document */ -/* titled "A Painless Guide to CRC Error Detection Algorithms" by Ross */ -/* Williams (ross@guest.adelaide.edu.au.). This document is likely to be in */ -/* "ftp.adelaide.edu.au/pub/rocksoft". */ -/* */ -/* Note: Rocksoft is a trademark of Rocksoft Pty Ltd, Adelaide, Australia. */ -/* */ -/******************************************************************************/ -/* */ -/* How to Use This Package */ -/* ----------------------- */ -/* Step 1: Declare a variable of type cm_t. Declare another variable */ -/* (p_cm say) of type p_cm_t and initialize it to point to the first */ -/* variable (e.g. p_cm_t p_cm = &cm_t). */ -/* */ -/* Step 2: Assign values to the parameter fields of the structure. */ -/* If you don't know what to assign, see the document cited earlier. */ -/* For example: */ -/* p_cm->cm_width = 16; */ -/* p_cm->cm_poly = 0x8005L; */ -/* p_cm->cm_init = 0L; */ -/* p_cm->cm_refin = TRUE; */ -/* p_cm->cm_refot = TRUE; */ -/* p_cm->cm_xorot = 0L; */ -/* Note: Poly is specified without its top bit (18005 becomes 8005). */ -/* Note: Width is one bit less than the raw poly width. */ -/* */ -/* Step 3: Initialize the instance with a call cm_ini(p_cm); */ -/* */ -/* Step 4: Process zero or more message bytes by placing zero or more */ -/* successive calls to cm_nxt. Example: cm_nxt(p_cm,ch); */ -/* */ -/* Step 5: Extract the CRC value at any time by calling crc = cm_crc(p_cm); */ -/* If the CRC is a 16-bit value, it will be in the bottom 16 bits. */ -/* */ -/******************************************************************************/ -/* */ -/* Design Notes */ -/* ------------ */ -/* PORTABILITY: This package has been coded very conservatively so that */ -/* it will run on as many machines as possible. For example, all external */ -/* identifiers have been restricted to 6 characters and all internal ones to */ -/* 8 characters. The prefix cm (for Crc Model) is used as an attempt to avoid */ -/* namespace collisions. This package is endian independent. */ -/* */ -/* EFFICIENCY: This package (and its interface) is not designed for */ -/* speed. The purpose of this package is to act as a well-defined reference */ -/* model for the specification of CRC algorithms. If you want speed, cook up */ -/* a specific table-driven implementation as described in the document cited */ -/* above. This package is designed for validation only; if you have found or */ -/* implemented a CRC algorithm and wish to describe it as a set of parameters */ -/* to the Rocksoft^tm Model CRC Algorithm, your CRC algorithm implementation */ -/* should behave identically to this package under those parameters. */ -/* */ -/******************************************************************************/ - -/* The following #ifndef encloses this entire */ -/* header file, rendering it indempotent. */ -#ifndef CM_DONE -#define CM_DONE - -#include "prtypes.h" - -/******************************************************************************/ - -/* The following definitions are extracted from my style header file which */ -/* would be cumbersome to distribute with this package. The DONE_STYLE is the */ -/* idempotence symbol used in my style header file. */ - -typedef unsigned long ulong; -typedef unsigned char * p_ubyte_; - -/* Change to the second definition if you don't have prototypes. */ -#define P_(A) A -/* #define P_(A) () */ - -/* Uncomment this definition if you don't have void. */ -/* typedef int void; */ - -/******************************************************************************/ - -/* CRC Model Abstract Type */ -/* ----------------------- */ -/* The following type stores the context of an executing instance of the */ -/* model algorithm. Most of the fields are model parameters which must be */ -/* set before the first initializing call to cm_ini. */ -typedef struct - { - int cm_width; /* Parameter: Width in bits [8,32]. */ - ulong cm_poly; /* Parameter: The algorithm's polynomial. */ - ulong cm_init; /* Parameter: Initial register value. */ - PRBool cm_refin; /* Parameter: Reflect input bytes? */ - PRBool cm_refot; /* Parameter: Reflect output CRC? */ - ulong cm_xorot; /* Parameter: XOR this to output CRC. */ - - ulong cm_reg; /* Context: Context during execution. */ - } cm_t; -typedef cm_t *p_cm_t; - -/******************************************************************************/ - -/* Functions That Implement The Model */ -/* ---------------------------------- */ -/* The following functions animate the cm_t abstraction. */ - -void cm_ini P_((p_cm_t p_cm)); -/* Initializes the argument CRC model instance. */ -/* All parameter fields must be set before calling this. */ - -void cm_nxt P_((p_cm_t p_cm,int ch)); -/* Processes a single message byte [0,255]. */ - -void cm_blk P_((p_cm_t p_cm,p_ubyte_ blk_adr,ulong blk_len)); -/* Processes a block of message bytes. */ - -ulong cm_crc P_((p_cm_t p_cm)); -/* Returns the CRC value for the message bytes processed so far. */ - -/******************************************************************************/ - -/* Functions For Table Calculation */ -/* ------------------------------- */ -/* The following function can be used to calculate a CRC lookup table. */ -/* It can also be used at run-time to create or check static tables. */ - -ulong cm_tab P_((p_cm_t p_cm,int index)); -/* Returns the i'th entry for the lookup table for the specified algorithm. */ -/* The function examines the fields cm_width, cm_poly, cm_refin, and the */ -/* argument table index in the range [0,255] and returns the table entry in */ -/* the bottom cm_width bytes of the return value. */ - -/******************************************************************************/ - -/* End of the header file idempotence #ifndef */ -#endif - -/******************************************************************************/ -/* End of crcmodel.h */ -/******************************************************************************/ diff --git a/mozilla/mailnews/absync/src/nsAbSyncPostEngine.cpp b/mozilla/mailnews/absync/src/nsAbSyncPostEngine.cpp deleted file mode 100644 index d484540cb2c..00000000000 --- a/mozilla/mailnews/absync/src/nsAbSyncPostEngine.cpp +++ /dev/null @@ -1,859 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Pierre Phaneuf - * - * 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 NPL, 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 NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#include "msgCore.h" // for pre-compiled headers -#include "nsCOMPtr.h" -#include -#include "nscore.h" -#include "prprf.h" -#include "nsEscape.h" -#include "nsIFactory.h" -#include "nsISupports.h" -#include "comi18n.h" -#include "prmem.h" -#include "plstr.h" -#include "nsIPref.h" -#include "nsIComponentManager.h" -#include "nsIURI.h" -#include "nsString.h" -#include "nsReadableUtils.h" -#include "nsAbSyncPostEngine.h" -#include "nsIIOService.h" -#include "nsIChannel.h" -#include "nsNetUtil.h" -#include "nsMimeTypes.h" -#include "nsIHttpChannel.h" -#include "nsIUploadChannel.h" -#include "nsTextFormatter.h" -#include "nsICookieService.h" -#include "nsIAbSync.h" -#include "nsAbSyncCID.h" - -static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); -static NS_DEFINE_CID(kPrefCID, NS_PREF_CID); -static NS_DEFINE_CID(kCookieServiceCID, NS_COOKIESERVICE_CID); -static NS_DEFINE_CID(kCAbSyncMojoCID, NS_AB_SYNC_MOJO_CID); -static NS_DEFINE_CID(kAbSync, NS_ABSYNC_SERVICE_CID); - -/* - * This function will be used by the factory to generate an - * object class object.... - */ -NS_METHOD -nsAbSyncPostEngine::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) -{ - if (aOuter) - return NS_ERROR_NO_AGGREGATION; - - nsAbSyncPostEngine *ph = new nsAbSyncPostEngine(); - if (ph == nsnull) - return NS_ERROR_OUT_OF_MEMORY; - return ph->QueryInterface(aIID, aResult); -} - -NS_IMPL_ADDREF(nsAbSyncPostEngine) -NS_IMPL_RELEASE(nsAbSyncPostEngine) - -NS_INTERFACE_MAP_BEGIN(nsAbSyncPostEngine) - NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIURIContentListener) - NS_INTERFACE_MAP_ENTRY(nsIStreamListener) - NS_INTERFACE_MAP_ENTRY(nsIRequestObserver) - NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor) - NS_INTERFACE_MAP_ENTRY(nsIURIContentListener) - NS_INTERFACE_MAP_ENTRY(nsIAbSyncPostEngine) -NS_INTERFACE_MAP_END - -/* - * Inherited methods for nsMimeConverter - */ -nsAbSyncPostEngine::nsAbSyncPostEngine() -{ - // Init member variables... - mTotalWritten = 0; - mStillRunning = PR_TRUE; - - mListenerArray = nsnull; - mListenerArrayCount = 0; - - mPostEngineState = nsIAbSyncPostEngineState::nsIAbSyncPostIdle; - mTransactionID = 0; - mMessageSize = 0; - mAuthenticationRunning = PR_TRUE; - mCookie = nsnull; - mUser = nsnull; - mSyncProtocolRequest = nsnull; - mSyncProtocolRequestPrefix = nsnull; - mChannel = nsnull; - mMojoSyncSpec = nsnull; -} - -nsAbSyncPostEngine::~nsAbSyncPostEngine() -{ - mStillRunning = PR_FALSE; - - PR_FREEIF(mSyncProtocolRequest); - PR_FREEIF(mSyncProtocolRequestPrefix); - PR_FREEIF(mCookie); - PR_FREEIF(mUser); - PR_FREEIF(mMojoSyncSpec); - DeleteListeners(); -} - -PRInt32 Base64Decode_int(const char *in_str, unsigned char *out_str, - PRUint32& decoded_len); -/* ================================================================== - * Base64Encode - * - * Returns number of bytes that were encoded. - * - * >0 -> OK - * -1 -> BAD (output buffer not big enough). - * - * ================================================================== - */ -PRInt32 Base64Encode(const unsigned char *in_str, PRInt32 in_len, char *out_str, - PRInt32 out_len) -{ - static unsigned char base64[] = - { - /* 0 1 2 3 4 5 6 7 */ - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', /* 0 */ - 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', /* 1 */ - 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', /* 2 */ - 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', /* 3 */ - 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', /* 4 */ - 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', /* 5 */ - 'w', 'x', 'y', 'z', '0', '1', '2', '3', /* 6 */ - '4', '5', '6', '7', '8', '9', '+', '/' /* 7 */ - }; - PRInt32 curr_out_len = 0; - - PRInt32 i = 0; - unsigned char a, b, c; - - out_str[0] = '\0'; - - if (in_len > 0) - { - - while (i < in_len) - { - a = in_str[i]; - b = (i + 1 >= in_len) ? 0 : in_str[i + 1]; - c = (i + 2 >= in_len) ? 0 : in_str[i + 2]; - - if (i + 2 < in_len) - { - out_str[curr_out_len++] = (base64[(a >> 2) & 0x3F]); - out_str[curr_out_len++] = (base64[((a << 4) & 0x30) - + ((b >> 4) & 0xf)]); - out_str[curr_out_len++] = (base64[((b << 2) & 0x3c) - + ((c >> 6) & 0x3)]); - out_str[curr_out_len++] = (base64[c & 0x3F]); - } - else if (i + 1 < in_len) - { - out_str[curr_out_len++] = (base64[(a >> 2) & 0x3F]); - out_str[curr_out_len++] = (base64[((a << 4) & 0x30) - + ((b >> 4) & 0xf)]); - out_str[curr_out_len++] = (base64[((b << 2) & 0x3c) - + ((c >> 6) & 0x3)]); - out_str[curr_out_len++] = '='; - } - else - { - out_str[curr_out_len++] = (base64[(a >> 2) & 0x3F]); - out_str[curr_out_len++] = (base64[((a << 4) & 0x30) - + ((b >> 4) & 0xf)]); - out_str[curr_out_len++] = '='; - out_str[curr_out_len++] = '='; - } - - i += 3; - - if((curr_out_len + 4) > out_len) - { - return(-1); - } - - } - out_str[curr_out_len] = '\0'; - } - - return curr_out_len; -} - -/* - * This routine decodes base64 string to a buffer. - * Populates 'out_str' with b64 decoded data. - * - * Returns number of bytes that were decoded. - * >0 -> OK - * -1 -> BAD (output buffer not big enough). - */ -PRInt32 Base64Decode(const char *in_str, unsigned char *out_str, - PRUint32* decoded_len) -{ - return Base64Decode_int(in_str, out_str, *decoded_len); -} - -PRInt32 Base64Decode_int(const char *in_str, unsigned char *out_str, - PRUint32& decoded_len) -{ - PRInt32 in_len = strlen (/*(char *)*/ in_str); - PRInt32 ii = 0; - PRInt32 a = 0; - char ch; - PRInt32 b1 = 0; - long b4 = 0; - PRInt32 nn = 0; - - /* Decode remainder of base 64 string */ - - while (ii < in_len) - { - ch = in_str[ii++]; - if (ch >= 'A' && ch <= 'Z') b1 = (ch - 'A'); - else if (ch >= 'a' && ch <= 'z') b1 = 26 + (ch - 'a'); - else if (ch >= '0' && ch <= '9') b1 = 52 + (ch - '0'); - else if (ch == '+') b1 = 62; - else if (ch == '/') b1 = 63; - else if (ch == '\r' || ch == '\n') continue; - else - { - if (ch == '=') - { - if (nn == 3) - { - if ((a + 2) > (PRInt32) decoded_len) - return (-1); /* Bail. Buffer overflow */ - b4 = (b4 << 6); - out_str[a++] = (char) (0xff & (b4 >> 16)); - out_str[a++] = (char) (0xff & (b4 >> 8)); - } - else if (nn == 2) - { - if ((a + 1) > (PRInt32) decoded_len) - { - return (-1); /* Bail. Buffer overflow */ - } - b4 = (b4 << 12); - out_str[a++] = (char) (0xff & (b4 >> 16)); - } - } - break; - } - b4 = (b4 << 6) | (long) b1; - nn++; - if (nn == 4) - { - if ((a + 3) > (PRInt32) decoded_len) - { - return (-1); /* Bail. Buffer overflow */ - } - out_str[a++] = (char) (0xff & (b4 >> 16)); - out_str[a++] = (char) (0xff & (b4 >> 8)); - out_str[a++] = (char) (0xff & (b4)); - nn = 0; - } - } - - out_str[a] = '\0'; - decoded_len = a; - - return (a); -} - -NS_IMETHODIMP nsAbSyncPostEngine::GetInterface(const nsIID & aIID, void * *aInstancePtr) -{ - NS_ENSURE_ARG_POINTER(aInstancePtr); - return QueryInterface(aIID, aInstancePtr); -} - -// nsIURIContentListener support -NS_IMETHODIMP -nsAbSyncPostEngine::OnStartURIOpen(nsIURI* aURI, PRBool* aAbortOpen) -{ - return NS_OK; -} - -NS_IMETHODIMP -nsAbSyncPostEngine::IsPreferred(const char * aContentType, - char ** aDesiredContentType, - PRBool * aCanHandleContent) - -{ - return CanHandleContent(aContentType, PR_TRUE, aDesiredContentType, - aCanHandleContent); -} - -NS_IMETHODIMP -nsAbSyncPostEngine::CanHandleContent(const char * aContentType, - PRBool aIsContentPreferred, - char ** aDesiredContentType, - PRBool * aCanHandleContent) - -{ - if (nsCRT::strcasecmp(aContentType, MESSAGE_RFC822) == 0) - *aDesiredContentType = nsCRT::strdup("text/html"); - - // since we explicilty loaded the url, we always want to handle it! - *aCanHandleContent = PR_TRUE; - return NS_OK; -} - -NS_IMETHODIMP -nsAbSyncPostEngine::DoContent(const char * aContentType, - PRBool aIsContentPreferred, - nsIRequest *request, - nsIStreamListener ** aContentHandler, - PRBool * aAbortProcess) -{ - nsresult rv = NS_OK; - if (aAbortProcess) - *aAbortProcess = PR_FALSE; - QueryInterface(NS_GET_IID(nsIStreamListener), (void **) aContentHandler); - return rv; -} - -NS_IMETHODIMP -nsAbSyncPostEngine::GetParentContentListener(nsIURIContentListener** aParent) -{ - *aParent = nsnull; - return NS_OK; -} - -NS_IMETHODIMP -nsAbSyncPostEngine::SetParentContentListener(nsIURIContentListener* aParent) -{ - return NS_OK; -} - -NS_IMETHODIMP -nsAbSyncPostEngine::GetLoadCookie(nsISupports ** aLoadCookie) -{ - *aLoadCookie = mLoadCookie; - NS_IF_ADDREF(*aLoadCookie); - return NS_OK; -} - -NS_IMETHODIMP -nsAbSyncPostEngine::SetLoadCookie(nsISupports * aLoadCookie) -{ - mLoadCookie = aLoadCookie; - return NS_OK; -} - -nsresult -nsAbSyncPostEngine::StillRunning(PRBool *running) -{ - *running = mStillRunning; - return NS_OK; -} - - -// Methods for nsIStreamListener... -nsresult -nsAbSyncPostEngine::OnDataAvailable(nsIRequest *request, nsISupports * ctxt, nsIInputStream *aIStream, - PRUint32 sourceOffset, PRUint32 aLength) -{ - PRUint32 readLen = aLength; - - char *buf = (char *)PR_Malloc(aLength); - if (!buf) - return NS_ERROR_OUT_OF_MEMORY; /* we couldn't allocate the object */ - - // read the data from the input stram... - nsresult rv = aIStream->Read(buf, aLength, &readLen); - if (NS_FAILED(rv)) return rv; - - // write to the protocol response buffer... - mProtocolResponse.Append(NS_ConvertASCIItoUCS2(buf, readLen)); - PR_FREEIF(buf); - mTotalWritten += readLen; - - if (!mAuthenticationRunning) - NotifyListenersOnProgress(mTransactionID, mTotalWritten, 0); - return NS_OK; -} - - -// Methods for nsIRequestObserver -nsresult -nsAbSyncPostEngine::OnStartRequest(nsIRequest *request, nsISupports *ctxt) -{ - if (mAuthenticationRunning) - NotifyListenersOnStartAuthOperation(); - else - NotifyListenersOnStartSending(mTransactionID, mMessageSize); - return NS_OK; -} - -nsresult -nsAbSyncPostEngine::OnStopRequest(nsIRequest *request, nsISupports * /* ctxt */, nsresult aStatus) -{ -#ifdef NS_DEBUG_rhp - printf("nsAbSyncPostEngine::OnStopRequest()\n"); -#endif - - char *tProtResponse = nsnull; - - // - // Now complete the stream! - // - mStillRunning = PR_FALSE; - - // Check the content type! - nsCOMPtr channel = do_QueryInterface(request); - if (channel) - { - nsCAutoString contentType; - nsCAutoString charset; - - if (NS_SUCCEEDED(channel->GetContentType(contentType)) && - !contentType.Equals(NS_LITERAL_CSTRING(UNKNOWN_CONTENT_TYPE))) - { - mContentType = contentType; - } - - if (NS_SUCCEEDED(channel->GetContentCharset(charset)) && !charset.IsEmpty()) - { - mCharset = charset; - } - } - - // set the state... - mPostEngineState = nsIAbSyncPostEngineState::nsIAbSyncPostIdle; - - if (mAuthenticationRunning) - { - nsresult rv; - if (mSyncMojo) - rv = mSyncMojo->GetAbSyncMojoResults(&mUser, &mCookie, &mMojoSyncSpec, &mMojoSyncPort); - - if (NS_SUCCEEDED(rv)) - { - // Before we really get started...lets let sync know who is doing this... - nsCOMPtr sync(do_GetService(kAbSync, &rv)); - if (NS_SUCCEEDED(rv) || sync) - sync->SetAbSyncUser(mUser); - - // Base64 encode then url encode it... - // - char tUser[256] = ""; - - if (Base64Encode((unsigned char *)mUser, strlen(mUser), tUser, sizeof(tUser)) < 0) - { - rv = NS_ERROR_FAILURE; - NotifyListenersOnStopAuthOperation(rv, tProtResponse); - NotifyListenersOnStopSending(mTransactionID, rv, nsnull); - } - else - { - char *tUser2 = nsEscape(tUser, url_Path); - if (!tUser2) - { - rv = NS_ERROR_FAILURE; - NotifyListenersOnStopAuthOperation(rv, tProtResponse); - NotifyListenersOnStopSending(mTransactionID, rv, nsnull); - } - else - { - mSyncProtocolRequestPrefix = PR_smprintf("cn=%s&cc=%s&", tUser2, mCookie); - PR_FREEIF(tUser2); - NotifyListenersOnStopAuthOperation(aStatus, tProtResponse); - KickTheSyncOperation(); - } - } - - // RICHIE - Special here to show the server we are hitting! - // RICHIE - REMOVE THIS BEFORE SHIPPING!!!! -#ifdef DEBUG - PRUnichar *msgValue = nsnull; - msgValue = nsTextFormatter::smprintf(nsString(NS_LITERAL_STRING("Server: %s - port %d")).get(), - mMojoSyncSpec, mMojoSyncPort); - NotifyListenersOnStatus(mTransactionID, msgValue); - PR_FREEIF(msgValue); - // RICHIE -#endif - } - else - { - NotifyListenersOnStopAuthOperation(rv, tProtResponse); - NotifyListenersOnStopSending(mTransactionID, rv, nsnull); - } - - mSyncMojo = nsnull; - } - else - { - tProtResponse = ToNewCString(mProtocolResponse); - NotifyListenersOnStopSending(mTransactionID, aStatus, tProtResponse); - } - - PR_FREEIF(tProtResponse); - - // Time to return... - return NS_OK; -} - -/* void AddSyncListener (in nsIAbSyncPostListener aListener); */ -NS_IMETHODIMP nsAbSyncPostEngine::AddPostListener(nsIAbSyncPostListener *aListener) -{ - if ( (mListenerArrayCount > 0) || mListenerArray ) - { - ++mListenerArrayCount; - mListenerArray = (nsIAbSyncPostListener **) - PR_Realloc(*mListenerArray, sizeof(nsIAbSyncPostListener *) * mListenerArrayCount); - if (!mListenerArray) - return NS_ERROR_OUT_OF_MEMORY; - else - { - mListenerArray[mListenerArrayCount - 1] = aListener; - return NS_OK; - } - } - else - { - mListenerArrayCount = 1; - mListenerArray = (nsIAbSyncPostListener **) PR_Malloc(sizeof(nsIAbSyncPostListener *) * mListenerArrayCount); - if (!mListenerArray) - return NS_ERROR_OUT_OF_MEMORY; - - memset(mListenerArray, 0, (sizeof(nsIAbSyncPostListener *) * mListenerArrayCount)); - - mListenerArray[0] = aListener; - NS_ADDREF(mListenerArray[0]); - return NS_OK; - } -} - -/* void RemoveSyncListener (in nsIAbSyncPostListener aListener); */ -NS_IMETHODIMP nsAbSyncPostEngine::RemovePostListener(nsIAbSyncPostListener *aListener) -{ - PRInt32 i; - for (i=0; iOnStartAuthOperation(); - return NS_OK; -} - -nsresult -nsAbSyncPostEngine::NotifyListenersOnStopAuthOperation(nsresult aStatus, const char *aCookie) -{ - PRInt32 i; - for (i=0; iOnStopAuthOperation(aStatus, nsnull, aCookie); - return NS_OK; -} - -nsresult -nsAbSyncPostEngine::NotifyListenersOnStartSending(PRInt32 aTransactionID, PRUint32 aMsgSize) -{ - PRInt32 i; - for (i=0; iOnStartOperation(aTransactionID, aMsgSize); - - return NS_OK; -} - -nsresult -nsAbSyncPostEngine::NotifyListenersOnProgress(PRInt32 aTransactionID, PRUint32 aProgress, PRUint32 aProgressMax) -{ - PRInt32 i; - for (i=0; iOnProgress(aTransactionID, aProgress, aProgressMax); - - return NS_OK; -} - -nsresult -nsAbSyncPostEngine::NotifyListenersOnStatus(PRInt32 aTransactionID, PRUnichar *aMsg) -{ - PRInt32 i; - for (i=0; iOnStatus(aTransactionID, aMsg); - - return NS_OK; -} - -nsresult -nsAbSyncPostEngine::NotifyListenersOnStopSending(PRInt32 aTransactionID, nsresult aStatus, - char *aProtocolResponse) -{ - PRInt32 i; - for (i=0; iOnStopOperation(aTransactionID, aStatus, nsnull, aProtocolResponse); - - return NS_OK; -} - -// Utility to create a nsIURI object... -extern "C" nsresult -nsEngineNewURI(nsIURI** aInstancePtrResult, const char *aSpec, nsIURI *aBase) -{ - nsresult res; - - if (nsnull == aInstancePtrResult) - return NS_ERROR_NULL_POINTER; - - nsCOMPtr pService(do_GetService(kIOServiceCID, &res)); - if (NS_FAILED(res)) - return NS_ERROR_FACTORY_NOT_REGISTERED; - - return pService->NewURI(nsDependentCString(aSpec), nsnull, aBase, aInstancePtrResult); -} - -nsresult -nsAbSyncPostEngine::FireURLRequest(nsIURI *aURL, const char *postData) -{ - nsresult rv; - nsCOMPtr postStream; - - if (!postData) - return NS_ERROR_INVALID_ARG; - - NS_ENSURE_SUCCESS(NS_NewChannel(getter_AddRefs(mChannel), aURL, nsnull), NS_ERROR_FAILURE); - - // Tag the post stream onto the channel...but never seemed to work...so putting it - // directly on the URL spec - // - nsCOMPtr httpChannel = do_QueryInterface(mChannel); - if (!httpChannel) - return NS_ERROR_FAILURE; - - if (NS_SUCCEEDED(rv = NS_NewPostDataStream(getter_AddRefs(postStream), PR_FALSE, nsDependentCString(postData), 0))){ - nsCOMPtr uploadChannel(do_QueryInterface(httpChannel)); - NS_ASSERTION(uploadChannel, "http must support nsIUploadChannel"); - uploadChannel->SetUploadStream(postStream, NS_LITERAL_CSTRING(""), -1); - } - httpChannel->AsyncOpen(this, nsnull); - - return NS_OK; -} - -/* PRInt32 GetCurrentState (); */ -NS_IMETHODIMP nsAbSyncPostEngine::GetCurrentState(PRInt32 *_retval) -{ - *_retval = mPostEngineState; - return NS_OK; -} - -//////////////////////////////////////////////////////////////////////////////////////// -// -// This is the implementation of the actual post driver. -// -//////////////////////////////////////////////////////////////////////////////////////// -NS_IMETHODIMP nsAbSyncPostEngine::BuildMojoString(nsIDocShell *aRootDocShell, char **aID) -{ - nsresult rv; - - if (!aID) - return NS_ERROR_FAILURE; - - // Now, get the COMPtr to the Mojo! - if (!mSyncMojo) - { - rv = nsComponentManager::CreateInstance(kCAbSyncMojoCID, NULL, NS_GET_IID(nsIAbSyncMojo), getter_AddRefs(mSyncMojo)); - if ( NS_FAILED(rv) || (!mSyncMojo) ) - return NS_ERROR_FAILURE; - } - - rv = mSyncMojo->BuildMojoString(aRootDocShell, aID); - return rv; -} - -NS_IMETHODIMP nsAbSyncPostEngine::SendAbRequest(const char *aSpec, PRInt32 aPort, const char *aProtocolRequest, PRInt32 aTransactionID, - nsIDocShell *aDocShell, const char *aUser) -{ - nsresult rv; - - // Only try if we are not currently busy! - if (mPostEngineState != nsIAbSyncPostEngineState::nsIAbSyncPostIdle) - return NS_ERROR_FAILURE; - - // Now, get the COMPtr to the Mojo! - if (!mSyncMojo) - { - rv = nsComponentManager::CreateInstance(kCAbSyncMojoCID, NULL, NS_GET_IID(nsIAbSyncMojo), getter_AddRefs(mSyncMojo)); - if ( NS_FAILED(rv) || (!mSyncMojo) ) - return NS_ERROR_FAILURE; - } - - if (aUser) - mUser = nsCRT::strdup(aUser); - if (NS_FAILED(mSyncMojo->StartAbSyncMojo(this, aDocShell, mUser))) - return NS_ERROR_FAILURE; - - // Set transaction ID and save/init Sync info... - mTransactionID = aTransactionID; - - // Init stuff we need.... - mSyncProtocolRequest = nsCRT::strdup(aProtocolRequest); - mProtocolResponse.Truncate(); - mTotalWritten = 0; - - // The first thing we need to do is authentication so do it! - mAuthenticationRunning = PR_TRUE; - mPostEngineState = nsIAbSyncPostEngineState::nsIAbSyncAuthenticationRunning; - return NS_OK; -} - -NS_IMETHODIMP -nsAbSyncPostEngine::KickTheSyncOperation(void) -{ - nsresult rv; - nsIURI *workURI = nsnull; - char *protString = nsnull; - - // The first thing we need to do is authentication so do it! - mAuthenticationRunning = PR_FALSE; - mProtocolResponse.Truncate(); - mPostEngineState = nsIAbSyncPostEngineState::nsIAbSyncPostRunning; - - const char postHeader[] = "Content-Type: application/x-www-form-urlencoded\r\nContent-Length: %d\r\nCookie: %s\r\n\r\n%s"; - protString = PR_smprintf("%s%s", mSyncProtocolRequestPrefix, mSyncProtocolRequest); - if (protString) - mMessageSize = strlen(protString); - else - mMessageSize = 0; - - char *tCommand = PR_smprintf(postHeader, mMessageSize, mCookie, protString); - PR_FREEIF(protString); - -#ifdef DEBUG_rhp - printf("COMMAND = %s\n", tCommand); -#endif - - if (!tCommand) - { - rv = NS_ERROR_OUT_OF_MEMORY; // we couldn't allocate the string - goto GetOuttaHere; - } - - rv = nsEngineNewURI(&workURI, mMojoSyncSpec, nsnull); - if (NS_FAILED(rv) || (!workURI)) - { - rv = NS_ERROR_FAILURE; // we couldn't allocate the string - goto GetOuttaHere; - } - - if (mMojoSyncPort > 0) - workURI->SetPort(mMojoSyncPort); - - rv = FireURLRequest(workURI, tCommand); - - if (NS_SUCCEEDED(rv)) - NotifyListenersOnStartSending(mTransactionID, mMessageSize); - -GetOuttaHere: - NS_IF_RELEASE(workURI); - PR_FREEIF(tCommand); - mPostEngineState = nsIAbSyncPostEngineState::nsIAbSyncPostRunning; - return rv; -} - -NS_IMETHODIMP -nsAbSyncPostEngine::CancelAbSync() -{ - nsresult rv = NS_ERROR_FAILURE; - - if (mSyncMojo) - { - rv = mSyncMojo->CancelTheMojo(); - } - else if (mChannel) - { - rv = mChannel->Cancel(NS_BINDING_ABORTED); - } - - return rv; -} - -NS_IMETHODIMP -nsAbSyncPostEngine::GetMojoUserAndSnack(char **aMojoUser, char **aMojoSnack) -{ - if ( (!mUser) || (!mCookie) ) - return NS_ERROR_FAILURE; - - *aMojoUser = nsCRT::strdup(mUser); - *aMojoSnack = nsCRT::strdup(mCookie); - - if ( (!*aMojoUser) || (!*aMojoSnack) ) - return NS_ERROR_FAILURE; - else - return NS_OK; -} diff --git a/mozilla/mailnews/absync/src/nsAbSyncPostEngine.h b/mozilla/mailnews/absync/src/nsAbSyncPostEngine.h deleted file mode 100644 index d1030b2b8a5..00000000000 --- a/mozilla/mailnews/absync/src/nsAbSyncPostEngine.h +++ /dev/null @@ -1,135 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * 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 NPL, 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 NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ -#ifndef nsAbSyncPostEngine_h_ -#define nsAbSyncPostEngine_h_ - -#include "nsCOMPtr.h" -#include "nsIInputStream.h" -#include "nsIStreamListener.h" -#include "nsFileStream.h" -#include "nsIAbSyncPostEngine.h" -#include "nsIInterfaceRequestor.h" -#include "nsIInterfaceRequestorUtils.h" -#include "nsCURILoader.h" -#include "nsIURIContentListener.h" -#include "nsIURI.h" -#include "nsIAbSyncMojo.h" -#include "nsIChannel.h" - -// -// Callback declarations for URL completion -// -// For completion of send/message creation operations... -// -typedef nsresult (*nsPostCompletionCallback ) (nsresult aStatus, - const char *aContentType, - const char *aCharset, - PRInt32 totalSize, const PRUnichar* aMsg, - void *tagData); - -class nsAbSyncPostEngine : public nsIAbSyncPostEngine, public nsIStreamListener, public nsIURIContentListener, public nsIInterfaceRequestor { -public: - nsAbSyncPostEngine(); - virtual ~nsAbSyncPostEngine(); - - /* this macro defines QueryInterface, AddRef and Release for this class */ - NS_DECL_ISUPPORTS - NS_DECL_NSIABSYNCPOSTENGINE - - // - // This is the output stream where the stream converter will write processed data after - // conversion. - // - NS_IMETHOD StillRunning(PRBool *running); - - NS_IMETHOD FireURLRequest(nsIURI *aURL, const char *postData); - - NS_IMETHOD KickTheSyncOperation(); - - static NS_METHOD Create(nsISupports *aOuter, REFNSIID aIID, void **aResult); - - // Methods for nsIStreamListener - NS_DECL_NSISTREAMLISTENER - // Methods for nsIStreamObserver - NS_DECL_NSIREQUESTOBSERVER - NS_DECL_NSIURICONTENTLISTENER - NS_DECL_NSIINTERFACEREQUESTOR - - PRInt32 mPostEngineState; - PRInt32 mTransactionID; - -private: - // Handy methods for listeners... - nsresult DeleteListeners(); - nsresult NotifyListenersOnStartAuthOperation(void); - nsresult NotifyListenersOnStopAuthOperation(nsresult aStatus, const char *aCookie); - nsresult NotifyListenersOnStartSending(PRInt32 aTransactionID, PRUint32 aMsgSize); - nsresult NotifyListenersOnProgress(PRInt32 aTransactionID, PRUint32 aProgress, PRUint32 aProgressMax); - nsresult NotifyListenersOnStatus(PRInt32 aTransactionID, PRUnichar *aMsg); - nsresult NotifyListenersOnStopSending(PRInt32 aTransactionID, nsresult aStatus, - char *aProtocolResponse); - - PRBool mStillRunning; // Are we still running? - - PRInt32 mTotalWritten; // Size counter variable - nsString mProtocolResponse; // Protocol response - - nsCString mContentType; // The content type retrieved from the server - nsCString mCharset; // The charset retrieved from the server - - nsCOMPtr mLoadCookie; // load cookie used by the uri loader when we post the url - char *mCookie; - char *mUser; - char *mAuthSpec; - - PRInt32 mMessageSize; // Size of POST request... - - nsIAbSyncPostListener **mListenerArray; - PRInt32 mListenerArrayCount; - - // Since we need to do authentication a bit differently, do it here! - PRBool mAuthenticationRunning; - nsCOMPtr mSyncMojo; - nsCOMPtr mChannel; - char *mSyncProtocolRequest; - char *mSyncProtocolRequestPrefix; - - char *mMojoSyncSpec; - PRInt32 mMojoSyncPort; -}; - -#endif /* nsAbSyncPostEngine_h_ */ diff --git a/mozilla/mailnews/absync/src/nsSyncDecoderRing.cpp b/mozilla/mailnews/absync/src/nsSyncDecoderRing.cpp deleted file mode 100644 index 4e393a049a3..00000000000 --- a/mozilla/mailnews/absync/src/nsSyncDecoderRing.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * 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 NPL, 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 NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ -#include "nsAbSync.h" -#include "prmem.h" -#include "nsAbSyncCID.h" -#include "nsIPref.h" -#include "nsIServiceManager.h" -#include "nsEscape.h" -#include "nsSyncDecoderRing.h" - - -nsSyncDecoderRing::nsSyncDecoderRing() -{ -} - -nsSyncDecoderRing::~nsSyncDecoderRing() -{ -} - - diff --git a/mozilla/mailnews/absync/src/nsSyncDecoderRing.h b/mozilla/mailnews/absync/src/nsSyncDecoderRing.h deleted file mode 100644 index f39bf457866..00000000000 --- a/mozilla/mailnews/absync/src/nsSyncDecoderRing.h +++ /dev/null @@ -1,98 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape 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/NPL/ - * - * 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) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * 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 NPL, 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 NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#ifndef __nsSyncDecoderRing_h__ -#define __nsSyncDecoderRing_h__ - -#include "nsIAbSync.h" -#include "nsIAbSyncPostListener.h" -#include "nsIAbSyncPostEngine.h" -#include "nsCOMPtr.h" -#include "nsIAddrDatabase.h" -#include "nsIAbDirectory.h" -#include "nsAbSyncCRCModel.h" - - -// Server record fields! -#define kServerFirstNameColumn NS_LITERAL_STRING("fname") -#define kServerLastNameColumn NS_LITERAL_STRING("lname") -#define kServerDisplayNameColumn NS_LITERAL_STRING("Display_name") -#define kServerNicknameColumn NS_LITERAL_STRING("nick_name") -#define kServerPriEmailColumn NS_LITERAL_STRING("email1") -#define kServer2ndEmailColumn NS_LITERAL_STRING("email2") -#define kServerPlainTextColumn NS_LITERAL_STRING("Pref_rich_email") -#define kServerWorkPhoneColumn NS_LITERAL_STRING("work_phone") -#define kServerHomePhoneColumn NS_LITERAL_STRING("home_phone") -#define kServerFaxColumn NS_LITERAL_STRING("fax") -#define kServerPagerColumn NS_LITERAL_STRING("pager") -#define kServerCellularColumn NS_LITERAL_STRING("cell_phone") -#define kServerHomeAddressColumn NS_LITERAL_STRING("home_add1") -#define kServerHomeAddress2Column NS_LITERAL_STRING("home_add2") -#define kServerHomeCityColumn NS_LITERAL_STRING("home_city") -#define kServerHomeStateColumn NS_LITERAL_STRING("home_state") -#define kServerHomeZipCodeColumn NS_LITERAL_STRING("home_zip") -#define kServerHomeCountryColumn NS_LITERAL_STRING("home_country") -#define kServerWorkAddressColumn NS_LITERAL_STRING("work_add1") -#define kServerWorkAddress2Column NS_LITERAL_STRING("work_add2") -#define kServerWorkCityColumn NS_LITERAL_STRING("work_city") -#define kServerWorkStateColumn NS_LITERAL_STRING("work_state") -#define kServerWorkZipCodeColumn NS_LITERAL_STRING("work_zip") -#define kServerWorkCountryColumn NS_LITERAL_STRING("work_country") -#define kServerJobTitleColumn NS_LITERAL_STRING("job_title") -#define kServerDepartmentColumn NS_LITERAL_STRING("department") -#define kServerCompanyColumn NS_LITERAL_STRING("company") -#define kServerWebPage1Column NS_LITERAL_STRING("Work_web_page") -#define kServerWebPage2Column NS_LITERAL_STRING("web_page") -#define kServerBirthYearColumn NS_LITERAL_STRING("OMIT:BirthYear") -#define kServerBirthMonthColumn NS_LITERAL_STRING("OMIT:BirthMonth") -#define kServerBirthDayColumn NS_LITERAL_STRING("OMIT:BirthDay") -#define kServerCustom1Column NS_LITERAL_STRING("Custom_1") -#define kServerCustom2Column NS_LITERAL_STRING("Custom_2") -#define kServerCustom3Column NS_LITERAL_STRING("Custom_3") -#define kServerCustom4Column NS_LITERAL_STRING("Custom_4") -#define kServerNotesColumn NS_LITERAL_STRING("addl_info") -#define kServerLastModifiedDateColumn NS_LITERAL_STRING("OMIT:LastModifiedDate") - -class nsSyncDecoderRing -{ -public: - - nsSyncDecoderRing(); - virtual ~nsSyncDecoderRing(); -}; - -#endif /* __nsSyncDecoderRing_h__ */ diff --git a/mozilla/mailnews/jar.mn b/mozilla/mailnews/jar.mn index 29b750279a6..3745382a683 100644 --- a/mozilla/mailnews/jar.mn +++ b/mozilla/mailnews/jar.mn @@ -291,7 +291,6 @@ en-US.jar: locale/en-US/messenger/SmtpServerList.dtd (base/prefs/resources/locale/en-US/SmtpServerList.dtd) locale/en-US/messenger/smtpEditOverlay.dtd (base/prefs/resources/locale/en-US/smtpEditOverlay.dtd) locale/en-US/messenger/mailPrefsOverlay.dtd (base/prefs/resources/locale/en-US/mailPrefsOverlay.dtd) - locale/en-US/messenger/addressbook/absync.properties (absync/resources/locale/en-US/absync.properties) locale/en-US/messenger/addressbook/pref-addressing.dtd (addrbook/prefs/resources/locale/en-US/pref-addressing.dtd) locale/en-US/messenger/addressbook/pref-directory.dtd (addrbook/prefs/resources/locale/en-US/pref-directory.dtd) locale/en-US/messenger/addressbook/pref-directory-add.dtd (addrbook/prefs/resources/locale/en-US/pref-directory-add.dtd) diff --git a/mozilla/xpinstall/packager/packages-mac b/mozilla/xpinstall/packager/packages-mac index 18fcf63597f..41a574a79cc 100644 --- a/mozilla/xpinstall/packager/packages-mac +++ b/mozilla/xpinstall/packager/packages-mac @@ -340,8 +340,6 @@ viewer:Components:msgImportText.shlb viewer:Components:msgImportEudora.shlb viewer:Components:msgImportComm4xM.shlb viewer:Components:msgImportComm4xM.xpt -viewer:Components:AbSyncSvc.shlb -viewer:Components:AbSyncSvc.xpt viewer:Components:nsLDAPPrefsService.js viewer:Components:msgsmime.shlb viewer:Components:msgsmime.xpt diff --git a/mozilla/xpinstall/packager/packages-os2 b/mozilla/xpinstall/packager/packages-os2 index 7e207649d64..ed58ae539c4 100644 --- a/mozilla/xpinstall/packager/packages-os2 +++ b/mozilla/xpinstall/packager/packages-os2 @@ -379,8 +379,6 @@ bin/components/impText.dll ;bin/components/impComm4xMail.dll bin/components/imp4Mail.dll bin/components/impComm4xMail.xpt -bin/components/absyncsv.dll -bin/components/absync.xpt bin/components/nsLDAPPrefsService.js bin/chrome/messenger.jar bin/chrome/icons/default/abcardWindow.ico diff --git a/mozilla/xpinstall/packager/packages-static-unix b/mozilla/xpinstall/packager/packages-static-unix index 63adf4faa68..e022ca7f5ac 100644 --- a/mozilla/xpinstall/packager/packages-static-unix +++ b/mozilla/xpinstall/packager/packages-static-unix @@ -251,7 +251,6 @@ bin/components/msgsearch.xpt bin/components/nsLDAPPrefsService.js bin/components/txmgr.xpt bin/components/import.xpt -bin/components/absync.xpt bin/chrome/messenger.jar bin/components/msgsmime.xpt bin/components/smime-service.js diff --git a/mozilla/xpinstall/packager/packages-static-win b/mozilla/xpinstall/packager/packages-static-win index 4822455c8ce..f78aa9282e7 100644 --- a/mozilla/xpinstall/packager/packages-static-win +++ b/mozilla/xpinstall/packager/packages-static-win @@ -280,7 +280,6 @@ bin\components\msglocal.xpt bin\components\msgnews.xpt bin\components\msgsearch.xpt bin\components\import.xpt -bin\components\absync.xpt bin\components\nsLDAPPrefsService.js bin\components\msgsmime.xpt bin\components\smime-service.js diff --git a/mozilla/xpinstall/packager/packages-unix b/mozilla/xpinstall/packager/packages-unix index 776810c5d36..a639caef5b9 100644 --- a/mozilla/xpinstall/packager/packages-unix +++ b/mozilla/xpinstall/packager/packages-unix @@ -333,7 +333,6 @@ bin/components/libsmimestb.so bin/components/libimport.so bin/components/libimpText.so bin/components/libimpComm4xMail.so -bin/components/libabsyncsvc.so bin/components/mailnews.xpt bin/components/mime.xpt bin/components/msgbase.xpt @@ -347,7 +346,6 @@ bin/components/nsLDAPPrefsService.js bin/components/txmgr.xpt bin/components/import.xpt bin/components/impComm4xMail.xpt -bin/components/absync.xpt bin/chrome/messenger.jar bin/components/libmsgsmime.so bin/components/msgsmime.xpt diff --git a/mozilla/xpinstall/packager/packages-win b/mozilla/xpinstall/packager/packages-win index efe83f06aca..a0ba61e7abc 100644 --- a/mozilla/xpinstall/packager/packages-win +++ b/mozilla/xpinstall/packager/packages-win @@ -275,8 +275,6 @@ bin\components\impEudra.dll bin\components\impText.dll bin\components\impComm4xMail.dll bin\components\impComm4xMail.xpt -bin\components\absyncsv.dll -bin\components\absync.xpt bin\components\nsLDAPPrefsService.js bin\chrome\messenger.jar bin\chrome\messenger\*