Bug 1181434 - Fix fallout from bug 905127 due to missing headers for mail/ and mailnews/. r=rkent.
authorEdmund Wong <ewong@pw-wspx.org>
Thu, 09 Jul 2015 15:17:55 +0800
changeset 23536 c5b6790ea9ce98eefb0cf1f282ff8c485078d29c
parent 23535 a77e7b1551c9ded9e770618edd964a2a5e15de0d
child 23537 0147beb92bfed3be7413b0bde90d3733d2ee6789
push id261
push usermbanner@mozilla.com
push dateThu, 29 Oct 2015 19:15:40 +0000
reviewersrkent
bugs1181434, 905127
Bug 1181434 - Fix fallout from bug 905127 due to missing headers for mail/ and mailnews/. r=rkent.
mail/components/migration/src/nsNetscapeProfileMigratorBase.cpp
mail/components/migration/src/nsSeamonkeyProfileMigrator.cpp
mailnews/addrbook/src/nsAbContentHandler.cpp
mailnews/addrbook/src/nsAbLDIFService.cpp
mailnews/addrbook/src/nsAddbookProtocolHandler.cpp
mailnews/base/search/src/nsMsgFilterList.cpp
mailnews/base/search/src/nsMsgFilterService.cpp
mailnews/base/src/nsMessenger.cpp
mailnews/base/src/nsMsgAccountManager.cpp
mailnews/base/src/nsMsgFolderCompactor.cpp
mailnews/base/test/TestMailCookie.cpp
mailnews/base/util/nsMsgI18N.cpp
mailnews/base/util/nsMsgProtocol.cpp
mailnews/base/util/nsMsgUtils.cpp
mailnews/base/util/nsMsgUtils.h
mailnews/compose/src/nsMsgAttachmentHandler.cpp
mailnews/compose/src/nsMsgComposeService.cpp
mailnews/compose/src/nsSmtpProtocol.cpp
mailnews/compose/src/nsSmtpService.cpp
mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp
mailnews/imap/src/nsImapMailFolder.cpp
mailnews/imap/src/nsImapProtocol.cpp
mailnews/import/applemail/src/nsAppleMailImport.cpp
mailnews/import/applemail/src/nsEmlxHelperUtils.mm
mailnews/import/eudora/src/nsEudoraMac.cpp
mailnews/import/eudora/src/nsEudoraMailbox.cpp
mailnews/import/oexpress/nsOE5File.cpp
mailnews/import/oexpress/nsOEMailbox.cpp
mailnews/import/outlook/src/MapiMessage.cpp
mailnews/import/outlook/src/nsOutlookCompose.cpp
mailnews/import/outlook/src/nsOutlookMail.cpp
mailnews/local/src/nsMailboxProtocol.cpp
mailnews/local/src/nsMailboxProtocol.h
mailnews/local/src/nsMailboxService.cpp
mailnews/local/src/nsMailboxUrl.h
mailnews/local/src/nsMovemailService.cpp
mailnews/local/src/nsParseMailbox.cpp
mailnews/local/src/nsPop3Protocol.cpp
mailnews/news/src/nsNNTPProtocol.cpp
mailnews/news/src/nsNewsFolder.cpp
mailnews/news/src/nsNntpMockChannel.cpp
mailnews/news/src/nsNntpService.cpp
--- a/mail/components/migration/src/nsNetscapeProfileMigratorBase.cpp
+++ b/mail/components/migration/src/nsNetscapeProfileMigratorBase.cpp
@@ -16,16 +16,18 @@
 #include "nsISupportsPrimitives.h"
 #include "nsIURL.h"
 #include "nsNetscapeProfileMigratorBase.h"
 #include "nsNetUtil.h"
 #include "prtime.h"
 #include "prprf.h"
 #include "nsINIParser.h"
 #include "nsMailProfileMigratorUtils.h"
+#include "nsISimpleEnumerator.h"
+#include "nsServiceManagerUtils.h"
 
 #define MIGRATION_BUNDLE "chrome://messenger/locale/migration/migration.properties"
 
 #define FILE_NAME_PREFS_5X NS_LITERAL_STRING("prefs.js")
 
 ///////////////////////////////////////////////////////////////////////////////
 // nsNetscapeProfileMigratorBase
 nsNetscapeProfileMigratorBase::nsNetscapeProfileMigratorBase()
--- a/mail/components/migration/src/nsSeamonkeyProfileMigrator.cpp
+++ b/mail/components/migration/src/nsSeamonkeyProfileMigrator.cpp
@@ -9,16 +9,17 @@
 #include "nsIPrefService.h"
 #include "nsArrayUtils.h"
 #include "nsISupportsPrimitives.h"
 #include "nsNetCID.h"
 #include "nsNetUtil.h"
 #include "nsSeamonkeyProfileMigrator.h"
 #include "nsAppDirectoryServiceDefs.h"
 #include "mozilla/ArrayUtils.h"
+#include "nsIFile.h"
 
 // Mail specific folder paths
 #define MAIL_DIR_50_NAME             NS_LITERAL_STRING("Mail")
 #define IMAP_MAIL_DIR_50_NAME        NS_LITERAL_STRING("ImapMail")
 #define NEWS_DIR_50_NAME             NS_LITERAL_STRING("News")
 
 
 ///////////////////////////////////////////////////////////////////////////////
--- a/mailnews/addrbook/src/nsAbContentHandler.cpp
+++ b/mailnews/addrbook/src/nsAbContentHandler.cpp
@@ -12,17 +12,17 @@
 #include "nsISupportsPrimitives.h"
 #include "plstr.h"
 #include "nsIDOMWindow.h"
 #include "nsMsgUtils.h"
 #include "nsIMsgVCardService.h"
 #include "nsIAbCard.h"
 #include "nsIAbManager.h"
 #include "nsVCard.h"
-
+#include "nsIChannel.h"
 //
 // nsAbContentHandler
 //
 nsAbContentHandler::nsAbContentHandler()
 {
 }
 
 nsAbContentHandler::~nsAbContentHandler()
--- a/mailnews/addrbook/src/nsAbLDIFService.cpp
+++ b/mailnews/addrbook/src/nsAbLDIFService.cpp
@@ -2,23 +2,25 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #include "nsIAddrDatabase.h"
 #include "nsStringGlue.h"
 #include "nsAbLDIFService.h"
 #include "nsIFile.h"
 #include "nsILineInputStream.h"
+#include "nsIInputStream.h"
 #include "nsNetUtil.h"
 #include "nsISeekableStream.h"
 #include "mdb.h"
 #include "plstr.h"
 #include "prmem.h"
 #include "prprf.h"
 #include "nsCRTGlue.h"
+#include "nsTArray.h"
 
 #include <ctype.h>
 
 NS_IMPL_ISUPPORTS(nsAbLDIFService, nsIAbLDIFService)
 
 // If we get a line longer than 32K it's just toooooo bad!
 #define kTextAddressBufferSz    (64 * 1024)
 
--- a/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp
+++ b/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp
@@ -20,16 +20,18 @@
 #include "prmem.h"
 #include "nsIAbView.h"
 #include "nsITreeView.h"
 #include "nsIStringBundle.h"
 #include "nsIServiceManager.h"
 #include "mozilla/Services.h"
 #include "nsIAsyncInputStream.h"
 #include "nsIAsyncOutputStream.h"
+#include "nsIPipe.h"
+#include "nsIPrincipal.h"
 
 nsAddbookProtocolHandler::nsAddbookProtocolHandler()
 {
   mAddbookOperation = nsIAddbookUrlOperation::InvalidUrl;
 }
 
 nsAddbookProtocolHandler::~nsAddbookProtocolHandler()
 {
--- a/mailnews/base/search/src/nsMsgFilterList.cpp
+++ b/mailnews/base/search/src/nsMsgFilterList.cpp
@@ -13,16 +13,17 @@
 #include "nsIMsgFilterHitNotify.h"
 #include "nsMsgUtils.h"
 #include "nsMsgSearchTerm.h"
 #include "nsStringGlue.h"
 #include "nsMsgBaseCID.h"
 #include "nsIMsgFilterService.h"
 #include "nsMsgSearchScopeTerm.h"
 #include "nsNetUtil.h"
+#include "nsIInputStream.h"
 #include "nsMsgI18N.h"
 #include "nsMemory.h"
 #include "prmem.h"
 #include "mozilla/ArrayUtils.h"
 #include <ctype.h>
 
 // unicode "%s" format string
 static const char16_t unicodeFormatter[] = {
--- a/mailnews/base/search/src/nsMsgFilterService.cpp
+++ b/mailnews/base/search/src/nsMsgFilterService.cpp
@@ -20,17 +20,19 @@
 #include "nsIMsgCopyServiceListener.h"
 #include "nsIMsgLocalMailFolder.h"
 #include "nsIMsgDatabase.h"
 #include "nsIMsgHdr.h"
 #include "nsIDBFolderInfo.h"
 #include "nsIRDFService.h"
 #include "nsMsgBaseCID.h"
 #include "nsIMsgCopyService.h"
+#include "nsIInputStream.h"
 #include "nsIOutputStream.h"
+#include "nsISafeOutputStream.h"
 #include "nsIMsgComposeService.h"
 #include "nsMsgCompCID.h"
 #include "nsNetUtil.h"
 #include "nsMsgUtils.h"
 #include "nsIMutableArray.h"
 #include "nsIMsgMailSession.h"
 #include "nsArrayUtils.h"
 #include "nsCOMArray.h"
--- a/mailnews/base/src/nsMessenger.cpp
+++ b/mailnews/base/src/nsMessenger.cpp
@@ -104,16 +104,19 @@ static NS_DEFINE_CID(kRDFServiceCID,  NS
 #define MIMETYPE_DELETED    "text/x-moz-deleted"
 #define ATTACHMENT_PERMISSION 00664
 
 //
 // Convert an nsString buffer to plain text...
 //
 #include "nsMsgUtils.h"
 #include "nsCharsetSource.h"
+#include "nsIChannel.h"
+#include "nsIOutputStream.h"
+#include "nsIPrincipal.h"
 
 static void ConvertAndSanitizeFileName(const char * displayName, nsString& aResult)
 {
   nsCString unescapedName;
 
   /* we need to convert the UTF-8 fileName to platform specific character set.
      The display name is in UTF-8 because it has been escaped from JS
   */
--- a/mailnews/base/src/nsMsgAccountManager.cpp
+++ b/mailnews/base/src/nsMsgAccountManager.cpp
@@ -60,16 +60,19 @@
 #include "nsThreadUtils.h"
 #include "nsNetUtil.h"
 #include "nsIStringBundle.h"
 #include "nsMsgMessageFlags.h"
 #include "nsIMsgFilterList.h"
 #include "nsDirectoryServiceUtils.h"
 #include "mozilla/Services.h"
 #include <algorithm>
+#include "nsIFileStreams.h"
+#include "nsIOutputStream.h"
+#include "nsISafeOutputStream.h"
 
 #define PREF_MAIL_ACCOUNTMANAGER_ACCOUNTS "mail.accountmanager.accounts"
 #define PREF_MAIL_ACCOUNTMANAGER_DEFAULTACCOUNT "mail.accountmanager.defaultaccount"
 #define PREF_MAIL_ACCOUNTMANAGER_LOCALFOLDERSSERVER "mail.accountmanager.localfoldersserver"
 #define PREF_MAIL_SERVER_PREFIX "mail.server."
 #define ACCOUNT_PREFIX "account"
 #define SERVER_PREFIX "server"
 #define ID_PREFIX "id"
--- a/mailnews/base/src/nsMsgFolderCompactor.cpp
+++ b/mailnews/base/src/nsMsgFolderCompactor.cpp
@@ -29,16 +29,19 @@
 #include "nsArrayUtils.h"
 #include "nsMsgMessageFlags.h"
 #include "nsIMsgStatusFeedback.h"
 #include "nsMsgBaseCID.h"
 #include "nsIMsgFolderNotificationService.h"
 #include "nsIMsgPluggableStore.h"
 #include "nsMsgFolderCompactor.h"
 #include <algorithm>
+#include "nsIOutputStream.h"
+#include "nsIInputStream.h"
+
 
 //////////////////////////////////////////////////////////////////////////////
 // nsFolderCompactState
 //////////////////////////////////////////////////////////////////////////////
 
 NS_IMPL_ISUPPORTS(nsFolderCompactState, nsIMsgFolderCompactor, nsIRequestObserver, nsIStreamListener, nsICopyMessageStreamListener, nsIUrlListener)
 
 nsFolderCompactState::nsFolderCompactState()
--- a/mailnews/base/test/TestMailCookie.cpp
+++ b/mailnews/base/test/TestMailCookie.cpp
@@ -12,16 +12,17 @@
 #include <stdio.h>
 #include "plstr.h"
 #include "prprf.h"
 #include "nsNetUtil.h"
 #include "nsNetCID.h"
 #include "nsStringAPI.h"
 #include "nsIPrefBranch.h"
 #include "nsIPrefService.h"
+#include "nsServiceManagerUtils.h"
 
 static NS_DEFINE_CID(kCookieServiceCID, NS_COOKIESERVICE_CID);
 static NS_DEFINE_CID(kPrefServiceCID,   NS_PREFSERVICE_CID);
 
 // various pref strings
 static const char kCookiesPermissions[] = "network.cookie.cookieBehavior";
 static const char kCookiesLifetimeEnabled[] = "network.cookie.lifetime.enabled";
 static const char kCookiesLifetimeDays[] = "network.cookie.lifetime.days";
--- a/mailnews/base/util/nsMsgI18N.cpp
+++ b/mailnews/base/util/nsMsgI18N.cpp
@@ -21,16 +21,17 @@
 #include "nsStringGlue.h"
 #include "prmem.h"
 #include "plstr.h"
 #include "nsUTF8Utils.h"
 #include "nsNetUtil.h"
 #include "nsCRTGlue.h"
 #include "nsComponentManagerUtils.h"
 #include "nsUnicharUtils.h"
+#include "nsIFileStreams.h"
 //
 // International functions necessary for composition
 //
 
 nsresult nsMsgI18NConvertFromUnicode(const char* aCharset,
                                      const nsString& inString,
                                      nsACString& outString,
                                      bool aIsCharsetCanonical)
--- a/mailnews/base/util/nsMsgProtocol.cpp
+++ b/mailnews/base/util/nsMsgProtocol.cpp
@@ -29,16 +29,17 @@
 #include "nsThreadUtils.h"
 #include "nsIPrefBranch.h"
 #include "nsIPrefService.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsMsgUtils.h"
 #include "nsILineInputStream.h"
 #include "nsIAsyncInputStream.h"
 #include "nsIMsgIncomingServer.h"
+#include "nsIInputStreamPump.h"
 #include "nsMimeTypes.h"
 #include "nsAlgorithm.h"
 #include "mozilla/Services.h"
 #include <algorithm>
 
 #undef PostMessage // avoid to collision with WinUser.h
 
 using namespace mozilla;
--- a/mailnews/base/util/nsMsgUtils.cpp
+++ b/mailnews/base/util/nsMsgUtils.cpp
@@ -69,16 +69,20 @@
 #include "nsILineInputStream.h"
 #include "nsIPlatformCharset.h"
 #include "nsIParserUtils.h"
 #include "nsICharsetConverterManager.h"
 #include "nsIDocumentEncoder.h"
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/Services.h"
 #include "locale.h"
+#include "nsStringStream.h"
+#include "nsIInputStreamPump.h"
+#include "nsIChannel.h"
+
 using namespace mozilla;
 
 static NS_DEFINE_CID(kImapUrlCID, NS_IMAPURL_CID);
 static NS_DEFINE_CID(kCMailboxUrl, NS_MAILBOXURL_CID);
 static NS_DEFINE_CID(kCNntpUrlCID, NS_NNTPURL_CID);
 
 #define ILLEGAL_FOLDER_CHARS ";#"
 #define ILLEGAL_FOLDER_CHARS_AS_FIRST_LETTER "."
--- a/mailnews/base/util/nsMsgUtils.h
+++ b/mailnews/base/util/nsMsgUtils.h
@@ -7,21 +7,23 @@
 #define _NSMSGUTILS_H
 
 #include "nsIURL.h"
 #include "nsStringGlue.h"
 #include "msgCore.h"
 #include "nsCOMPtr.h"
 #include "MailNewsTypes2.h"
 #include "nsTArray.h"
-#include "nsIInterfaceRequestor.h"
+#include "nsInterfaceRequestorAgg.h"
 #include "nsILoadGroup.h"
 #include "nsISupportsArray.h"
 #include "nsIAtom.h"
 #include "nsINetUtil.h"
+#include "nsIRequest.h"
+#include "nsILoadInfo.h"
 #include "nsServiceManagerUtils.h"
 #include "nsUnicharUtils.h"
 #include "nsIFile.h"
 
 class nsIChannel;
 class nsIFile;
 class nsIPrefBranch;
 class nsIMsgFolder;
--- a/mailnews/compose/src/nsMsgAttachmentHandler.cpp
+++ b/mailnews/compose/src/nsMsgAttachmentHandler.cpp
@@ -29,16 +29,17 @@
 #include "nsMsgMimeCID.h"
 #include "nsNetUtil.h"
 #include "nsNativeCharsetUtils.h"
 #include "nsComposeStrings.h"
 #include "nsIZipWriter.h"
 #include "nsIDirectoryEnumerator.h"
 #include "mozilla/Services.h"
 #include "mozilla/mailnews/MimeEncoder.h"
+#include "nsIPrincipal.h"
 
 ///////////////////////////////////////////////////////////////////////////
 // Mac Specific Attachment Handling for AppleDouble Encoded Files
 ///////////////////////////////////////////////////////////////////////////
 #ifdef XP_MACOSX
 
 #define AD_WORKING_BUFF_SIZE                  8192
 
--- a/mailnews/compose/src/nsMsgComposeService.cpp
+++ b/mailnews/compose/src/nsMsgComposeService.cpp
@@ -55,16 +55,17 @@
 #include "nsIMsgHdr.h"
 #include "nsIMsgMessageService.h"
 #include "nsMsgUtils.h"
 #endif
 
 #include "nsICommandLine.h"
 #include "nsIAppStartup.h"
 #include "nsMsgUtils.h"
+#include "nsIPrincipal.h"
 
 #ifdef XP_WIN32
 #include <windows.h>
 #include <shellapi.h>
 #include "nsIWidget.h"
 #endif
 
 #define DEFAULT_CHROME  "chrome://messenger/content/messengercompose/messengercompose.xul"
--- a/mailnews/compose/src/nsSmtpProtocol.cpp
+++ b/mailnews/compose/src/nsSmtpProtocol.cpp
@@ -36,16 +36,17 @@
 #include "nsIStringBundle.h"
 #include "nsMsgCompUtils.h"
 #include "nsIMsgWindow.h"
 #include "MailNewsTypes2.h" // for nsMsgSocketType and nsMsgAuthMethod
 #include "nsIIDNService.h"
 #include "mozilla/mailnews/MimeHeaderParser.h"
 #include "mozilla/Services.h"
 #include "nsINetAddr.h"
+#include "nsIProxyInfo.h"
 
 #ifndef XP_UNIX
 #include <stdarg.h>
 #endif /* !XP_UNIX */
 
 #undef PostMessage // avoid to collision with WinUser.h
 
 static PRLogModuleInfo *SMTPLogModule = nullptr;
--- a/mailnews/compose/src/nsSmtpService.cpp
+++ b/mailnews/compose/src/nsSmtpService.cpp
@@ -21,16 +21,17 @@
 #include "nsIMsgIdentity.h"
 #include "nsIPrompt.h"
 #include "nsIWindowWatcher.h"
 #include "nsIUTF8ConverterService.h"
 #include "nsUConvCID.h"
 #include "nsAutoPtr.h"
 #include "nsComposeStrings.h"
 #include "nsIAsyncInputStream.h"
+#include "nsIPrincipal.h"
 
 #define SERVER_DELIMITER ','
 #define APPEND_SERVERS_VERSION_PREF_NAME "append_preconfig_smtpservers.version"
 #define MAIL_ROOT_PREF "mail."
 #define PREF_MAIL_SMTPSERVERS "mail.smtpservers"
 #define PREF_MAIL_SMTPSERVERS_APPEND_SERVERS "mail.smtpservers.appendsmtpservers"
 #define PREF_MAIL_SMTP_DEFAULTSERVER "mail.smtp.defaultserver"
 
--- a/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp
+++ b/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp
@@ -21,16 +21,17 @@
 #include "nsIMimeHeaders.h"
 #include "nsMsgMimeCID.h"
 #include "nsIMsgMailNewsUrl.h"
 #include "nsIMimeMiscStatus.h"
 #include "nsIPrefService.h"
 #include "nsIPrefBranch.h"
 #include "nsIStringEnumerator.h"
 #include "nsIObserverService.h"
+#include "nsIChannel.h"
 
 using namespace mozilla;
 
 // needed to mark attachment flag on the db hdr
 #include "nsIMsgHdr.h"
 
 // needed to strip html out of the body
 #include "nsIContentSerializer.h"
--- a/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mailnews/imap/src/nsImapMailFolder.cpp
@@ -89,16 +89,18 @@
 #include "nsIMsgFilterCustomAction.h"
 #include "nsMsgReadStateTxn.h"
 #include "nsIStringEnumerator.h"
 #include "nsIMsgStatusFeedback.h"
 #include "nsAlgorithm.h"
 #include "nsMsgLineBuffer.h"
 #include <algorithm>
 #include "mozilla/Logging.h"
+#include "nsStringStream.h"
+#include "nsIStreamListener.h"
 
 static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
 static NS_DEFINE_CID(kParseMailMsgStateCID, NS_PARSEMAILMSGSTATE_CID);
 static NS_DEFINE_CID(kCImapHostSessionList, NS_IIMAPHOSTSESSIONLIST_CID);
 
 extern PRLogModuleInfo *gAutoSyncLog;
 extern PRLogModuleInfo* IMAP;
 
--- a/mailnews/imap/src/nsImapProtocol.cpp
+++ b/mailnews/imap/src/nsImapProtocol.cpp
@@ -70,16 +70,17 @@ PRLogModuleInfo *IMAP;
 #include "nsIProxyInfo.h"
 #include "nsISSLSocketControl.h"
 #include "nsProxyRelease.h"
 #include "nsDebug.h"
 #include "nsMsgCompressIStream.h"
 #include "nsMsgCompressOStream.h"
 #include "nsAlgorithm.h"
 #include "mozilla/Logging.h"
+#include "nsIPrincipal.h"
 
 using namespace mozilla;
 
 #define ONE_SECOND ((uint32_t)1000)    // one second
 
 #define OUTPUT_BUFFER_SIZE (4096*2) // mscott - i should be able to remove this if I can use nsMsgLineBuffer???
 
 #define IMAP_ENV_HEADERS "From To Cc Bcc Subject Date Message-ID "
--- a/mailnews/import/applemail/src/nsAppleMailImport.cpp
+++ b/mailnews/import/applemail/src/nsAppleMailImport.cpp
@@ -16,16 +16,17 @@
 #include "nsIMsgPluggableStore.h"
 #include "nsIMutableArray.h"
 #include "nsNetUtil.h"
 #include "nsMsgUtils.h"
 #include "mozilla/Services.h"
 
 #include "nsEmlxHelperUtils.h"
 #include "nsAppleMailImport.h"
+#include "nsIOutputStream.h"
 
 PRLogModuleInfo *APPLEMAILLOGMODULE = nullptr;
 
 // some hard-coded strings
 #define DEFAULT_MAIL_FOLDER "~/Library/Mail/"
 #define POP_MBOX_SUFFIX ".mbox"
 #define IMAP_MBOX_SUFFIX ".imapmbox"
 
--- a/mailnews/import/applemail/src/nsEmlxHelperUtils.mm
+++ b/mailnews/import/applemail/src/nsEmlxHelperUtils.mm
@@ -11,16 +11,17 @@
 #include "nsCOMPtr.h"
 #include "nsObjCExceptions.h"
 #include "nsMsgMessageFlags.h"
 #include "nsMsgLocalFolderHdrs.h"
 #include "msgCore.h"
 #include "nsTArray.h"
 #include "nsAppleMailImport.h"
 #include "prprf.h"
+#include "nsIFile.h"
 
 #import <Cocoa/Cocoa.h>
 
 
 nsresult nsEmlxHelperUtils::ConvertToMozillaStatusFlags(const char *aXMLBufferStart, 
                                                         const char *aXMLBufferEnd, 
                                                         uint32_t *aMozillaStatusFlags)
 {
--- a/mailnews/import/eudora/src/nsEudoraMac.cpp
+++ b/mailnews/import/eudora/src/nsEudoraMac.cpp
@@ -22,16 +22,17 @@
 #include "nsEudoraStringBundle.h"
 #include "nsEudoraImport.h"
 #include "nsIPop3IncomingServer.h"
 #include "nsUnicharUtils.h"
 #include "nsNetUtil.h"
 #include "EudoraDebugLog.h"
 
 #include "nsILocalFileMac.h"
+#include "nsIOutputStream.h"
 
 static NS_DEFINE_IID(kISupportsIID,      NS_ISUPPORTS_IID);
 
 static const char *  kWhitespace = "\b\t\r\n ";
 
 nsEudoraMac::nsEudoraMac()
 {
 }
--- a/mailnews/import/eudora/src/nsEudoraMailbox.cpp
+++ b/mailnews/import/eudora/src/nsEudoraMailbox.cpp
@@ -16,16 +16,18 @@
 #include "nsIMsgFolder.h"
 #include "nsIMsgHdr.h"
 #include "nsIMsgPluggableStore.h"
 #include "nsMsgUtils.h"
 #include "nsCRT.h"
 #include "nsNetUtil.h"
 #include "EudoraDebugLog.h"
 #include "nsISeekableStream.h"
+#include "nsIInputStream.h"
+#include "nsIOutputStream.h"
 
 #define  kCopyBufferSize    8192
 #define  kMailReadBufferSize  16384
 #define DATE_STR_LEN      64      // 64 bytes is plenty to hold the date header.
 
 #define  kWhitespace  " \t\b\r\n"
 
 const char *eudoraFromLine = "From - Mon Jan 1 00:00:00 1965\x0D\x0A";
--- a/mailnews/import/oexpress/nsOE5File.cpp
+++ b/mailnews/import/oexpress/nsOE5File.cpp
@@ -5,16 +5,17 @@
 
 #include "nsOE5File.h"
 #include "OEDebugLog.h"
 #include "nsMsgUtils.h"
 #include "msgCore.h"
 #include "prprf.h"
 #include "nsMsgLocalFolderHdrs.h"
 #include "nsIOutputStream.h"
+#include "nsIInputStream.h"
 #include "nsIMsgPluggableStore.h"
 #include "nsIMsgHdr.h"
 #include "nsNetUtil.h"
 #include "nsISeekableStream.h"
 #include "nsMsgMessageFlags.h"
 #include <windows.h>
 
 #define  kIndexGrowBy    100
--- a/mailnews/import/oexpress/nsOEMailbox.cpp
+++ b/mailnews/import/oexpress/nsOEMailbox.cpp
@@ -6,16 +6,18 @@
 #include "nsOEMailbox.h"
 
 #include "OEDebugLog.h"
 #include "msgCore.h"
 #include "prprf.h"
 #include "nsMsgLocalFolderHdrs.h"
 #include "nsCRT.h"
 #include "nsNetUtil.h"
+#include "nsIInputStream.h"
+#include "nsIOutputStream.h"
 #include "nsIMsgFolder.h"
 #include "nsIMsgHdr.h"
 #include "nsIMsgPluggableStore.h"
 #include "nsISeekableStream.h"
 #include "nsMsgUtils.h"
 
 class CMbxScanner {
 public:
--- a/mailnews/import/outlook/src/MapiMessage.cpp
+++ b/mailnews/import/outlook/src/MapiMessage.cpp
@@ -12,16 +12,17 @@
 #endif
 
 #include "nscore.h"
 #include <time.h>
 #include "nsStringGlue.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsMsgUtils.h"
 #include "nsMimeTypes.h"
+#include "nsIOutputStream.h"
 
 #include "nsMsgCompCID.h"
 #include "nsIMutableArray.h"
 #include "MapiDbgLog.h"
 #include "MapiApi.h"
 
 #include "MapiMimeTypes.h"
 
--- a/mailnews/import/outlook/src/nsOutlookCompose.cpp
+++ b/mailnews/import/outlook/src/nsOutlookCompose.cpp
@@ -11,17 +11,19 @@
 #include "nsUnicharUtils.h"
 #include "nsCOMPtr.h"
 #include "nsIFile.h"
 #include "nsIComponentManager.h"
 #include "nsIServiceManager.h"
 #include "nsIIOService.h"
 #include "nsIURI.h"
 #include "nsMsgI18N.h"
+#include "nsINetUtil.h"
 #include "nsIOutputStream.h"
+#include "nsIInputStream.h"
 #include "nsMsgAttachmentData.h"
 #include "nsMsgBaseCID.h"
 #include "nsMsgCompCID.h"
 #include "nsIArray.h"
 #include "nsIMsgCompose.h"
 #include "nsIMsgCompFields.h"
 #include "nsIMsgAccountManager.h"
 #include "nsIMsgSend.h"
--- a/mailnews/import/outlook/src/nsOutlookMail.cpp
+++ b/mailnews/import/outlook/src/nsOutlookMail.cpp
@@ -18,16 +18,17 @@
 #include "nsIMutableArray.h"
 #include "nsOutlookStringBundle.h"
 #include "nsABBaseCID.h"
 #include "nsIAbCard.h"
 #include "mdb.h"
 #include "OutlookDebugLog.h"
 #include "nsOutlookMail.h"
 #include "nsUnicharUtils.h"
+#include "nsIInputStream.h"
 #include "nsIOutputStream.h"
 #include "nsIMsgPluggableStore.h"
 #include "nsIMsgHdr.h"
 #include "nsIMsgFolder.h"
 #include "nsMsgI18N.h"
 #include "nsNetUtil.h"
 
 static NS_DEFINE_IID(kISupportsIID,      NS_ISUPPORTS_IID);
--- a/mailnews/local/src/nsMailboxProtocol.cpp
+++ b/mailnews/local/src/nsMailboxProtocol.cpp
@@ -3,16 +3,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "msgCore.h"
 
 #include "nsMailboxProtocol.h"
 #include "nscore.h"
 #include "nsIOutputStream.h"
+#include "nsIInputStreamPump.h"
 #include "nsIMsgDatabase.h"
 #include "nsIMsgHdr.h"
 #include "nsMsgLineBuffer.h"
 #include "nsMsgDBCID.h"
 #include "nsIMsgMailNewsUrl.h"
 #include "nsICopyMsgStreamListener.h"
 #include "nsMsgMessageFlags.h"
 #include "prtime.h"
--- a/mailnews/local/src/nsMailboxProtocol.h
+++ b/mailnews/local/src/nsMailboxProtocol.h
@@ -6,16 +6,17 @@
 #ifndef nsMailboxProtocol_h___
 #define nsMailboxProtocol_h___
 
 #include "mozilla/Attributes.h"
 #include "nsMsgProtocol.h"
 #include "nsCOMPtr.h"
 #include "nsIFile.h"
 #include "nsIChannel.h"
+#include "nsIInputStreamPump.h"
 #include "nsIOutputStream.h"
 #include "nsIMailboxUrl.h"
 // State Flags (Note, I use the word state in terms of storing
 // state information about the connection (authentication, have we sent
 // commands, etc. I do not intend it to refer to protocol state)
 
 #define MAILBOX_PAUSE_FOR_READ      0x00000001  /* should we pause for the next read */
 #define MAILBOX_MSG_PARSE_FIRST_LINE    0x00000002 /* have we read in the first line of the msg */
--- a/mailnews/local/src/nsMailboxService.cpp
+++ b/mailnews/local/src/nsMailboxService.cpp
@@ -21,16 +21,17 @@
 #include "nsIPop3Service.h"
 #include "nsMsgUtils.h"
 #include "nsNetUtil.h"
 #include "nsIDocShellLoadInfo.h"
 #include "nsIWebNavigation.h"
 #include "prprf.h"
 #include "nsIMsgHdr.h"
 #include "nsIFileURL.h"
+#include "nsRefPtr.h"
 
 nsMailboxService::nsMailboxService()
 {
     mPrintingOperation = false;
 }
 
 nsMailboxService::~nsMailboxService()
 {}
--- a/mailnews/local/src/nsMailboxUrl.h
+++ b/mailnews/local/src/nsMailboxUrl.h
@@ -4,16 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsMailboxUrl_h__
 #define nsMailboxUrl_h__
 
 #include "mozilla/Attributes.h"
 #include "nsIMailboxUrl.h"
 #include "nsMsgMailNewsUrl.h"
+#include "nsIStreamListener.h"
 #include "nsIFile.h"
 #include "nsCOMPtr.h"
 #include "MailNewsTypes.h"
 #include "nsTArray.h"
 
 class nsMailboxUrl : public nsIMailboxUrl, public nsMsgMailNewsUrl, public nsIMsgMessageUrl, public nsIMsgI18NUrl
 {
 public:
--- a/mailnews/local/src/nsMovemailService.cpp
+++ b/mailnews/local/src/nsMovemailService.cpp
@@ -29,16 +29,18 @@
 
 #include "nsILineInputStream.h"
 #include "nsISeekableStream.h"
 #include "nsNetUtil.h"
 #include "nsAutoPtr.h"
 #include "nsIStringBundle.h"
 #include "nsIMsgPluggableStore.h"
 #include "mozilla/Services.h"
+#include "nsIInputStream.h"
+#include "nsIOutputStream.h"
 
 #include "mozilla/Logging.h"
 #if defined(PR_LOGGING)
 //
 // export NSPR_LOG_MODULES=Movemail:5
 //
 static PRLogModuleInfo *gMovemailLog = nullptr;
 #define LOG(args) MOZ_LOG(gMovemailLog, mozilla::LogLevel::Debug, args)
--- a/mailnews/local/src/nsParseMailbox.cpp
+++ b/mailnews/local/src/nsParseMailbox.cpp
@@ -54,16 +54,17 @@
 #include "nsIMsgFilterPlugin.h"
 #include "nsIMutableArray.h"
 #include "nsArrayUtils.h"
 #include "nsIMsgFilterCustomAction.h"
 #include <ctype.h>
 #include "nsIMsgPluggableStore.h"
 #include "mozilla/Services.h"
 #include "nsQueryObject.h"
+#include "nsIOutputStream.h"
 
 static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
 
 /* the following macros actually implement addref, release and query interface for our component. */
 NS_IMPL_ISUPPORTS_INHERITED(nsMsgMailboxParser,
                              nsParseMailMessageState,
                              nsIStreamListener,
                              nsIRequestObserver)
--- a/mailnews/local/src/nsPop3Protocol.cpp
+++ b/mailnews/local/src/nsPop3Protocol.cpp
@@ -16,16 +16,17 @@
  */
 
 #include "nscore.h"
 #include "msgCore.h"    // precompiled header...
 #include "nsNetUtil.h"
 #include "nspr.h"
 #include "plbase64.h"
 #include "nsIMsgMailNewsUrl.h"
+#include "nsISafeOutputStream.h"
 #include "nsPop3Protocol.h"
 #include "MailNewsTypes.h"
 #include "nsStringGlue.h"
 #include "nsIPrompt.h"
 #include "nsIMsgIncomingServer.h"
 #include "nsIMsgPluggableStore.h"
 #include "nsTextFormatter.h"
 #include "nsCOMPtr.h"
@@ -35,16 +36,17 @@
 #include "nsIDocShell.h"
 #include "nsMsgUtils.h"
 #include "nsISocketTransport.h"
 #include "nsISSLSocketControl.h"
 #include "nsILineInputStream.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsMsgMessageFlags.h"
 #include "nsMsgBaseCID.h"
+#include "nsIProxyInfo.h"
 #include "mozilla/Services.h"
 #include "mozilla/Logging.h"
 
 using namespace mozilla;
 
 PRLogModuleInfo *POP3LOGMODULE = nullptr;
 
 
--- a/mailnews/news/src/nsNNTPProtocol.cpp
+++ b/mailnews/news/src/nsNNTPProtocol.cpp
@@ -70,16 +70,19 @@
 #include "nsINntpService.h"
 #include "nntpCore.h"
 #include "nsIStreamConverterService.h"
 #include "nsIStreamListenerTee.h"
 #include "nsISocketTransport.h"
 #include "nsIArray.h"
 #include "nsArrayUtils.h"
 
+#include "nsIInputStreamPump.h"
+#include "nsIProxyInfo.h"
+
 #include <time.h>
 
 #undef GetPort  // XXX Windows!
 #undef SetPort  // XXX Windows!
 #undef PostMessage // avoid to collision with WinUser.h
 
 #define PREF_NEWS_CANCEL_CONFIRM  "news.cancel.confirm"
 #define PREF_NEWS_CANCEL_ALERT_ON_SUCCESS "news.cancel.alert_on_success"
--- a/mailnews/news/src/nsNewsFolder.cpp
+++ b/mailnews/news/src/nsNewsFolder.cpp
@@ -59,16 +59,17 @@
 #include "nsIMutableArray.h"
 #include "nsILoginInfo.h"
 #include "nsILoginManager.h"
 #include "nsIPromptService.h"
 #include "nsEmbedCID.h"
 #include "nsIDOMWindow.h"
 #include "mozilla/Services.h"
 #include "nsAutoPtr.h"
+#include "nsIInputStream.h"
 
 static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
 
 // ###tw  This really ought to be the most
 // efficient file reading size for the current
 // operating system.
 #define NEWSRC_FILE_BUFFER_SIZE 1024
 
--- a/mailnews/news/src/nsNntpMockChannel.cpp
+++ b/mailnews/news/src/nsNntpMockChannel.cpp
@@ -4,16 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsNntpMockChannel.h"
 
 #include "msgCore.h"
 #include "nsILoadInfo.h"
 #include "nsNNTPProtocol.h"
 #include "nsNetUtil.h"
+#include "nsIInputStream.h"
 
 NS_IMPL_ISUPPORTS(nsNntpMockChannel, nsIChannel, nsIRequest)
 
 nsNntpMockChannel::nsNntpMockChannel(nsIURI *aUri, nsIMsgWindow *aMsgWindow)
 : m_url(aUri),
   m_msgWindow(aMsgWindow),
   m_channelState(CHANNEL_UNOPENED),
   m_protocol(nullptr),
--- a/mailnews/news/src/nsNntpService.cpp
+++ b/mailnews/news/src/nsNntpService.cpp
@@ -44,16 +44,18 @@
 #include "nsMsgUtils.h"
 #include "nsNetUtil.h"
 #include "nsIWindowWatcher.h"
 #include "nsICommandLine.h"
 #include "nsIMsgMailNewsUrl.h"
 #include "nsIMsgMailSession.h"
 #include "nsISupportsPrimitives.h"
 #include "nsArrayUtils.h"
+#include "nsIStreamListener.h"
+#include "nsIInputStream.h"
 
 #undef GetPort  // XXX Windows!
 #undef SetPort  // XXX Windows!
 
 #define PREF_MAIL_ROOT_NNTP   "mail.root.nntp"        // old - for backward compatibility only
 #define PREF_MAIL_ROOT_NNTP_REL   "mail.root.nntp-rel"
 
 nsNntpService::nsNntpService()