Bug 1447498 - remove some unneeded includes in mailnews/local - part 2. r=jorgk
authoraceman <acelists@atlas.sk>
Thu, 22 Mar 2018 23:35:00 +0100
changeset 29381 ecb5839542ce02325c8422e4d2560ff1f23a6485
parent 29380 82c2f54ceefd9e53fc84d6f02eccd7db3d0f5692
child 29382 08bab4937197974ee06ea7e78fbaae1bfea71623
push idunknown
push userunknown
push dateunknown
reviewersjorgk
bugs1447498
Bug 1447498 - remove some unneeded includes in mailnews/local - part 2. r=jorgk
mailnews/local/public/nsMsgLocalCID.h
mailnews/local/src/nsLocalMailFolder.cpp
mailnews/local/src/nsLocalMailFolder.h
mailnews/local/src/nsLocalUndoTxn.h
mailnews/local/src/nsLocalUtils.cpp
mailnews/local/src/nsLocalUtils.h
mailnews/local/src/nsMailboxProtocol.cpp
mailnews/local/src/nsMailboxProtocol.h
mailnews/local/src/nsMailboxService.cpp
mailnews/local/src/nsMailboxService.h
mailnews/local/src/nsMovemailIncomingServer.cpp
mailnews/local/src/nsMovemailService.cpp
mailnews/local/src/nsMsgBrkMBoxStore.cpp
mailnews/local/src/nsMsgBrkMBoxStore.h
mailnews/local/src/nsMsgLocalStoreUtils.h
--- a/mailnews/local/public/nsMsgLocalCID.h
+++ b/mailnews/local/public/nsMsgLocalCID.h
@@ -1,19 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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/. */
 
 #ifndef nsMsgLocalCID_h__
 #define nsMsgLocalCID_h__
 
-#include "nsISupports.h"
-#include "nsIFactory.h"
-#include "nsIComponentManager.h"
 #include "nsMsgBaseCID.h"
 
 #define NS_POP3INCOMINGSERVER_TYPE "pop3"
 
 //
 // nsLocalMailFolderResourceCID
 //
 #define NS_LOCALMAILFOLDERRESOURCE_CONTRACTID \
--- a/mailnews/local/src/nsLocalMailFolder.cpp
+++ b/mailnews/local/src/nsLocalMailFolder.cpp
@@ -11,18 +11,17 @@
 #include "nsArrayEnumerator.h"
 #include "nsLocalMailFolder.h"
 #include "nsMsgLocalFolderHdrs.h"
 #include "nsMsgFolderFlags.h"
 #include "nsMsgMessageFlags.h"
 #include "prprf.h"
 #include "prmem.h"
 #include "nsIArray.h"
-#include "nsIServiceManager.h"
-#include "nsIMailboxService.h"
+#include "nsITransactionManager.h"
 #include "nsParseMailbox.h"
 #include "nsIMsgAccountManager.h"
 #include "nsIMsgWindow.h"
 #include "nsCOMPtr.h"
 #include "nsIRDFService.h"
 #include "nsMsgDBCID.h"
 #include "nsMsgUtils.h"
 #include "nsLocalUtils.h"
@@ -38,37 +37,30 @@
 #include "nsICopyMsgStreamListener.h"
 #include "nsIMsgCopyService.h"
 #include "nsMsgTxn.h"
 #include "nsIMessenger.h"
 #include "nsMsgBaseCID.h"
 #include "nsNativeCharsetUtils.h"
 #include "nsIDocShell.h"
 #include "nsIPrompt.h"
-#include "nsIInterfaceRequestor.h"
-#include "nsIInterfaceRequestorUtils.h"
 #include "nsIPop3URL.h"
 #include "nsIMsgMailSession.h"
 #include "nsIMsgFolderCompactor.h"
 #include "nsNetCID.h"
-#include "nsIMsgMailNewsUrl.h"
 #include "nsISpamSettings.h"
-#include "nsINoIncomingServer.h"
 #include "nsNativeCharsetUtils.h"
 #include "nsMailHeaders.h"
 #include "nsCOMArray.h"
-#include "nsILineInputStream.h"
-#include "nsIFileStreams.h"
 #include "nsAutoPtr.h"
 #include "nsIRssIncomingServer.h"
 #include "nsNetUtil.h"
 #include "nsIMsgFolderNotificationService.h"
 #include "nsReadLine.h"
 #include "nsArrayUtils.h"
-#include "nsIMsgTraitService.h"
 #include "nsIStringEnumerator.h"
 #include "mozilla/Services.h"
 #include "nsIURIMutator.h"
 
 //////////////////////////////////////////////////////////////////////////////
 // nsLocal
 /////////////////////////////////////////////////////////////////////////////
 
--- a/mailnews/local/src/nsLocalMailFolder.h
+++ b/mailnews/local/src/nsLocalMailFolder.h
@@ -9,25 +9,30 @@
 
 #ifndef nsMsgLocalMailFolder_h__
 #define nsMsgLocalMailFolder_h__
 
 #include "mozilla/Attributes.h"
 #include "nsMsgDBFolder.h" /* include the interface we are going to support */
 #include "nsAutoPtr.h"
 #include "nsICopyMessageListener.h"
-#include "nsIFileStreams.h"
-#include "nsIPop3IncomingServer.h"  // need this for an interface ID
 #include "nsMsgTxn.h"
 #include "nsIMsgMessageService.h"
-#include "nsIMsgParseMailMsgState.h"
-#include "nsITransactionManager.h"
+#include "nsIMsgPluggableStore.h"
 #include "nsIMsgLocalMailFolder.h"
+#include "nsIMsgFolder.h"
+#include "nsIMsgWindow.h"
+#include "nsIMsgDatabase.h"
+#include "nsIMsgStatusFeedback.h"
+#include "nsIMsgCopyServiceListener.h"
+#include "nsIInputStream.h"
+#include "nsIOutputStream.h"
 #include "nsISeekableStream.h"
 #include "nsIMutableArray.h"
+#include "nsIStringBundle.h"
 #include "nsLocalUndoTxn.h"
 
 #define COPY_BUFFER_SIZE 16384
 
 class nsParseMailMessageState;
 
 struct nsLocalMailCopyState
 {
--- a/mailnews/local/src/nsLocalUndoTxn.h
+++ b/mailnews/local/src/nsLocalUndoTxn.h
@@ -9,19 +9,18 @@
 #include "mozilla/Attributes.h"
 #include "msgCore.h"
 #include "nsIMsgFolder.h"
 #include "nsMailboxService.h"
 #include "nsMsgTxn.h"
 #include "MailNewsTypes.h"
 #include "nsTArray.h"
 #include "nsCOMPtr.h"
-#include "nsIUrlListener.h"
-#include "nsIWeakReference.h"
-#include "nsIWeakReferenceUtils.h"
+#include "nsIFolderListener.h"
+#include "nsWeakPtr.h"
 
 class nsLocalUndoFolderListener;
 
 class nsLocalMoveCopyMsgTxn : public nsIFolderListener, public nsMsgTxn
 {
 public:
     nsLocalMoveCopyMsgTxn();
     NS_DECL_ISUPPORTS_INHERITED
--- a/mailnews/local/src/nsLocalUtils.cpp
+++ b/mailnews/local/src/nsLocalUtils.cpp
@@ -1,28 +1,23 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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 "msgCore.h"
 #include "nsLocalUtils.h"
-#include "nsIServiceManager.h"
 #include "prsystem.h"
 #include "nsCOMPtr.h"
 #include "prmem.h"
 // stuff for temporary root folder hack
 #include "nsIMsgAccountManager.h"
 #include "nsIMsgIncomingServer.h"
-#include "nsIPop3IncomingServer.h"
-#include "nsINoIncomingServer.h"
 #include "nsMsgBaseCID.h"
 #include "nsNativeCharsetUtils.h"
-#include "nsComponentManagerUtils.h"
-#include "nsServiceManagerUtils.h"
 
 #include "nsMsgUtils.h"
 #include "nsNetCID.h"
 #include "nsIURIMutator.h"
 
 // it would be really cool to:
 // - cache the last hostname->path match
 // - if no such server exists, behave like an old-style mailbox URL
--- a/mailnews/local/src/nsLocalUtils.h
+++ b/mailnews/local/src/nsLocalUtils.h
@@ -2,17 +2,17 @@
 /* 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/. */
 
 #ifndef NS_LOCALUTILS_H
 #define NS_LOCALUTILS_H
 
 #include "nsString.h"
-#include "nsIMsgIncomingServer.h"
+#include "MailNewsTypes2.h"
 
 static const char kMailboxRootURI[] = "mailbox:/";
 static const char kMailboxMessageRootURI[] = "mailbox-message:/";
 
 nsresult
 nsLocalURI2Path(const char* rootURI, const char* uriStr, nsCString& pathResult);
 
 nsresult
--- a/mailnews/local/src/nsMailboxProtocol.cpp
+++ b/mailnews/local/src/nsMailboxProtocol.cpp
@@ -2,45 +2,38 @@
 /* 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 "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 "nsIMsgFolder.h"
 #include "nsICopyMsgStreamListener.h"
 #include "nsMsgMessageFlags.h"
 #include "prtime.h"
 #include "mozilla/Logging.h"
 #include "mozilla/SlicedInputStream.h"
 #include "prerror.h"
 #include "prprf.h"
 #include "nspr.h"
-#include "nsIFileStreams.h"
 #include "nsIStreamTransportService.h"
 #include "nsIStreamConverterService.h"
-#include "nsIIOService.h"
 #include "nsNetUtil.h"
 #include "nsMsgUtils.h"
 #include "nsIMsgWindow.h"
-#include "nsIMimeHeaders.h"
-#include "nsIMsgPluggableStore.h"
 #include "nsISeekableStream.h"
 #include "nsStreamUtils.h"
 
-#include "nsIMsgMdnGenerator.h"
-
 using namespace mozilla;
 
 static LazyLogModule MAILBOX("Mailbox");
 
 /* the output_buffer_size must be larger than the largest possible line
  * 2000 seems good for news
  *
  * jwz: I increased this to 4k since it must be big enough to hold the
--- a/mailnews/local/src/nsMailboxProtocol.h
+++ b/mailnews/local/src/nsMailboxProtocol.h
@@ -5,17 +5,16 @@
 
 #ifndef nsMailboxProtocol_h___
 #define nsMailboxProtocol_h___
 
 #include "mozilla/Attributes.h"
 #include "nsMsgProtocol.h"
 #include "nsCOMPtr.h"
 #include "nsIFile.h"
-#include "nsIChannel.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
@@ -13,26 +13,26 @@
 #include "nsIMsgDatabase.h"
 #include "nsMsgDBCID.h"
 #include "MailNewsTypes.h"
 #include "nsTArray.h"
 #include "nsLocalUtils.h"
 #include "nsMsgLocalCID.h"
 #include "nsMsgBaseCID.h"
 #include "nsIDocShell.h"
-#include "nsIPop3Service.h"
 #include "nsMsgUtils.h"
 #include "nsNativeCharsetUtils.h"
 #include "nsNetUtil.h"
 #include "nsIDocShellLoadInfo.h"
 #include "nsIWebNavigation.h"
 #include "prprf.h"
 #include "nsIMsgHdr.h"
 #include "nsIFileURL.h"
 #include "mozilla/RefPtr.h"
+#include "nsIRDFService.h"
 
 nsMailboxService::nsMailboxService()
 {
     mPrintingOperation = false;
 }
 
 nsMailboxService::~nsMailboxService()
 {}
--- a/mailnews/local/src/nsMailboxService.h
+++ b/mailnews/local/src/nsMailboxService.h
@@ -5,24 +5,23 @@
 
 #ifndef nsMailboxService_h___
 #define nsMailboxService_h___
 
 #include "nscore.h"
 #include "nsISupports.h"
 
 #include "nsIMailboxService.h"
+#include "nsIMsgFolder.h"
 #include "nsIMsgMessageService.h"
+#include "nsIMsgWindow.h"
 #include "nsIMailboxUrl.h"
-#include "nsIURL.h"
+#include "nsIURI.h"
 #include "nsIUrlListener.h"
-#include "nsIStreamListener.h"
-#include "nsIFile.h"
 #include "nsIProtocolHandler.h"
-#include "nsIRDFService.h"
 
 class nsMailboxService : public nsIMailboxService, public nsIMsgMessageService, public nsIMsgMessageFetchPartService, public nsIProtocolHandler
 {
 public:
 
   nsMailboxService();
 
   NS_DECL_ISUPPORTS
--- a/mailnews/local/src/nsMovemailIncomingServer.cpp
+++ b/mailnews/local/src/nsMovemailIncomingServer.cpp
@@ -2,17 +2,16 @@
 /* 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 "nsMsgLocalCID.h"
 #include "nsMsgFolderFlags.h"
 #include "nsIMsgLocalMailFolder.h"
 #include "nsIMovemailService.h"
-#include "nsIFile.h"
 #include "msgCore.h" // pre-compiled headers
 #include "nsMovemailIncomingServer.h"
 #include "nsServiceManagerUtils.h"
 
 
 static NS_DEFINE_CID(kCMovemailServiceCID, NS_MOVEMAILSERVICE_CID);
 
 
--- a/mailnews/local/src/nsMovemailService.cpp
+++ b/mailnews/local/src/nsMovemailService.cpp
@@ -23,17 +23,16 @@
 #include "nsIFile.h"
 #include "nsMailDirServiceDefs.h"
 #include "nsMsgUtils.h"
 
 #include "nsCOMPtr.h"
 #include "nsMsgFolderFlags.h"
 
 #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"
 
--- a/mailnews/local/src/nsMsgBrkMBoxStore.cpp
+++ b/mailnews/local/src/nsMsgBrkMBoxStore.cpp
@@ -7,17 +7,16 @@
    Class for handling Berkeley Mailbox stores.
 */
 
 #include "prlog.h"
 #include "msgCore.h"
 #include "nsMsgBrkMBoxStore.h"
 #include "nsIMsgFolder.h"
 #include "nsMsgFolderFlags.h"
-#include "nsILocalMailIncomingServer.h"
 #include "nsIMsgLocalMailFolder.h"
 #include "nsCOMArray.h"
 #include "nsIFile.h"
 #include "nsIMsgHdr.h"
 #include "nsNetUtil.h"
 #include "nsIMsgDatabase.h"
 #include "nsNativeCharsetUtils.h"
 #include "nsMsgUtils.h"
--- a/mailnews/local/src/nsMsgBrkMBoxStore.h
+++ b/mailnews/local/src/nsMsgBrkMBoxStore.h
@@ -6,16 +6,17 @@
 /**
    Class for handling Berkeley Mailbox stores.
 */
 
 #ifndef nsMsgBrkMboxStore_h__
 #define nsMsgBrkMboxStore_h__
 
 #include "nsMsgLocalStoreUtils.h"
+#include "nsIMsgPluggableStore.h"
 #include "nsIFile.h"
 #include "nsInterfaceHashtable.h"
 #include "nsISeekableStream.h"
 
 class nsMsgBrkMBoxStore final : public nsMsgLocalStoreUtils, nsIMsgPluggableStore
 {
 public:
   NS_DECL_ISUPPORTS
--- a/mailnews/local/src/nsMsgLocalStoreUtils.h
+++ b/mailnews/local/src/nsMsgLocalStoreUtils.h
@@ -1,17 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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/. */
 #ifndef nsMsgLocalStoreUtils_h__
 #define nsMsgLocalStoreUtils_h__
 
 #include "msgCore.h"
-#include "nsIMsgPluggableStore.h"
 #include "nsString.h"
 #include "nsReadLine.h"
 #include "nsISeekableStream.h"
 #include "nsIMsgHdr.h"
 #include "nsMsgLocalFolderHdrs.h"
 #include "nsMailHeaders.h"
 #include "nsMsgUtils.h"
 #include "nsIOutputStream.h"