Add pop3 url to the list of components this factory can generate.

This commit is contained in:
mscott%netscape.com 1999-03-31 19:25:17 +00:00
Родитель 78383c59cf
Коммит e67e9de329
1 изменённых файлов: 13 добавлений и 0 удалений

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

@ -25,6 +25,7 @@
// include files for components this factory creates...
#include "nsMailboxUrl.h"
#include "nsPop3URL.h"
#include "nsMSGFolderDataSource.h"
#include "nsMailboxService.h"
#include "nsLocalMailFolder.h"
@ -40,6 +41,7 @@ static NS_DEFINE_CID(kMailNewsDatasourceCID, NS_MAILNEWSDATASOURCE_CID);
static NS_DEFINE_CID(kMailNewsResourceCID, NS_MAILNEWSRESOURCE_CID);
static NS_DEFINE_CID(kMailNewsMessageResourceCID, NS_MAILNEWSMESSAGERESOURCE_CID);
static NS_DEFINE_CID(kPop3ServiceCID, NS_POP3SERVICE_CID);
static NS_DEFINE_CID(kCPop3Url, NS_POP3URL_CID);
////////////////////////////////////////////////////////////
//
@ -123,6 +125,10 @@ nsresult nsMsgLocalFactory::CreateInstance(nsISupports *aOuter, const nsIID &aII
{
inst = NS_STATIC_CAST(nsIMailboxUrl*, new nsMailboxUrl(nsnull, nsnull));
}
else if (mClassID.Equals(kCPop3Url))
{
inst = NS_STATIC_CAST(nsIPop3URL*, new nsPop3URL(nsnull, nsnull));
}
else if (mClassID.Equals(kCMailboxParser))
{
inst = new nsMsgMailboxParser();
@ -219,6 +225,10 @@ NSRegisterSelf(nsISupports* aServMgr, const char* path)
path, PR_TRUE, PR_TRUE);
if (NS_FAILED(rv)) goto done;
rv = compMgr->RegisterComponent(kCPop3Url, nsnull, nsnull,
path, PR_TRUE, PR_TRUE);
if (NS_FAILED(rv)) goto done;
rv = compMgr->RegisterComponent(kPop3ServiceCID, nsnull, nsnull,
path, PR_TRUE, PR_TRUE);
if (NS_FAILED(rv)) goto done;
@ -267,6 +277,9 @@ NSUnregisterSelf(nsISupports* aServMgr, const char* path)
rv = compMgr->UnregisterFactory(kCMailboxService, path);
if (NS_FAILED(rv)) goto done;
rv = compMgr->UnregisterFactory(kCPop3Url, path);
if (NS_FAILED(rv)) goto done;
rv = compMgr->UnregisterFactory(kPop3ServiceCID, path);
if (NS_FAILED(rv)) goto done;