From 3d953cbb839cfa73ca47073af628271adb901928 Mon Sep 17 00:00:00 2001 From: "rhp%netscape.com" Date: Thu, 11 Feb 1999 18:29:24 +0000 Subject: [PATCH] Added NET_RegisterContentTypeConverter into the factory autoregistration code so we don't have to hack viewer, etc... anymore to do this. git-svn-id: svn://10.0.0.236/trunk@20429 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mailnews/mime/src/nsMimeFactory.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mozilla/mailnews/mime/src/nsMimeFactory.cpp b/mozilla/mailnews/mime/src/nsMimeFactory.cpp index fe705432ce1..92a93bed214 100644 --- a/mozilla/mailnews/mime/src/nsMimeFactory.cpp +++ b/mozilla/mailnews/mime/src/nsMimeFactory.cpp @@ -174,6 +174,14 @@ extern "C" NS_EXPORT PRBool NSCanUnload() return PRBool(g_InstanceCount == 0 && g_LockCount == 0); } +// +// rhp - when the new interface is in place...this GOES AWAY! +// External includes necessary for test application +// +#include "net.h" +extern NET_StreamClass *MIME_MessageConverter(int format_out, void *closure, + URL_Struct *url, MWContext *context); + extern "C" NS_EXPORT nsresult NSRegisterSelf(const char *path) { printf("*** Mime being registered\n"); @@ -181,6 +189,14 @@ extern "C" NS_EXPORT nsresult NSRegisterSelf(const char *path) PR_TRUE, PR_TRUE); nsRepository::RegisterFactory(kCMimeRFC822HTMLConverterCID, path, PR_TRUE, PR_TRUE); + + /* + * For now, do the old netlib call so we don't have to dork around + * with hacking every viewer in the world. + */ + NET_RegisterContentTypeConverter(MESSAGE_RFC822, FO_NGLAYOUT, NULL, MIME_MessageConverter); + NET_RegisterContentTypeConverter(MESSAGE_RFC822, FO_CACHE_AND_NGLAYOUT, NULL, MIME_MessageConverter); + return NS_OK; }