From 8b0fa76b23412158dd00d201cfbf3c0b3d6c7377 Mon Sep 17 00:00:00 2001 From: "sspitzer%netscape.com" Date: Tue, 4 May 1999 02:42:21 +0000 Subject: [PATCH] nsMsgPost is extinct --- mailnews/compose/src/Makefile.in | 1 - mailnews/compose/src/makefile.win | 2 -- mailnews/compose/src/nsComposeAppCore.cpp | 16 ---------------- mailnews/compose/src/nsMsgPost.cpp | 0 mailnews/compose/src/nsMsgPost.h | 0 mailnews/compose/src/nsSmtpService.cpp | 3 +++ 6 files changed, 3 insertions(+), 19 deletions(-) delete mode 100644 mailnews/compose/src/nsMsgPost.cpp delete mode 100644 mailnews/compose/src/nsMsgPost.h diff --git a/mailnews/compose/src/Makefile.in b/mailnews/compose/src/Makefile.in index c7f0cd734ee..cc1dd47029a 100644 --- a/mailnews/compose/src/Makefile.in +++ b/mailnews/compose/src/Makefile.in @@ -41,7 +41,6 @@ CPPSRCS = \ nsSmtpProtocol.cpp \ nsMsgSend.cpp \ nsMsgSendPart.cpp \ - nsMsgPost.cpp \ nsSmtpService.cpp \ nsJSComposeAppCore.cpp \ nsComposeAppCore.cpp \ diff --git a/mailnews/compose/src/makefile.win b/mailnews/compose/src/makefile.win index e7ad21eb8fd..3a1a2aa5c0f 100644 --- a/mailnews/compose/src/makefile.win +++ b/mailnews/compose/src/makefile.win @@ -32,7 +32,6 @@ CPPSRCS= nsMsgCompFields.cpp \ nsSmtpProtocol.cpp \ MsgCompGlue.cpp \ nsMsgSend.cpp \ - nsMsgPost.cpp \ nsMsgSendPart.cpp \ nsSmtpService.cpp \ nsJSComposeAppCore.cpp \ @@ -55,7 +54,6 @@ CPP_OBJS= .\$(OBJDIR)\nsMsgCompFields.obj \ .\$(OBJDIR)\nsComposer.obj \ .\$(OBJDIR)\nsComposerNameSet.obj \ .\$(OBJDIR)\nsMsgCompPrefs.obj \ - .\$(OBJDIR)\nsMsgPost.obj \ $(NULL) diff --git a/mailnews/compose/src/nsComposeAppCore.cpp b/mailnews/compose/src/nsComposeAppCore.cpp index 4db555ff8af..04b081e624d 100644 --- a/mailnews/compose/src/nsComposeAppCore.cpp +++ b/mailnews/compose/src/nsComposeAppCore.cpp @@ -54,7 +54,6 @@ #include "nsIMsgCompose.h" #include "nsIMsgCompFields.h" #include "nsIMsgSend.h" -#include "nsIMsgPost.h" // jefft #include "nsIXULWindowCallbacks.h" @@ -78,8 +77,6 @@ static NS_DEFINE_CID(kMsgCompFieldsCID, NS_MSGCOMPFIELDS_CID); static NS_DEFINE_IID(kIMsgSendIID, NS_IMSGSEND_IID); static NS_DEFINE_CID(kMsgSendCID, NS_MSGSEND_CID); -static NS_DEFINE_IID(kIMsgPostIID, NS_IMSGPOST_IID); -static NS_DEFINE_CID(kMsgPostCID, NS_MSGPOST_CID); static NS_DEFINE_CID(kAppShellServiceCID, NS_APPSHELL_SERVICE_CID); static NS_DEFINE_IID(kIRDFResourceIID, NS_IRDFRESOURCE_IID); @@ -162,7 +159,6 @@ protected: nsIMsgCompFields *mMsgCompFields; nsIMsgSend *mMsgSend; - nsIMsgPost *mMsgPost; nsAutoString mArgs; @@ -238,7 +234,6 @@ nsComposeAppCore::nsComposeAppCore() mEditor = nsnull; mMsgCompFields = nsnull; mMsgSend = nsnull; - mMsgPost = nsnull; } nsComposeAppCore::~nsComposeAppCore() @@ -262,7 +257,6 @@ nsComposeAppCore::~nsComposeAppCore() NS_IF_RELEASE(mWindow); NS_IF_RELEASE(mEditor); NS_IF_RELEASE(mMsgSend); - NS_IF_RELEASE(mMsgPost); NS_IF_RELEASE(mMsgCompFields); } @@ -593,15 +587,6 @@ nsComposeAppCore::Init(const nsString& aId) if (NS_FAILED(res)) return NS_ERROR_FAILURE; printf("We succesfully obtained a nsIMsgSend interface....\n"); } - if (!mMsgPost) - { - res = nsComponentManager::CreateInstance(kMsgPostCID, - NULL, - kIMsgPostIID, - (void **) &mMsgPost); - if (NS_FAILED(res)) return NS_ERROR_FAILURE; - printf("We succesfully obtained a nsIMsgPost interface....\n"); - } if (!mMsgCompFields) { res = nsComponentManager::CreateInstance(kMsgCompFieldsCID, @@ -902,7 +887,6 @@ NS_IMETHODIMP nsComposeAppCore::SendMessage(nsAutoString& aAddrTo, if (mMsgSend) mMsgSend->SendMessage(mMsgCompFields, NULL); } - if (nsnull != mScriptContext) { const char* url = ""; PRBool isUndefined = PR_FALSE; diff --git a/mailnews/compose/src/nsMsgPost.cpp b/mailnews/compose/src/nsMsgPost.cpp deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/mailnews/compose/src/nsMsgPost.h b/mailnews/compose/src/nsMsgPost.h deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/mailnews/compose/src/nsSmtpService.cpp b/mailnews/compose/src/nsSmtpService.cpp index ccbc7e86587..eb7462902da 100644 --- a/mailnews/compose/src/nsSmtpService.cpp +++ b/mailnews/compose/src/nsSmtpService.cpp @@ -73,6 +73,9 @@ nsresult nsSmtpService::SendMailMessage(const nsFilePath& aFilePath, const nsStr identity->GetSmtpHostname(&hostName); identity->GetSmtpUsername(&senderName); + + // todo: are we leaking hostName and senderName + rv = NS_MsgBuildMailtoUrl(aFilePath, hostName, senderName, aRecipients, aUrlListener, &urlToRun); // this ref counts urlToRun if (NS_SUCCEEDED(rv) && urlToRun) {