From 0eb045d1370d9e1523c5e3576d9910d98f1074a3 Mon Sep 17 00:00:00 2001 From: "putterman%netscape.com" Date: Mon, 14 Jun 1999 22:19:22 +0000 Subject: [PATCH] nsCopymessageStreamListener can be created through the factory. --- mailnews/base/build/nsMsgBaseCID.h | 4 ++++ mailnews/base/build/nsMsgFactory.cpp | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/mailnews/base/build/nsMsgBaseCID.h b/mailnews/base/build/nsMsgBaseCID.h index 8f807a41525..10230e8df5b 100644 --- a/mailnews/base/build/nsMsgBaseCID.h +++ b/mailnews/base/build/nsMsgBaseCID.h @@ -94,4 +94,8 @@ { 0x7c601f60, 0x1ef3, 0x11d3, \ { 0x95, 0x74, 0x0, 0x60, 0x97, 0x22, 0x2b, 0x83 } } +#define NS_COPYMESSAGESTREAMLISTENER_CID \ +{ 0x7741daed, 0x2125, 0x11d3, \ + { 0x8a, 0x90, 0x0, 0x60, 0xb0, 0xfc, 0x4, 0xd2 } } + #endif // nsMessageBaseCID_h__ diff --git a/mailnews/base/build/nsMsgFactory.cpp b/mailnews/base/build/nsMsgFactory.cpp index 0fef51ec137..8cf9f9d45f6 100644 --- a/mailnews/base/build/nsMsgFactory.cpp +++ b/mailnews/base/build/nsMsgFactory.cpp @@ -52,6 +52,8 @@ #include "nsMsgBiffManager.h" #include "nsMsgNotificationManager.h" +#include "nsCopyMessageStreamListener.h" + #ifdef DEBUG_bienvenu #include "nsMsgFilterService.h" #endif @@ -91,6 +93,9 @@ static NS_DEFINE_CID(kMsgFilterServiceCID, NS_MSGFILTERSERVICE_CID); static NS_DEFINE_CID(kMsgBiffManagerCID, NS_MSGBIFFMANAGER_CID); static NS_DEFINE_CID(kMsgNotificationManagerCID, NS_MSGNOTIFICATIONMANAGER_CID); +// Copy +static NS_DEFINE_CID(kCopyMessageStreamListenerCID, NS_COPYMESSAGESTREAMLISTENER_CID); + //////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////// @@ -295,6 +300,9 @@ nsMsgFactory::CreateInstance(nsISupports * /* aOuter */, else if (mClassID.Equals(kMsgNotificationManagerCID)){ rv = NS_NewMsgNotificationManager(aIID, aResult); } + else if (mClassID.Equals(kCopyMessageStreamListenerCID)){ + rv = NS_NewCopyMessageStreamListener(aIID, aResult); + } return rv; } @@ -464,6 +472,12 @@ NSRegisterSelf(nsISupports* aServMgr, const char* path) path, PR_TRUE, PR_TRUE); if (NS_FAILED(rv)) finalResult = rv; + rv = compMgr->RegisterComponent(kCopyMessageStreamListenerCID, + "Mail/News CopyMessage Stream Listener", + "component://netscape/messenger/copymessagestreamlistener", + path, PR_TRUE, PR_TRUE); + if (NS_FAILED(rv)) finalResult = rv; + #ifdef NS_DEBUG printf("mailnews registering from %s\n",path); #endif @@ -517,6 +531,9 @@ NSUnregisterSelf(nsISupports* aServMgr, const char* path) if (NS_FAILED(rv)) finalResult = rv; rv = compMgr->UnregisterComponent(kMsgNotificationManagerCID, path); if (NS_FAILED(rv)) finalResult = rv; + + rv = compMgr->UnregisterComponent(kCopyMessageStreamListenerCID, path); + if (NS_FAILED(rv)) finalResult = rv; return finalResult; }