This commit is contained in:
alecf%netscape.com 1999-09-14 08:23:20 +00:00
Родитель 7073f4c9e8
Коммит 9917da1051
2 изменённых файлов: 23 добавлений и 3 удалений

Просмотреть файл

@ -67,8 +67,8 @@
#define NS_SMTPSERVER_CID \
{ /* 60dc861a-56ce-11d3-9118-00a0c900d445 */ \
0x60dc861a,0x56ce,0x11d3,0x91,0x18, \
{ 0x0, 0xa0, 0xc9, 0x0, 0xd4, 0x45 }}; \
0x60dc861a,0x56ce,0x11d3, \
{0x91,0x18, 0x0, 0xa0, 0xc9, 0x0, 0xd4, 0x45 }}; \
#define NS_SMTPSERVICE_CID \
{ /* 5B6419F1-CA9B-11d2-8063-006008128C4E */ \

Просмотреть файл

@ -38,6 +38,7 @@
#include "nsMsgQuote.h"
#include "nsIMsgDraft.h"
#include "nsMsgCreate.h" // For drafts...I know, awful file name...
#include "nsSmtpServer.h"
static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID);
static NS_DEFINE_CID(kCMsgComposeCID, NS_MSGCOMPOSE_CID);
@ -45,12 +46,12 @@ static NS_DEFINE_CID(kCMsgCompFieldsCID, NS_MSGCOMPFIELDS_CID);
static NS_DEFINE_CID(kCMsgSendCID, NS_MSGSEND_CID);
static NS_DEFINE_CID(kCMsgSendLaterCID, NS_MSGSENDLATER_CID);
static NS_DEFINE_CID(kCSmtpServiceCID, NS_SMTPSERVICE_CID);
static NS_DEFINE_CID(kSmtpServerCID, NS_SMTPSERVER_CID);
static NS_DEFINE_CID(kCMsgComposeServiceCID, NS_MSGCOMPOSESERVICE_CID);
static NS_DEFINE_CID(kCMsgQuoteCID, NS_MSGQUOTE_CID);
static NS_DEFINE_CID(kCSmtpUrlCID, NS_SMTPURL_CID);
static NS_DEFINE_CID(kMsgDraftCID, NS_MSGDRAFT_CID);
////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////
@ -135,6 +136,16 @@ nsresult nsMsgComposeFactory::CreateInstance(nsISupports *aOuter, const nsIID &a
return NS_ERROR_OUT_OF_MEMORY;
}
if (mClassID.Equals(kSmtpServerCID))
{
nsSmtpServer * smtpServer = new nsSmtpServer();
// okay now turn around and give inst a handle on it....
if (smtpServer)
return smtpServer->QueryInterface(aIID, aResult);
else
return NS_ERROR_OUT_OF_MEMORY;
}
// do they want a Message Compose interface ?
else if (mClassID.Equals(kCMsgComposeCID))
{
@ -238,6 +249,12 @@ extern "C" NS_EXPORT nsresult NSRegisterSelf(nsISupports* aServMgr, const char*
"SMTP Service", nsnull,
path, PR_TRUE, PR_TRUE);
if (NS_FAILED(rv)) finalResult = rv;
rv = compMgr->RegisterComponent(kSmtpServerCID,
"SMTP Server",
NS_SMTPSERVER_PROGID,
path, PR_TRUE, PR_TRUE);
if (NS_FAILED(rv)) finalResult = rv;
rv = compMgr->RegisterComponent(kCSmtpUrlCID,
"Smtp url",
@ -332,6 +349,9 @@ NSUnregisterSelf(nsISupports* aServMgr, const char* path)
rv = compMgr->UnregisterComponent(kCSmtpServiceCID, path);
if (NS_FAILED(rv)) finalResult = rv;
rv = compMgr->UnregisterComponent(kSmtpServerCID, path);
if (NS_FAILED(rv)) finalResult = rv;
rv = compMgr->UnregisterComponent(kCSmtpUrlCID, path);
if (NS_FAILED(rv)) finalResult = rv;