--- a/accessible/build/nsAccessibilityFactory.cpp
+++ b/accessible/build/nsAccessibilityFactory.cpp
@@ -31,52 +31,56 @@
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsCOMPtr.h"
-#include "nsIModule.h"
-#include "nsIGenericFactory.h"
+#include "mozilla/ModuleUtils.h"
#include "nsIServiceManager.h"
#include "nsIComponentManager.h"
#include "nsIAccessibilityService.h"
#include "nsIAccessibleRetrieval.h"
#include "nscore.h"
-static NS_IMETHODIMP
+static nsresult
NS_ConstructAccessibilityService(nsISupports *aOuter, REFNSIID aIID, void **aResult)
{
nsresult rv;
NS_ASSERTION(aOuter == nsnull, "no aggregation");
nsIAccessibilityService* accessibility;
rv = NS_GetAccessibilityService(&accessibility);
if (NS_FAILED(rv)) {
NS_ERROR("Unable to construct accessibility service");
return rv;
}
rv = accessibility->QueryInterface(aIID, aResult);
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to find correct interface");
NS_RELEASE(accessibility);
return rv;
}
-// The list of components we register
-static const nsModuleComponentInfo components[] =
-{
- { "AccessibilityService",
- NS_ACCESSIBILITY_SERVICE_CID,
- "@mozilla.org/accessibilityService;1",
- NS_ConstructAccessibilityService
- },
- { "AccessibleRetrieval",
- NS_ACCESSIBLE_RETRIEVAL_CID,
- "@mozilla.org/accessibleRetrieval;1",
- NS_ConstructAccessibilityService
- },
+NS_DEFINE_NAMED_CID(NS_ACCESSIBILITY_SERVICE_CID);
+NS_DEFINE_NAMED_CID(NS_ACCESSIBLE_RETRIEVAL_CID);
+
+static const mozilla::Module::CIDEntry kA11yCIDs[] = {
+ { &kNS_ACCESSIBILITY_SERVICE_CID, false, NULL, NS_ConstructAccessibilityService },
+ { NULL }
};
-NS_IMPL_NSGETMODULE(nsAccessibilityModule, components)
+static const mozilla::Module::ContractIDEntry kA11yContracts[] = {
+ { "@mozilla.org/accessibilityService;1", &kNS_ACCESSIBILITY_SERVICE_CID },
+ { "@mozilla.org/accessibleRetrieval;1", &kNS_ACCESSIBILITY_SERVICE_CID },
+ { NULL }
+};
+
+static const mozilla::Module kA11yModule = {
+ mozilla::Module::kVersion,
+ kA11yCIDs,
+ kA11yContracts
+};
+
+NSMODULE_DEFN(nsAccessibilityModule) = &kA11yModule;
--- a/browser/components/about/AboutRedirector.cpp
+++ b/browser/components/about/AboutRedirector.cpp
@@ -172,17 +172,17 @@ AboutRedirector::GetURIFlags(nsIURI *aUR
*result = kRedirMap[i].flags;
return NS_OK;
}
}
return NS_ERROR_ILLEGAL_VALUE;
}
-NS_METHOD
+nsresult
AboutRedirector::Create(nsISupports *aOuter, REFNSIID aIID, void **result)
{
AboutRedirector* about = new AboutRedirector();
if (about == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(about);
nsresult rv = about->QueryInterface(aIID, result);
NS_RELEASE(about);
--- a/browser/components/about/AboutRedirector.h
+++ b/browser/components/about/AboutRedirector.h
@@ -49,17 +49,17 @@ class AboutRedirector : public nsIAboutM
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIABOUTMODULE
AboutRedirector() {}
virtual ~AboutRedirector() {}
- static NS_METHOD
+ static nsresult
Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
protected:
};
} // namespace browser
} // namespace mozilla
--- a/browser/components/build/nsModule.cpp
+++ b/browser/components/build/nsModule.cpp
@@ -31,17 +31,17 @@
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-#include "nsIGenericFactory.h"
+#include "mozilla/ModuleUtils.h"
#include "nsBrowserCompsCID.h"
#include "DirectoryProvider.h"
#if defined(XP_WIN)
#include "nsWindowsShellService.h"
#elif defined(XP_MACOSX)
#include "nsMacShellService.h"
@@ -115,157 +115,130 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsICabPro
#endif
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFeedSniffer)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrivateBrowsingServiceWrapper, Init)
-/////////////////////////////////////////////////////////////////////////////
-
-static const nsModuleComponentInfo components[] =
-{
- { "Browser Directory Provider",
- NS_BROWSERDIRECTORYPROVIDER_CID,
- NS_BROWSERDIRECTORYPROVIDER_CONTRACTID,
- DirectoryProviderConstructor,
- DirectoryProvider::Register,
- DirectoryProvider::Unregister
- },
-
+NS_DEFINE_NAMED_CID(NS_BROWSERDIRECTORYPROVIDER_CID);
#if defined(XP_WIN)
- { "Browser Shell Service",
- NS_SHELLSERVICE_CID,
- NS_SHELLSERVICE_CONTRACTID,
- nsWindowsShellServiceConstructor},
-
+NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
#elif defined(MOZ_WIDGET_GTK2)
- { "Browser Shell Service",
- NS_SHELLSERVICE_CID,
- NS_SHELLSERVICE_CONTRACTID,
- nsGNOMEShellServiceConstructor },
-
+NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
#endif
-
- { "Feed Sniffer",
- NS_FEEDSNIFFER_CID,
- NS_FEEDSNIFFER_CONTRACTID,
- nsFeedSnifferConstructor,
- nsFeedSniffer::Register },
-
-#ifdef MOZ_SAFE_BROWSING
- { "about:blocked",
- NS_BROWSER_ABOUT_REDIRECTOR_CID,
- NS_ABOUT_MODULE_CONTRACTID_PREFIX "blocked",
- AboutRedirector::Create },
+NS_DEFINE_NAMED_CID(NS_FEEDSNIFFER_CID);
+NS_DEFINE_NAMED_CID(NS_BROWSER_ABOUT_REDIRECTOR_CID);
+#ifndef WINCE
+NS_DEFINE_NAMED_CID(NS_FIREFOX_PROFILEMIGRATOR_CID);
+#if defined(XP_WIN) && !defined(__MINGW32__)
+NS_DEFINE_NAMED_CID(NS_WINIEPROFILEMIGRATOR_CID);
+#elif defined(XP_MACOSX)
+NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
+NS_DEFINE_NAMED_CID(NS_SAFARIPROFILEMIGRATOR_CID);
+NS_DEFINE_NAMED_CID(NS_MACIEPROFILEMIGRATOR_CID);
+NS_DEFINE_NAMED_CID(NS_OMNIWEBPROFILEMIGRATOR_CID);
+NS_DEFINE_NAMED_CID(NS_CAMINOPROFILEMIGRATOR_CID);
+NS_DEFINE_NAMED_CID(NS_ICABPROFILEMIGRATOR_CID);
#endif
-
- { "about:certerror",
- NS_BROWSER_ABOUT_REDIRECTOR_CID,
- NS_ABOUT_MODULE_CONTRACTID_PREFIX "certerror",
- AboutRedirector::Create },
-
- { "about:feeds",
- NS_BROWSER_ABOUT_REDIRECTOR_CID,
- NS_ABOUT_MODULE_CONTRACTID_PREFIX "feeds",
- AboutRedirector::Create },
-
- { "about:privatebrowsing",
- NS_BROWSER_ABOUT_REDIRECTOR_CID,
- NS_ABOUT_MODULE_CONTRACTID_PREFIX "privatebrowsing",
- AboutRedirector::Create },
-
- { "about:rights",
- NS_BROWSER_ABOUT_REDIRECTOR_CID,
- NS_ABOUT_MODULE_CONTRACTID_PREFIX "rights",
- AboutRedirector::Create },
-
- { "about:robots",
- NS_BROWSER_ABOUT_REDIRECTOR_CID,
- NS_ABOUT_MODULE_CONTRACTID_PREFIX "robots",
- AboutRedirector::Create },
-
- { "about:sessionrestore",
- NS_BROWSER_ABOUT_REDIRECTOR_CID,
- NS_ABOUT_MODULE_CONTRACTID_PREFIX "sessionrestore",
- AboutRedirector::Create },
-
-#ifndef WINCE
+#if !defined(XP_OS2)
+NS_DEFINE_NAMED_CID(NS_OPERAPROFILEMIGRATOR_CID);
+#endif
+#if !defined(XP_BEOS)
+NS_DEFINE_NAMED_CID(NS_DOGBERTPROFILEMIGRATOR_CID);
+#endif
+NS_DEFINE_NAMED_CID(NS_PHOENIXPROFILEMIGRATOR_CID);
+NS_DEFINE_NAMED_CID(NS_SEAMONKEYPROFILEMIGRATOR_CID);
+#endif /* WINCE */
+NS_DEFINE_NAMED_CID(NS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID);
- { "Profile Migrator",
- NS_FIREFOX_PROFILEMIGRATOR_CID,
- NS_PROFILEMIGRATOR_CONTRACTID,
- nsProfileMigratorConstructor },
-
+static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
+ { &kNS_BROWSERDIRECTORYPROVIDER_CID, false, NULL, DirectoryProviderConstructor },
+#if defined(XP_WIN)
+ { &kNS_SHELLSERVICE_CID, false, NULL, nsWindowsShellServiceConstructor },
+#elif defined(MOZ_WIDGET_GTK2)
+ { &kNS_SHELLSERVICE_CID, false, NULL, nsGNOMEShellServiceConstructor },
+#endif
+ { &kNS_FEEDSNIFFER_CID, false, NULL, nsFeedSnifferConstructor },
+ { &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, NULL, AboutRedirector::Create },
+#ifndef WINCE
+ { &kNS_FIREFOX_PROFILEMIGRATOR_CID, false, NULL, nsProfileMigratorConstructor },
#if defined(XP_WIN) && !defined(__MINGW32__)
- { "Internet Explorer (Windows) Profile Migrator",
- NS_WINIEPROFILEMIGRATOR_CID,
- NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "ie",
- nsIEProfileMigratorConstructor },
-
+ { &kNS_WINIEPROFILEMIGRATOR_CID, false, NULL, nsIEProfileMigratorConstructor },
#elif defined(XP_MACOSX)
- { "Browser Shell Service",
- NS_SHELLSERVICE_CID,
- NS_SHELLSERVICE_CONTRACTID,
- nsMacShellServiceConstructor },
-
- { "Safari Profile Migrator",
- NS_SAFARIPROFILEMIGRATOR_CID,
- NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "safari",
- nsSafariProfileMigratorConstructor },
-
- { "Internet Explorer (Macintosh) Profile Migrator",
- NS_MACIEPROFILEMIGRATOR_CID,
- NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "macie",
- nsMacIEProfileMigratorConstructor },
-
- { "OmniWeb Profile Migrator",
- NS_OMNIWEBPROFILEMIGRATOR_CID,
- NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "omniweb",
- nsOmniWebProfileMigratorConstructor },
-
- { "Camino Profile Migrator",
- NS_CAMINOPROFILEMIGRATOR_CID,
- NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "camino",
- nsCaminoProfileMigratorConstructor },
-
- { "iCab Profile Migrator",
- NS_ICABPROFILEMIGRATOR_CID,
- NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "icab",
- nsICabProfileMigratorConstructor },
-
+ { &kNS_SHELLSERVICE_CID, false, NULL, nsMacShellServiceConstructor },
+ { &kNS_SAFARIPROFILEMIGRATOR_CID, false, NULL, nsSafariProfileMigratorConstructor },
+ { &kNS_MACIEPROFILEMIGRATOR_CID, false, NULL, nsMacIEProfileMigratorConstructor },
+ { &kNS_OMNIWEBPROFILEMIGRATOR_CID, false, NULL, nsOmniWebProfileMigratorConstructor },
+ { &kNS_CAMINOPROFILEMIGRATOR_CID, false, NULL, nsCaminoProfileMigratorConstructor },
+ { &kNS_ICABPROFILEMIGRATOR_CID, false, NULL, nsICabProfileMigratorConstructor },
#endif
-
#if !defined(XP_OS2)
- { "Opera Profile Migrator",
- NS_OPERAPROFILEMIGRATOR_CID,
- NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "opera",
- nsOperaProfileMigratorConstructor },
+ { &kNS_OPERAPROFILEMIGRATOR_CID, false, NULL, nsOperaProfileMigratorConstructor },
#endif
-
#if !defined(XP_BEOS)
- { "Netscape 4.x Profile Migrator",
- NS_DOGBERTPROFILEMIGRATOR_CID,
- NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "dogbert",
- nsDogbertProfileMigratorConstructor },
+ { &kNS_DOGBERTPROFILEMIGRATOR_CID, false, NULL, nsDogbertProfileMigratorConstructor },
#endif
-
- { "Phoenix Profile Migrator",
- NS_PHOENIXPROFILEMIGRATOR_CID,
- NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "phoenix",
- nsPhoenixProfileMigratorConstructor },
-
- { "Seamonkey Profile Migrator",
- NS_SEAMONKEYPROFILEMIGRATOR_CID,
- NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "seamonkey",
- nsSeamonkeyProfileMigratorConstructor },
-
+ { &kNS_PHOENIXPROFILEMIGRATOR_CID, false, NULL, nsPhoenixProfileMigratorConstructor },
+ { &kNS_SEAMONKEYPROFILEMIGRATOR_CID, false, NULL, nsSeamonkeyProfileMigratorConstructor },
#endif /* WINCE */
-
- { "PrivateBrowsing Service C++ Wrapper",
- NS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID,
- NS_PRIVATE_BROWSING_SERVICE_CONTRACTID,
- nsPrivateBrowsingServiceWrapperConstructor }
+ { &kNS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID, false, NULL, nsPrivateBrowsingServiceWrapperConstructor },
+ { NULL }
};
-NS_IMPL_NSGETMODULE(nsBrowserCompsModule, components)
+static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
+ { NS_BROWSERDIRECTORYPROVIDER_CONTRACTID, &kNS_BROWSERDIRECTORYPROVIDER_CID },
+#if defined(XP_WIN)
+ { NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID },
+#elif defined(MOZ_WIDGET_GTK2)
+ { NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID },
+#endif
+ { NS_FEEDSNIFFER_CONTRACTID, &kNS_FEEDSNIFFER_CID },
+#ifdef MOZ_SAFE_BROWSING
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "blocked", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
+#endif
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "certerror", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "feeds", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "privatebrowsing", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "rights", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "robots", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "sessionrestore", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
+#ifndef WINCE
+ { NS_PROFILEMIGRATOR_CONTRACTID, &kNS_FIREFOX_PROFILEMIGRATOR_CID },
+#if defined(XP_WIN) && !defined(__MINGW32__)
+ { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "ie", &kNS_WINIEPROFILEMIGRATOR_CID },
+#elif defined(XP_MACOSX)
+ { NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID },
+ { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "safari", &kNS_SAFARIPROFILEMIGRATOR_CID },
+ { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "macie", &kNS_MACIEPROFILEMIGRATOR_CID },
+ { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "omniweb", &kNS_OMNIWEBPROFILEMIGRATOR_CID },
+ { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "camino", &kNS_CAMINOPROFILEMIGRATOR_CID },
+ { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "icab", &kNS_ICABPROFILEMIGRATOR_CID },
+#endif
+#if !defined(XP_OS2)
+ { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "opera", &kNS_OPERAPROFILEMIGRATOR_CID },
+#endif
+#if !defined(XP_BEOS)
+ { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "dogbert", &kNS_DOGBERTPROFILEMIGRATOR_CID },
+#endif
+ { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "phoenix", &kNS_PHOENIXPROFILEMIGRATOR_CID },
+ { NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "seamonkey", &kNS_SEAMONKEYPROFILEMIGRATOR_CID },
+#endif /* WINCE */
+ { NS_PRIVATE_BROWSING_SERVICE_CONTRACTID, &kNS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID },
+ { NULL }
+};
+static const mozilla::Module::CategoryEntry kBrowserCategories[] = {
+ { XPCOM_DIRECTORY_PROVIDER_CATEGORY, "browser-directory-provider", NS_BROWSERDIRECTORYPROVIDER_CONTRACTID },
+ { NS_CONTENT_SNIFFER_CATEGORY, "Feed Sniffer", NS_FEEDSNIFFER_CONTRACTID },
+ { NULL }
+};
+
+static const mozilla::Module kBrowserModule = {
+ mozilla::Module::kVersion,
+ kBrowserCIDs,
+ kBrowserContracts,
+ kBrowserCategories
+};
+
+NSMODULE_DEFN(nsBrowserCompsModule) = &kBrowserModule;
+
--- a/browser/components/dirprovider/DirectoryProvider.cpp
+++ b/browser/components/dirprovider/DirectoryProvider.cpp
@@ -47,17 +47,17 @@
#include "nsEnumeratorUtils.h"
#include "nsBrowserDirectoryServiceDefs.h"
#include "nsAppDirectoryServiceDefs.h"
#include "nsDirectoryServiceDefs.h"
#include "nsCategoryManagerUtils.h"
#include "nsComponentManagerUtils.h"
#include "nsCOMArray.h"
#include "nsDirectoryServiceUtils.h"
-#include "nsIGenericFactory.h"
+#include "mozilla/ModuleUtils.h"
#include "nsServiceManagerUtils.h"
#include "nsStringAPI.h"
#include "nsXULAppAPI.h"
namespace mozilla {
namespace browser {
NS_IMPL_ISUPPORTS2(DirectoryProvider,
@@ -271,53 +271,16 @@ DirectoryProvider::GetFiles(const char *
return NS_ERROR_OUT_OF_MEMORY;
return NS_NewUnionEnumerator(aResult, extEnum, baseEnum);
}
return NS_ERROR_FAILURE;
}
-NS_METHOD
-DirectoryProvider::Register(nsIComponentManager* aCompMgr, nsIFile* aPath,
- const char *aLoaderStr, const char *aType,
- const nsModuleComponentInfo *aInfo)
-{
- nsresult rv;
-
- nsCOMPtr<nsICategoryManager> catMan
- (do_GetService(NS_CATEGORYMANAGER_CONTRACTID));
- if (!catMan)
- return NS_ERROR_FAILURE;
-
- rv = catMan->AddCategoryEntry(XPCOM_DIRECTORY_PROVIDER_CATEGORY,
- "browser-directory-provider",
- NS_BROWSERDIRECTORYPROVIDER_CONTRACTID,
- PR_TRUE, PR_TRUE, nsnull);
- return rv;
-}
-
-
-NS_METHOD
-DirectoryProvider::Unregister(nsIComponentManager* aCompMgr,
- nsIFile* aPath, const char *aLoaderStr,
- const nsModuleComponentInfo *aInfo)
-{
- nsresult rv;
-
- nsCOMPtr<nsICategoryManager> catMan
- (do_GetService(NS_CATEGORYMANAGER_CONTRACTID));
- if (!catMan)
- return NS_ERROR_FAILURE;
-
- rv = catMan->DeleteCategoryEntry(XPCOM_DIRECTORY_PROVIDER_CATEGORY,
- "browser-directory-provider", PR_TRUE);
- return rv;
-}
-
NS_IMPL_ISUPPORTS1(DirectoryProvider::AppendingEnumerator, nsISimpleEnumerator)
NS_IMETHODIMP
DirectoryProvider::AppendingEnumerator::HasMoreElements(PRBool *aResult)
{
*aResult = mNext ? PR_TRUE : PR_FALSE;
return NS_OK;
}
--- a/browser/components/dirprovider/DirectoryProvider.h
+++ b/browser/components/dirprovider/DirectoryProvider.h
@@ -37,40 +37,30 @@
#ifndef DirectoryProvider_h__
#define DirectoryProvider_h__
#include "nsIDirectoryService.h"
#include "nsComponentManagerUtils.h"
#include "nsISimpleEnumerator.h"
#include "nsIFile.h"
-#include "nsIGenericFactory.h"
#define NS_BROWSERDIRECTORYPROVIDER_CONTRACTID \
"@mozilla.org/browser/directory-provider;1"
namespace mozilla {
namespace browser {
class DirectoryProvider : public nsIDirectoryServiceProvider2
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIDIRECTORYSERVICEPROVIDER
NS_DECL_NSIDIRECTORYSERVICEPROVIDER2
- static NS_METHOD Register(nsIComponentManager* aCompMgr,
- nsIFile* aPath, const char *aLoaderStr,
- const char *aType,
- const nsModuleComponentInfo *aInfo);
-
- static NS_METHOD Unregister(nsIComponentManager* aCompMgr,
- nsIFile* aPath, const char *aLoaderStr,
- const nsModuleComponentInfo *aInfo);
-
private:
class AppendingEnumerator : public nsISimpleEnumerator
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSISIMPLEENUMERATOR
AppendingEnumerator(nsISimpleEnumerator* aBase,
--- a/browser/components/feeds/src/nsFeedSniffer.cpp
+++ b/browser/components/feeds/src/nsFeedSniffer.cpp
@@ -418,24 +418,8 @@ nsFeedSniffer::OnDataAvailable(nsIReques
}
NS_IMETHODIMP
nsFeedSniffer::OnStopRequest(nsIRequest* request, nsISupports* context,
nsresult status)
{
return NS_OK;
}
-
-NS_METHOD
-nsFeedSniffer::Register(nsIComponentManager *compMgr, nsIFile *path,
- const char *registryLocation,
- const char *componentType,
- const nsModuleComponentInfo *info)
-{
- nsresult rv;
- nsCOMPtr<nsICategoryManager> catman = do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
- if (NS_FAILED(rv))
- return rv;
-
- return catman->AddCategoryEntry(NS_CONTENT_SNIFFER_CATEGORY, "Feed Sniffer",
- NS_FEEDSNIFFER_CONTRACTID, PR_TRUE, PR_TRUE,
- nsnull);
-}
--- a/browser/components/feeds/src/nsFeedSniffer.h
+++ b/browser/components/feeds/src/nsFeedSniffer.h
@@ -31,17 +31,16 @@
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-#include "nsIGenericFactory.h"
#include "nsIContentSniffer.h"
#include "nsIStreamListener.h"
#include "nsStringAPI.h"
class nsFeedSniffer : public nsIContentSniffer, nsIStreamListener
{
public:
NS_DECL_ISUPPORTS
@@ -51,21 +50,16 @@ public:
static NS_METHOD AppendSegmentToString(nsIInputStream* inputStream,
void* closure,
const char* rawSegment,
PRUint32 toOffset,
PRUint32 count,
PRUint32* writeCount);
- static NS_METHOD Register(nsIComponentManager* compMgr, nsIFile* path,
- const char* registryLocation,
- const char* componentType,
- const nsModuleComponentInfo *info);
-
protected:
nsresult ConvertEncodedData(nsIRequest* request, const PRUint8* data,
PRUint32 length);
private:
nsCString mDecodedData;
};
--- a/caps/src/nsNullPrincipal.cpp
+++ b/caps/src/nsNullPrincipal.cpp
@@ -48,16 +48,17 @@
#include "nsIUUIDGenerator.h"
#include "nsID.h"
#include "nsNetUtil.h"
#include "nsIClassInfoImpl.h"
#include "nsNetCID.h"
#include "nsDOMError.h"
#include "nsScriptSecurityManager.h"
+NS_IMPL_CLASSINFO(nsNullPrincipal, NULL, nsIClassInfo::MAIN_THREAD_ONLY)
NS_IMPL_QUERY_INTERFACE2_CI(nsNullPrincipal,
nsIPrincipal,
nsISerializable)
NS_IMPL_CI_INTERFACE_GETTER2(nsNullPrincipal,
nsIPrincipal,
nsISerializable)
NS_IMETHODIMP_(nsrefcnt)
--- a/caps/src/nsPrincipal.cpp
+++ b/caps/src/nsPrincipal.cpp
@@ -135,16 +135,17 @@ static PRBool URIIsImmutable(nsIURI* aUR
!isMutable;
}
// Static member variables
PRInt32 nsPrincipal::sCapabilitiesOrdinal = 0;
const char nsPrincipal::sInvalid[] = "Invalid";
+NS_IMPL_CLASSINFO(nsPrincipal, NULL, nsIClassInfo::MAIN_THREAD_ONLY)
NS_IMPL_QUERY_INTERFACE2_CI(nsPrincipal,
nsIPrincipal,
nsISerializable)
NS_IMPL_CI_INTERFACE_GETTER2(nsPrincipal,
nsIPrincipal,
nsISerializable)
NS_IMETHODIMP_(nsrefcnt)
--- a/caps/src/nsSecurityManagerFactory.cpp
+++ b/caps/src/nsSecurityManagerFactory.cpp
@@ -32,18 +32,16 @@
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*Factory for internal browser security resource managers*/
#include "nsCOMPtr.h"
-#include "nsIModule.h"
-#include "nsIGenericFactory.h"
#include "nsIScriptSecurityManager.h"
#include "nsScriptSecurityManager.h"
#include "nsIPrincipal.h"
#include "nsPrincipal.h"
#include "nsSystemPrincipal.h"
#include "nsNullPrincipal.h"
#include "nsIScriptNameSpaceManager.h"
#include "nsIScriptContext.h"
--- a/caps/src/nsSystemPrincipal.cpp
+++ b/caps/src/nsSystemPrincipal.cpp
@@ -44,17 +44,18 @@
#include "nsIURL.h"
#include "nsCOMPtr.h"
#include "nsXPIDLString.h"
#include "nsReadableUtils.h"
#include "nsCRT.h"
#include "nsString.h"
#include "nsIClassInfoImpl.h"
-
+NS_IMPL_CLASSINFO(nsSystemPrincipal, NULL,
+ nsIClassInfo::SINGLETON | nsIClassInfo::MAIN_THREAD_ONLY)
NS_IMPL_QUERY_INTERFACE2_CI(nsSystemPrincipal,
nsIPrincipal,
nsISerializable)
NS_IMPL_CI_INTERFACE_GETTER2(nsSystemPrincipal,
nsIPrincipal,
nsISerializable)
NS_IMETHODIMP_(nsrefcnt)
--- a/chrome/src/nsChromeFactory.cpp
+++ b/chrome/src/nsChromeFactory.cpp
@@ -31,39 +31,43 @@
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsCOMPtr.h"
-#include "nsIModule.h"
-#include "nsIGenericFactory.h"
+#include "mozilla/ModuleUtils.h"
#include "nsIServiceManager.h"
#include "nsIComponentManager.h"
#include "nsIChromeRegistry.h"
#include "nscore.h"
#include "nsChromeProtocolHandler.h"
#include "nsChromeRegistry.h"
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsChromeRegistry, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsChromeProtocolHandler)
-// The list of components we register
-static const nsModuleComponentInfo components[] =
-{
- { "Chrome Registry",
- NS_CHROMEREGISTRY_CID,
- NS_CHROMEREGISTRY_CONTRACTID,
- nsChromeRegistryConstructor
- },
+NS_DEFINE_NAMED_CID(NS_CHROMEREGISTRY_CID);
+NS_DEFINE_NAMED_CID(NS_CHROMEPROTOCOLHANDLER_CID);
- { "Chrome Protocol Handler",
- NS_CHROMEPROTOCOLHANDLER_CID,
- NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "chrome",
- nsChromeProtocolHandlerConstructor
- }
+static const mozilla::Module::CIDEntry kChromeCIDs[] = {
+ { &kNS_CHROMEREGISTRY_CID, false, NULL, nsChromeRegistryConstructor },
+ { &kNS_CHROMEPROTOCOLHANDLER_CID, false, NULL, nsChromeProtocolHandlerConstructor },
+ { NULL }
};
-NS_IMPL_NSGETMODULE(nsChromeModule, components)
+static const mozilla::Module::ContractIDEntry kChromeContracts[] = {
+ { NS_CHROMEREGISTRY_CONTRACTID, &kNS_CHROMEREGISTRY_CID },
+ { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "chrome", &kNS_CHROMEPROTOCOLHANDLER_CID },
+ { NULL }
+};
+static const mozilla::Module kChromeModule = {
+ mozilla::Module::kVersion,
+ kChromeCIDs,
+ kChromeContracts
+};
+
+NSMODULE_DEFN(nsChromeModule) = &kChromeModule;
+
--- a/content/xul/document/public/nsIXULPrototypeCache.h
+++ b/content/xul/document/public/nsIXULPrototypeCache.h
@@ -67,17 +67,17 @@ public:
/**
* Stop the FastLoad process abruptly, removing the FastLoad file.
*/
virtual void AbortFastLoads() = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIXULPrototypeCache, NS_IXULPROTOTYPECACHE_IID)
-NS_IMETHODIMP
+nsresult
NS_NewXULPrototypeCache(nsISupports* aOuter, REFNSIID aIID, void** aResult);
const char XUL_FASTLOAD_FILE_BASENAME[] = "XUL";
// Increase the subtractor when changing version, say when changing the
// (opaque to XPCOM FastLoad code) format of XUL-specific XDR serializations.
// See also JSXDR_BYTECODE_VERSION in jsxdrapi.h, which tracks incompatible JS
--- a/content/xul/document/src/nsXULControllers.cpp
+++ b/content/xul/document/src/nsXULControllers.cpp
@@ -74,17 +74,17 @@ nsXULControllers::DeleteControllers()
if (controllerData)
delete controllerData; // releases the nsIController
}
mControllers.Clear();
}
-NS_IMETHODIMP
+nsresult
NS_NewXULControllers(nsISupports* aOuter, REFNSIID aIID, void** aResult)
{
NS_PRECONDITION(aOuter == nsnull, "no aggregation");
if (aOuter)
return NS_ERROR_NO_AGGREGATION;
nsXULControllers* controllers = new nsXULControllers();
if (! controllers)
--- a/content/xul/document/src/nsXULControllers.h
+++ b/content/xul/document/src/nsXULControllers.h
@@ -72,23 +72,23 @@ public:
return NS_OK;
}
PRUint32 mControllerID;
nsCOMPtr<nsIController> mController;
};
-NS_IMETHODIMP NS_NewXULControllers(nsISupports* aOuter, REFNSIID aIID, void** aResult);
+nsresult NS_NewXULControllers(nsISupports* aOuter, REFNSIID aIID, void** aResult);
class nsXULControllers : public nsIControllers,
public nsISecurityCheckedComponent
{
public:
- friend NS_IMETHODIMP
+ friend nsresult
NS_NewXULControllers(nsISupports* aOuter, REFNSIID aIID, void** aResult);
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsXULControllers, nsIControllers)
NS_DECL_NSICONTROLLERS
NS_DECL_NSISECURITYCHECKEDCOMPONENT
protected:
--- a/content/xul/document/src/nsXULPrototypeCache.cpp
+++ b/content/xul/document/src/nsXULPrototypeCache.cpp
@@ -107,17 +107,17 @@ nsXULPrototypeCache::~nsXULPrototypeCach
}
NS_IMPL_THREADSAFE_ISUPPORTS2(nsXULPrototypeCache,
nsIXULPrototypeCache,
nsIObserver)
-NS_IMETHODIMP
+nsresult
NS_NewXULPrototypeCache(nsISupports* aOuter, REFNSIID aIID, void** aResult)
{
NS_PRECONDITION(! aOuter, "no aggregation");
if (aOuter)
return NS_ERROR_NO_AGGREGATION;
nsRefPtr<nsXULPrototypeCache> result = new nsXULPrototypeCache();
if (! result)
--- a/content/xul/document/src/nsXULPrototypeCache.h
+++ b/content/xul/document/src/nsXULPrototypeCache.h
@@ -140,17 +140,17 @@ public:
static nsIFastLoadService* GetFastLoadService();
static void ReleaseGlobals()
{
NS_IF_RELEASE(sInstance);
}
protected:
- friend NS_IMETHODIMP
+ friend nsresult
NS_NewXULPrototypeCache(nsISupports* aOuter, REFNSIID aIID, void** aResult);
nsXULPrototypeCache();
virtual ~nsXULPrototypeCache();
static nsXULPrototypeCache* sInstance;
void FlushScripts();
--- a/content/xul/templates/src/nsXULContentBuilder.cpp
+++ b/content/xul/templates/src/nsXULContentBuilder.cpp
@@ -112,17 +112,17 @@ public:
NS_IMETHOD GetResultForContent(nsIDOMElement* aContent,
nsIXULTemplateResult** aResult);
// nsIMutationObserver interface
NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED
protected:
- friend NS_IMETHODIMP
+ friend nsresult
NS_NewXULContentBuilder(nsISupports* aOuter, REFNSIID aIID, void** aResult);
nsXULContentBuilder();
void Traverse(nsCycleCollectionTraversalCallback &cb) const
{
mSortState.Traverse(cb);
}
@@ -365,17 +365,17 @@ protected:
nsTemplateMap mTemplateMap;
/**
* Information about the currently active sort
*/
nsSortState mSortState;
};
-NS_IMETHODIMP
+nsresult
NS_NewXULContentBuilder(nsISupports* aOuter, REFNSIID aIID, void** aResult)
{
NS_PRECONDITION(aOuter == nsnull, "no aggregation");
if (aOuter)
return NS_ERROR_NO_AGGREGATION;
nsresult rv;
nsXULContentBuilder* result = new nsXULContentBuilder();
--- a/content/xul/templates/src/nsXULTreeBuilder.cpp
+++ b/content/xul/templates/src/nsXULTreeBuilder.cpp
@@ -85,17 +85,17 @@ public:
// nsITreeView
NS_DECL_NSITREEVIEW
// nsINativeTreeView: Untrusted code can use us
NS_IMETHOD EnsureNative() { return NS_OK; }
virtual void NodeWillBeDestroyed(const nsINode* aNode);
protected:
- friend NS_IMETHODIMP
+ friend nsresult
NS_NewXULTreeBuilder(nsISupports* aOuter, REFNSIID aIID, void** aResult);
nsXULTreeBuilder();
/**
* Uninitialize the template builder
*/
virtual void Uninit(PRBool aIsFinal);
@@ -265,17 +265,17 @@ protected:
/**
* The builder observers.
*/
nsCOMPtr<nsISupportsArray> mObservers;
};
//----------------------------------------------------------------------
-NS_IMETHODIMP
+nsresult
NS_NewXULTreeBuilder(nsISupports* aOuter, REFNSIID aIID, void** aResult)
{
*aResult = nsnull;
NS_PRECONDITION(aOuter == nsnull, "no aggregation");
if (aOuter)
return NS_ERROR_NO_AGGREGATION;
--- a/docshell/base/Makefile.in
+++ b/docshell/base/Makefile.in
@@ -89,18 +89,16 @@ EXPORTS_mozilla = \
CPPSRCS = \
nsDocShell.cpp \
nsDocShellLoadInfo.cpp \
nsDocShellEditorData.cpp \
nsDocShellTransferableHooks.cpp \
nsDocShellEnumerator.cpp \
nsDSURIContentListener.cpp \
nsDefaultURIFixup.cpp \
- nsGlobalHistoryAdapter.cpp \
- nsGlobalHistory2Adapter.cpp \
nsWebNavigationInfo.cpp \
nsAboutRedirector.cpp \
nsDownloadHistory.cpp \
$(NULL)
# we don't want the shared lib, but we want to force the creation of a
# static lib.
FORCE_STATIC_LIB = 1
--- a/docshell/base/nsAboutRedirector.cpp
+++ b/docshell/base/nsAboutRedirector.cpp
@@ -169,17 +169,17 @@ nsAboutRedirector::GetURIFlags(nsIURI *a
return NS_OK;
}
}
NS_ERROR("nsAboutRedirector called for unknown case");
return NS_ERROR_ILLEGAL_VALUE;
}
-NS_METHOD
+nsresult
nsAboutRedirector::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)
{
nsAboutRedirector* about = new nsAboutRedirector();
if (about == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(about);
nsresult rv = about->QueryInterface(aIID, aResult);
NS_RELEASE(about);
--- a/docshell/base/nsAboutRedirector.h
+++ b/docshell/base/nsAboutRedirector.h
@@ -46,17 +46,17 @@ class nsAboutRedirector : public nsIAbou
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIABOUTMODULE
nsAboutRedirector() {}
virtual ~nsAboutRedirector() {}
- static NS_METHOD
+ static nsresult
Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
protected:
};
#define NS_ABOUT_REDIRECTOR_MODULE_CID \
{ /* f0acde16-1dd1-11b2-9e35-f5786fff5a66*/ \
0xf0acde16, \
--- a/docshell/base/nsDownloadHistory.cpp
+++ b/docshell/base/nsDownloadHistory.cpp
@@ -47,45 +47,16 @@
#include "nsIComponentRegistrar.h"
#include "nsDocShellCID.h"
////////////////////////////////////////////////////////////////////////////////
//// nsDownloadHistory
NS_IMPL_ISUPPORTS1(nsDownloadHistory, nsIDownloadHistory)
-nsresult
-nsDownloadHistory::RegisterSelf(nsIComponentManager *aCompMgr,
- nsIFile *aPath,
- const char *aLoaderStr,
- const char *aType,
- const nsModuleComponentInfo *aInfo)
-{
- nsCOMPtr<nsIComponentRegistrar> compReg(do_QueryInterface(aCompMgr));
- if (!compReg)
- return NS_ERROR_UNEXPECTED;
-
- PRBool registered;
- nsresult rv = compReg->IsContractIDRegistered(NS_DOWNLOADHISTORY_CONTRACTID,
- ®istered);
- NS_ENSURE_SUCCESS(rv, rv);
-
- // If someone has already registered the contractID, we don't want to register
- // it ourselves. We do want to register though in case someone wants to access
- // this implementation (by CID).
- if (registered) {
- return compReg->RegisterFactoryLocation(GetCID(), "nsDownloadHistory",
- nsnull, aPath, aLoaderStr, aType);
- }
-
- return compReg->RegisterFactoryLocation(GetCID(), "nsDownloadHistory",
- NS_DOWNLOADHISTORY_CONTRACTID,
- aPath, aLoaderStr, aType);
-}
-
////////////////////////////////////////////////////////////////////////////////
//// nsIDownloadHistory
NS_IMETHODIMP
nsDownloadHistory::AddDownload(nsIURI *aSource,
nsIURI *aReferrer,
PRTime aStartTime)
{
--- a/docshell/base/nsDownloadHistory.h
+++ b/docshell/base/nsDownloadHistory.h
@@ -36,29 +36,22 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __nsDownloadHistory_h__
#define __nsDownloadHistory_h__
#include "nsIDownloadHistory.h"
-#include "nsIGenericFactory.h"
#define NS_DOWNLOADHISTORY_CID \
{0x2ee83680, 0x2af0, 0x4bcb, {0xbf, 0xa0, 0xc9, 0x70, 0x5f, 0x65, 0x54, 0xf1}}
class nsDownloadHistory : public nsIDownloadHistory
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIDOWNLOADHISTORY
- static NS_METHOD RegisterSelf(nsIComponentManager *aCompMgr,
- nsIFile *aPath,
- const char *aLoaderStr,
- const char *aType,
- const nsModuleComponentInfo *aInfo);
-
NS_DEFINE_STATIC_CID_ACCESSOR(NS_DOWNLOADHISTORY_CID)
};
#endif // __nsDownloadHistory_h__
deleted file mode 100644
--- a/docshell/base/nsGlobalHistory2Adapter.cpp
+++ /dev/null
@@ -1,176 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla gecko code.
- *
- * The Initial Developer of the Original Code is
- * Benjamin Smedberg <bsmedberg@covad.net>
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsGlobalHistory2Adapter.h"
-
-#include "nsDocShellCID.h"
-#include "nsServiceManagerUtils.h"
-#include "nsIComponentRegistrar.h"
-#include "nsGlobalHistoryAdapter.h"
-#include "nsIURI.h"
-#include "nsString.h"
-#include "nsNetUtil.h"
-
-// we should really have a nsIGenericFactory macro to make this a static
-// member function
-
-nsresult
-nsGlobalHistory2Adapter::Create(nsISupports *aOuter,
- REFNSIID aIID,
- void **aResult)
-{
- nsresult rv;
-
- if (aOuter) {
- rv = NS_ERROR_NO_AGGREGATION;
- return rv;
- }
-
- nsGlobalHistory2Adapter* adapter = new nsGlobalHistory2Adapter();
- if (!adapter) {
- rv = NS_ERROR_OUT_OF_MEMORY;
- return rv;
- }
-
- NS_ADDREF(adapter);
- rv = adapter->Init();
- if (NS_SUCCEEDED(rv)) {
- rv = adapter->QueryInterface(aIID, aResult);
- }
- NS_RELEASE(adapter);
-
- return rv;
-}
-
-nsresult
-nsGlobalHistory2Adapter::RegisterSelf(nsIComponentManager* aCompMgr,
- nsIFile* aPath,
- const char* aLoaderStr,
- const char* aType,
- const nsModuleComponentInfo *aInfo)
-{
- nsresult rv;
- PRBool registered;
- nsCOMPtr<nsIComponentRegistrar> compReg( do_QueryInterface(aCompMgr) );
- if (!compReg) {
- rv = NS_ERROR_UNEXPECTED;
- return rv;
- }
-
- rv = compReg->IsContractIDRegistered(NS_GLOBALHISTORY_CONTRACTID, ®istered);
- if (NS_FAILED(rv)) return rv;
-
- // If the embedder has already registered the contractID, we don't want to
- // register ourself. Ideally the component manager would handle this for us.
- if (registered) {
- rv = NS_OK;
- return rv;
- }
-
- return compReg->RegisterFactoryLocation(GetCID(),
- "nsGlobalHistory2Adapter",
- NS_GLOBALHISTORY_CONTRACTID,
- aPath, aLoaderStr, aType);
-}
-
-nsGlobalHistory2Adapter::nsGlobalHistory2Adapter()
-{ }
-
-nsGlobalHistory2Adapter::~nsGlobalHistory2Adapter()
-{ }
-
-nsresult
-nsGlobalHistory2Adapter::Init()
-{
- nsresult rv;
-
- nsCOMPtr<nsIComponentRegistrar> compReg;
- rv = NS_GetComponentRegistrar(getter_AddRefs(compReg));
- NS_ENSURE_SUCCESS(rv, rv);
-
- nsCID *cid;
- rv = compReg->ContractIDToCID(NS_GLOBALHISTORY2_CONTRACTID, &cid);
- if (NS_FAILED(rv)) {
- rv = NS_ERROR_FACTORY_NOT_REGISTERED;
- return rv;
- }
-
- if (cid->Equals(nsGlobalHistoryAdapter::GetCID())) {
- rv = NS_ERROR_FACTORY_NOT_REGISTERED;
- return rv;
- }
-
- NS_WARNING("Using nsIGlobalHistory->nsIGlobalHistory2 adapter.");
- mHistory = do_GetService(NS_GLOBALHISTORY2_CONTRACTID, &rv);
- return rv;
-}
-
-NS_IMPL_ISUPPORTS1(nsGlobalHistory2Adapter, nsIGlobalHistory)
-
-NS_IMETHODIMP
-nsGlobalHistory2Adapter::AddPage(const char* aURI)
-{
- NS_ENSURE_ARG_POINTER(aURI);
- NS_ENSURE_TRUE(*aURI, NS_ERROR_ILLEGAL_VALUE);
-
- nsresult rv;
-
- nsCOMPtr<nsIURI> uri;
- rv = NS_NewURI(getter_AddRefs(uri), nsDependentCString(aURI));
-
- if (NS_SUCCEEDED(rv)) {
- rv = mHistory->AddURI(uri, PR_FALSE, PR_FALSE, nsnull);
- }
-
- return rv;
-}
-
-NS_IMETHODIMP
-nsGlobalHistory2Adapter::IsVisited(const char* aURI, PRBool* aRetval)
-{
- NS_ENSURE_ARG_POINTER(aURI);
- nsresult rv;
-
- nsCOMPtr<nsIURI> uri;
- rv = NS_NewURI(getter_AddRefs(uri), nsDependentCString(aURI));
-
- if (NS_SUCCEEDED(rv)) {
- rv = mHistory->IsVisited(uri, aRetval);
- }
-
- return rv;
-}
deleted file mode 100644
--- a/docshell/base/nsGlobalHistory2Adapter.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla gecko code.
- *
- * The Initial Developer of the Original Code is
- * Benjamin Smedberg <bsmedberg@covad.net>
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsIGlobalHistory2.h"
-#include "nsIGlobalHistory.h"
-#include "nsIGenericFactory.h"
-#include "nsCOMPtr.h"
-
-/**
- * A compatibility wrapper for the nsIGlobalHistory2 interface. It provides
- * the old nsIGlobalHistory interface for extensions which still use it.
- */
-
-// {a772eee4-0464-40d5-a329-a29dfda3791a}
-#define NS_GLOBALHISTORY2ADAPTER_CID \
- { 0xa772eee4, 0x0464, 0x405d, { 0xa3, 0x29, 0xa2, 0x9d, 0xfd, 0xa3, 0x79, 0x1a } }
-
-class nsGlobalHistory2Adapter : public nsIGlobalHistory
-{
-public:
- NS_DECL_ISUPPORTS
- NS_DECL_NSIGLOBALHISTORY
-
- static NS_METHOD Create(nsISupports *aOuter,
- REFNSIID aIID,
- void **aResult);
-
- static NS_METHOD RegisterSelf(nsIComponentManager* aCompMgr,
- nsIFile* aPath,
- const char* aLoaderStr,
- const char* aType,
- const nsModuleComponentInfo *aInfo);
-
- NS_DEFINE_STATIC_CID_ACCESSOR(NS_GLOBALHISTORY2ADAPTER_CID)
-
-private:
- nsGlobalHistory2Adapter();
- ~nsGlobalHistory2Adapter();
-
- nsresult Init();
- nsCOMPtr<nsIGlobalHistory2> mHistory;
-};
deleted file mode 100644
--- a/docshell/base/nsGlobalHistoryAdapter.cpp
+++ /dev/null
@@ -1,199 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla gecko code.
- *
- * The Initial Developer of the Original Code is
- * Benjamin Smedberg <bsmedberg@covad.net>
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsGlobalHistoryAdapter.h"
-
-#include "nsDocShellCID.h"
-#include "nsServiceManagerUtils.h"
-#include "nsIComponentRegistrar.h"
-#include "nsGlobalHistory2Adapter.h"
-#include "nsIURI.h"
-#include "nsString.h"
-
-nsresult
-nsGlobalHistoryAdapter::Create(nsISupports *aOuter,
- REFNSIID aIID,
- void **aResult)
-{
- nsresult rv;
-
- if (aOuter) {
- rv = NS_ERROR_NO_AGGREGATION;
- return rv;
- }
-
- nsGlobalHistoryAdapter* adapter = new nsGlobalHistoryAdapter();
- if (!adapter) {
- rv = NS_ERROR_OUT_OF_MEMORY;
- return rv;
- }
-
- NS_ADDREF(adapter);
- rv = adapter->Init();
- if (NS_SUCCEEDED(rv)) {
- rv = adapter->QueryInterface(aIID, aResult);
- }
- NS_RELEASE(adapter);
-
- return rv;
-}
-
-nsresult
-nsGlobalHistoryAdapter::RegisterSelf(nsIComponentManager* aCompMgr,
- nsIFile* aPath,
- const char* aLoaderStr,
- const char* aType,
- const nsModuleComponentInfo *aInfo)
-{
- nsresult rv;
- PRBool registered;
- nsCOMPtr<nsIComponentRegistrar> compReg( do_QueryInterface(aCompMgr) );
- if (!compReg) {
- rv = NS_ERROR_UNEXPECTED;
- return rv;
- }
-
- rv = compReg->IsContractIDRegistered(NS_GLOBALHISTORY2_CONTRACTID, ®istered);
- if (NS_FAILED(rv)) return rv;
-
- // If the embedder has already registered the contractID, we don't want to
- // register ourself. Ideally the component manager would handle this for us.
- if (registered) {
- rv = NS_OK;
- return rv;
- }
-
- return compReg->RegisterFactoryLocation(GetCID(),
- "nsGlobalHistoryAdapter",
- NS_GLOBALHISTORY2_CONTRACTID,
- aPath, aLoaderStr, aType);
-}
-
-nsGlobalHistoryAdapter::nsGlobalHistoryAdapter()
-{ }
-
-nsGlobalHistoryAdapter::~nsGlobalHistoryAdapter()
-{ }
-
-nsresult
-nsGlobalHistoryAdapter::Init()
-{
- nsresult rv;
-
- nsCOMPtr<nsIComponentRegistrar> compReg;
- rv = NS_GetComponentRegistrar(getter_AddRefs(compReg));
- NS_ENSURE_SUCCESS(rv, rv);
-
- nsCID *cid;
- rv = compReg->ContractIDToCID(NS_GLOBALHISTORY_CONTRACTID, &cid);
- if (NS_FAILED(rv)) {
- rv = NS_ERROR_FACTORY_NOT_REGISTERED;
- return rv;
- }
-
- if (cid->Equals(nsGlobalHistory2Adapter::GetCID())) {
- rv = NS_ERROR_FACTORY_NOT_REGISTERED;
- return rv;
- }
-
- NS_WARNING("Using nsIGlobalHistory2->nsIGlobalHistory adapter.");
- mHistory = do_GetService(NS_GLOBALHISTORY_CONTRACTID, &rv);
- return rv;
-}
-
-NS_IMPL_ISUPPORTS1(nsGlobalHistoryAdapter, nsIGlobalHistory2)
-
-NS_IMETHODIMP
-nsGlobalHistoryAdapter::AddURI(nsIURI* aURI, PRBool aRedirect,
- PRBool aToplevel, nsIURI* aReferrer)
-{
- NS_ENSURE_ARG_POINTER(aURI);
- nsresult rv;
-
- // The model is really if we don't know differently then add which basically
- // means we are supposed to try all the things we know not to allow in and
- // then if we don't bail go on and allow it in. But here lets compare
- // against the most common case we know to allow in and go on and say yes
- // to it.
-
- PRBool isHTTP = PR_FALSE;
- PRBool isHTTPS = PR_FALSE;
-
- NS_ENSURE_SUCCESS(rv = aURI->SchemeIs("http", &isHTTP), rv);
- NS_ENSURE_SUCCESS(rv = aURI->SchemeIs("https", &isHTTPS), rv);
-
- if (!isHTTP && !isHTTPS) {
- PRBool isAbout, isImap, isNews, isMailbox, isViewSource, isChrome, isData;
-
- rv = aURI->SchemeIs("about", &isAbout);
- rv |= aURI->SchemeIs("imap", &isImap);
- rv |= aURI->SchemeIs("news", &isNews);
- rv |= aURI->SchemeIs("mailbox", &isMailbox);
- rv |= aURI->SchemeIs("view-source", &isViewSource);
- rv |= aURI->SchemeIs("chrome", &isChrome);
- rv |= aURI->SchemeIs("data", &isData);
- NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);
-
- if (isAbout || isImap || isNews || isMailbox || isViewSource || isChrome || isData) {
- return NS_OK;
- }
- }
-
- nsCAutoString spec;
- rv = aURI->GetSpec(spec);
- NS_ENSURE_SUCCESS(rv, rv);
-
- return mHistory->AddPage(spec.get());
-}
-
-NS_IMETHODIMP
-nsGlobalHistoryAdapter::IsVisited(nsIURI* aURI, PRBool* aRetval)
-{
- NS_ENSURE_ARG_POINTER(aURI);
-
- nsCAutoString spec;
- nsresult rv = aURI->GetSpec(spec);
- NS_ENSURE_SUCCESS(rv, rv);
-
- return mHistory->IsVisited(spec.get(), aRetval);
-}
-
-NS_IMETHODIMP
-nsGlobalHistoryAdapter::SetPageTitle(nsIURI* aURI, const nsAString& aTitle)
-{
- return NS_ERROR_NOT_IMPLEMENTED;
-}
deleted file mode 100644
--- a/docshell/base/nsGlobalHistoryAdapter.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla gecko code.
- *
- * The Initial Developer of the Original Code is
- * Benjamin Smedberg <bsmedberg@covad.net>
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsIGlobalHistory2.h"
-#include "nsIGlobalHistory.h"
-#include "nsIGenericFactory.h"
-#include "nsCOMPtr.h"
-
-/**
- * A compatibility wrapper for the old nsIGlobalHistory interface. It provides
- * the new nsIGlobalHistory2 interface for embedders who haven't implemented it
- * themselves.
- */
-
-// {2e9b69dd-9087-438c-8b5d-f77b553abefb}
-#define NS_GLOBALHISTORYADAPTER_CID \
- { 0x2e9b69dd, 0x9087, 0x438c, { 0x8b, 0x5d, 0xf7, 0x7b, 0x55, 0x3a, 0xbe, 0xfb } }
-
-class nsGlobalHistoryAdapter : public nsIGlobalHistory2
-{
-public:
- NS_DECL_ISUPPORTS
- NS_DECL_NSIGLOBALHISTORY2
-
- static NS_METHOD Create(nsISupports *aOuter,
- REFNSIID aIID,
- void **aResult);
-
- static NS_METHOD RegisterSelf(nsIComponentManager* aCompMgr,
- nsIFile* aPath,
- const char* aLoaderStr,
- const char* aType,
- const nsModuleComponentInfo *aInfo);
-
- NS_DEFINE_STATIC_CID_ACCESSOR(NS_GLOBALHISTORYADAPTER_CID)
-
-private:
- nsGlobalHistoryAdapter();
- ~nsGlobalHistoryAdapter();
-
- nsresult Init();
- nsCOMPtr<nsIGlobalHistory> mHistory;
-};
--- a/docshell/build/nsDocShellModule.cpp
+++ b/docshell/build/nsDocShellModule.cpp
@@ -32,19 +32,17 @@
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-#include "nsIModule.h"
-#include "nsIGenericFactory.h"
-
+#include "mozilla/ModuleUtils.h"
#include "nsDocShellCID.h"
#include "nsDocShell.h"
#include "nsDefaultURIFixup.h"
#include "nsWebNavigationInfo.h"
#include "nsAboutRedirector.h"
@@ -60,45 +58,40 @@
#include "nsDBusHandlerApp.h"
#endif
// session history
#include "nsSHEntry.h"
#include "nsSHistory.h"
#include "nsSHTransaction.h"
-// global history
-#include "nsGlobalHistoryAdapter.h"
-#include "nsGlobalHistory2Adapter.h"
-
// download history
#include "nsDownloadHistory.h"
static PRBool gInitialized = PR_FALSE;
// The one time initialization for this module
-// static
static nsresult
-Initialize(nsIModule* aSelf)
+Initialize()
{
NS_PRECONDITION(!gInitialized, "docshell module already initialized");
if (gInitialized) {
return NS_OK;
}
gInitialized = PR_TRUE;
nsresult rv = nsSHistory::Startup();
NS_ENSURE_SUCCESS(rv, rv);
rv = nsSHEntry::Startup();
return rv;
}
static void
-Shutdown(nsIModule* aSelf)
+Shutdown()
{
nsSHEntry::Shutdown();
gInitialized = PR_FALSE;
}
// docshell
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsDocShell, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDefaultURIFixup)
@@ -121,155 +114,108 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsDBusHan
// session history
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSHEntry)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSHTransaction)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSHistory)
// download history
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDownloadHistory)
-static const nsModuleComponentInfo gDocShellModuleInfo[] = {
- // docshell
- { "DocShell",
- NS_DOCSHELL_CID,
- "@mozilla.org/docshell;1",
- nsDocShellConstructor
- },
- { "Default keyword fixup",
- NS_DEFAULTURIFIXUP_CID,
- NS_URIFIXUP_CONTRACTID,
- nsDefaultURIFixupConstructor
- },
- { "Webnavigation info service",
- NS_WEBNAVIGATION_INFO_CID,
- NS_WEBNAVIGATION_INFO_CONTRACTID,
- nsWebNavigationInfoConstructor
- },
-
- // about redirector
- { "about:about",
- NS_ABOUT_REDIRECTOR_MODULE_CID,
- NS_ABOUT_MODULE_CONTRACTID_PREFIX "about",
- nsAboutRedirector::Create
- },
- { "about:config",
- NS_ABOUT_REDIRECTOR_MODULE_CID,
- NS_ABOUT_MODULE_CONTRACTID_PREFIX "config",
- nsAboutRedirector::Create
- },
-#ifdef MOZ_CRASHREPORTER
- { "about:crashes",
- NS_ABOUT_REDIRECTOR_MODULE_CID,
- NS_ABOUT_MODULE_CONTRACTID_PREFIX "crashes",
- nsAboutRedirector::Create
- },
+NS_DEFINE_NAMED_CID(NS_DOCSHELL_CID);
+NS_DEFINE_NAMED_CID(NS_DEFAULTURIFIXUP_CID);
+NS_DEFINE_NAMED_CID(NS_WEBNAVIGATION_INFO_CID);
+NS_DEFINE_NAMED_CID(NS_ABOUT_REDIRECTOR_MODULE_CID);
+NS_DEFINE_NAMED_CID(NS_URI_LOADER_CID);
+NS_DEFINE_NAMED_CID(NS_DOCUMENTLOADER_SERVICE_CID);
+NS_DEFINE_NAMED_CID(NS_EXTERNALHELPERAPPSERVICE_CID);
+NS_DEFINE_NAMED_CID(NS_EXTERNALPROTOCOLHANDLER_CID);
+NS_DEFINE_NAMED_CID(NS_PREFETCHSERVICE_CID);
+NS_DEFINE_NAMED_CID(NS_OFFLINECACHEUPDATESERVICE_CID);
+NS_DEFINE_NAMED_CID(NS_OFFLINECACHEUPDATE_CID);
+NS_DEFINE_NAMED_CID(NS_LOCALHANDLERAPP_CID);
+#ifdef MOZ_ENABLE_DBUS
+NS_DEFINE_NAMED_CID(NS_DBUSHANDLERAPP_CID);
#endif
- { "about:credits",
- NS_ABOUT_REDIRECTOR_MODULE_CID,
- NS_ABOUT_MODULE_CONTRACTID_PREFIX "credits",
- nsAboutRedirector::Create
- },
- { "about:plugins",
- NS_ABOUT_REDIRECTOR_MODULE_CID,
- NS_ABOUT_MODULE_CONTRACTID_PREFIX "plugins",
- nsAboutRedirector::Create
- },
- { "about:mozilla",
- NS_ABOUT_REDIRECTOR_MODULE_CID,
- NS_ABOUT_MODULE_CONTRACTID_PREFIX "mozilla",
- nsAboutRedirector::Create
- },
- { "about:logo",
- NS_ABOUT_REDIRECTOR_MODULE_CID,
- NS_ABOUT_MODULE_CONTRACTID_PREFIX "logo",
- nsAboutRedirector::Create
- },
- { "about:buildconfig",
- NS_ABOUT_REDIRECTOR_MODULE_CID,
- NS_ABOUT_MODULE_CONTRACTID_PREFIX "buildconfig",
- nsAboutRedirector::Create
- },
- { "about:license",
- NS_ABOUT_REDIRECTOR_MODULE_CID,
- NS_ABOUT_MODULE_CONTRACTID_PREFIX "license",
- nsAboutRedirector::Create
- },
- { "about:licence",
- NS_ABOUT_REDIRECTOR_MODULE_CID,
- NS_ABOUT_MODULE_CONTRACTID_PREFIX "licence",
- nsAboutRedirector::Create
- },
- { "about:neterror",
- NS_ABOUT_REDIRECTOR_MODULE_CID,
- NS_ABOUT_MODULE_CONTRACTID_PREFIX "neterror",
- nsAboutRedirector::Create
- },
- { "about:memory",
- NS_ABOUT_REDIRECTOR_MODULE_CID,
- NS_ABOUT_MODULE_CONTRACTID_PREFIX "memory",
- nsAboutRedirector::Create
- },
- { "about:addons",
- NS_ABOUT_REDIRECTOR_MODULE_CID,
- NS_ABOUT_MODULE_CONTRACTID_PREFIX "addons",
- nsAboutRedirector::Create
- },
- { "about:support",
- NS_ABOUT_REDIRECTOR_MODULE_CID,
- NS_ABOUT_MODULE_CONTRACTID_PREFIX "support",
- nsAboutRedirector::Create
- },
+NS_DEFINE_NAMED_CID(NS_SHENTRY_CID);
+NS_DEFINE_NAMED_CID(NS_HISTORYENTRY_CID);
+NS_DEFINE_NAMED_CID(NS_SHTRANSACTION_CID);
+NS_DEFINE_NAMED_CID(NS_SHISTORY_CID);
+NS_DEFINE_NAMED_CID(NS_SHISTORY_INTERNAL_CID);
+NS_DEFINE_NAMED_CID(NS_DOWNLOADHISTORY_CID);
+
- // uriloader
- { "Netscape URI Loader Service", NS_URI_LOADER_CID, NS_URI_LOADER_CONTRACTID, nsURILoaderConstructor, },
- { "Netscape Doc Loader Service", NS_DOCUMENTLOADER_SERVICE_CID, NS_DOCUMENTLOADER_SERVICE_CONTRACTID,
- nsDocLoaderConstructor, },
- { "Netscape External Helper App Service", NS_EXTERNALHELPERAPPSERVICE_CID, NS_EXTERNALHELPERAPPSERVICE_CONTRACTID,
- nsOSHelperAppServiceConstructor, },
- { "Netscape External Helper App Service", NS_EXTERNALHELPERAPPSERVICE_CID, NS_EXTERNALPROTOCOLSERVICE_CONTRACTID,
- nsOSHelperAppServiceConstructor, },
- { "Netscape Mime Mapping Service", NS_EXTERNALHELPERAPPSERVICE_CID, NS_MIMESERVICE_CONTRACTID,
- nsOSHelperAppServiceConstructor, },
- { "Netscape Default Protocol Handler", NS_EXTERNALPROTOCOLHANDLER_CID, NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX"default",
- nsExternalProtocolHandlerConstructor, },
- { NS_PREFETCHSERVICE_CLASSNAME, NS_PREFETCHSERVICE_CID, NS_PREFETCHSERVICE_CONTRACTID,
- nsPrefetchServiceConstructor, },
- { NS_OFFLINECACHEUPDATESERVICE_CLASSNAME, NS_OFFLINECACHEUPDATESERVICE_CID, NS_OFFLINECACHEUPDATESERVICE_CONTRACTID,
- nsOfflineCacheUpdateServiceConstructor, },
- { NS_OFFLINECACHEUPDATE_CLASSNAME, NS_OFFLINECACHEUPDATE_CID, NS_OFFLINECACHEUPDATE_CONTRACTID,
- nsOfflineCacheUpdateConstructor, },
- { "Local Application Handler App", NS_LOCALHANDLERAPP_CID,
- NS_LOCALHANDLERAPP_CONTRACTID, PlatformLocalHandlerApp_tConstructor, },
+const mozilla::Module::CIDEntry kDocShellCIDs[] = {
+ { &kNS_DOCSHELL_CID, false, NULL, nsDocShellConstructor },
+ { &kNS_DEFAULTURIFIXUP_CID, false, NULL, nsDefaultURIFixupConstructor },
+ { &kNS_WEBNAVIGATION_INFO_CID, false, NULL, nsWebNavigationInfoConstructor },
+ { &kNS_ABOUT_REDIRECTOR_MODULE_CID, false, NULL, nsAboutRedirector::Create },
+ { &kNS_URI_LOADER_CID, false, NULL, nsURILoaderConstructor },
+ { &kNS_DOCUMENTLOADER_SERVICE_CID, false, NULL, nsDocLoaderConstructor },
+ { &kNS_EXTERNALHELPERAPPSERVICE_CID, false, NULL, nsOSHelperAppServiceConstructor },
+ { &kNS_EXTERNALPROTOCOLHANDLER_CID, false, NULL, nsExternalProtocolHandlerConstructor },
+ { &kNS_PREFETCHSERVICE_CID, false, NULL, nsPrefetchServiceConstructor },
+ { &kNS_OFFLINECACHEUPDATESERVICE_CID, false, NULL, nsOfflineCacheUpdateServiceConstructor },
+ { &kNS_OFFLINECACHEUPDATE_CID, false, NULL, nsOfflineCacheUpdateConstructor },
+ { &kNS_LOCALHANDLERAPP_CID, false, NULL, PlatformLocalHandlerApp_tConstructor },
#ifdef MOZ_ENABLE_DBUS
- { "DBus Handler App", NS_DBUSHANDLERAPP_CID,
- NS_DBUSHANDLERAPP_CONTRACTID, nsDBusHandlerAppConstructor},
+ { &kNS_DBUSHANDLERAPP_CID, false, NULL, nsDBusHandlerAppConstructor },
#endif
-
- // session history
- { "nsSHEntry", NS_SHENTRY_CID,
- NS_SHENTRY_CONTRACTID, nsSHEntryConstructor },
- { "nsSHEntry", NS_HISTORYENTRY_CID,
- NS_HISTORYENTRY_CONTRACTID, nsSHEntryConstructor },
- { "nsSHTransaction", NS_SHTRANSACTION_CID,
- NS_SHTRANSACTION_CONTRACTID, nsSHTransactionConstructor },
- { "nsSHistory", NS_SHISTORY_CID,
- NS_SHISTORY_CONTRACTID, nsSHistoryConstructor },
- { "nsSHistory", NS_SHISTORY_INTERNAL_CID,
- NS_SHISTORY_INTERNAL_CONTRACTID, nsSHistoryConstructor },
-
- // global history adapters
- { "nsGlobalHistoryAdapter", NS_GLOBALHISTORYADAPTER_CID,
- nsnull, nsGlobalHistoryAdapter::Create,
- nsGlobalHistoryAdapter::RegisterSelf },
- { "nsGlobalHistory2Adapter", NS_GLOBALHISTORY2ADAPTER_CID,
- nsnull, nsGlobalHistory2Adapter::Create,
- nsGlobalHistory2Adapter::RegisterSelf },
-
- // download history
- { "nsDownloadHistory", NS_DOWNLOADHISTORY_CID,
- nsnull, nsDownloadHistoryConstructor,
- nsDownloadHistory::RegisterSelf }
+ { &kNS_SHENTRY_CID, false, NULL, nsSHEntryConstructor },
+ { &kNS_HISTORYENTRY_CID, false, NULL, nsSHEntryConstructor },
+ { &kNS_SHTRANSACTION_CID, false, NULL, nsSHTransactionConstructor },
+ { &kNS_SHISTORY_CID, false, NULL, nsSHistoryConstructor },
+ { &kNS_SHISTORY_INTERNAL_CID, false, NULL, nsSHistoryConstructor },
+ { &kNS_DOWNLOADHISTORY_CID, false, NULL, nsDownloadHistoryConstructor },
+ { NULL }
};
-// "docshell provider" to illustrate that this thing really *should*
-// be dispensing docshells rather than webshells.
-NS_IMPL_NSGETMODULE_WITH_CTOR_DTOR(docshell_provider, gDocShellModuleInfo,
- Initialize, Shutdown)
+const mozilla::Module::ContractIDEntry kDocShellContracts[] = {
+ { "@mozilla.org/docshell;1", &kNS_DOCSHELL_CID },
+ { NS_URIFIXUP_CONTRACTID, &kNS_DEFAULTURIFIXUP_CID },
+ { NS_WEBNAVIGATION_INFO_CONTRACTID, &kNS_WEBNAVIGATION_INFO_CID },
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "about", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "config", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
+#ifdef MOZ_CRASHREPORTER
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "crashes", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
+#endif
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "credits", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "plugins", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "mozilla", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "logo", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "buildconfig", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "license", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "neterror", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "memory", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "addons", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
+ { NS_ABOUT_MODULE_CONTRACTID_PREFIX "support", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
+ { NS_URI_LOADER_CONTRACTID, &kNS_URI_LOADER_CID },
+ { NS_DOCUMENTLOADER_SERVICE_CONTRACTID, &kNS_DOCUMENTLOADER_SERVICE_CID },
+ { NS_EXTERNALHELPERAPPSERVICE_CONTRACTID, &kNS_EXTERNALHELPERAPPSERVICE_CID },
+ { NS_EXTERNALPROTOCOLSERVICE_CONTRACTID, &kNS_EXTERNALHELPERAPPSERVICE_CID },
+ { NS_MIMESERVICE_CONTRACTID, &kNS_EXTERNALHELPERAPPSERVICE_CID },
+ { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX"default", &kNS_EXTERNALPROTOCOLHANDLER_CID },
+ { NS_PREFETCHSERVICE_CONTRACTID, &kNS_PREFETCHSERVICE_CID },
+ { NS_OFFLINECACHEUPDATESERVICE_CONTRACTID, &kNS_OFFLINECACHEUPDATESERVICE_CID },
+ { NS_OFFLINECACHEUPDATE_CONTRACTID, &kNS_OFFLINECACHEUPDATE_CID },
+ { NS_LOCALHANDLERAPP_CONTRACTID, &kNS_LOCALHANDLERAPP_CID },
+#ifdef MOZ_ENABLE_DBUS
+ { NS_DBUSHANDLERAPP_CONTRACTID, &kNS_DBUSHANDLERAPP_CID },
+#endif
+ { NS_SHENTRY_CONTRACTID, &kNS_SHENTRY_CID },
+ { NS_HISTORYENTRY_CONTRACTID, &kNS_HISTORYENTRY_CID },
+ { NS_SHTRANSACTION_CONTRACTID, &kNS_SHTRANSACTION_CID },
+ { NS_SHISTORY_CONTRACTID, &kNS_SHISTORY_CID },
+ { NS_SHISTORY_INTERNAL_CONTRACTID, &kNS_SHISTORY_INTERNAL_CID },
+ { NS_DOWNLOADHISTORY_CONTRACTID, &kNS_DOWNLOADHISTORY_CID },
+ { NULL }
+};
+
+static const mozilla::Module kDocShellModule = {
+ mozilla::Module::kVersion,
+ kDocShellCIDs,
+ kDocShellContracts,
+ NULL,
+ NULL,
+ Initialize,
+ Shutdown
+};
+
+NSMODULE_DEFN(docshell_provider) = &kDocShellModule;
--- a/editor/composer/src/nsComposerRegistration.cpp
+++ b/editor/composer/src/nsComposerRegistration.cpp
@@ -32,17 +32,17 @@
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-#include "nsIGenericFactory.h"
+#include "mozilla/ModuleUtils.h"
#include "nsEditingSession.h" // for the CID
#include "nsComposerController.h" // for the CID
#include "nsEditorSpellCheck.h" // for the CID
#include "nsComposeTxtSrvFilter.h"
#include "nsIController.h"
#include "nsIControllerContext.h"
#include "nsIControllerCommandTable.h"
@@ -70,17 +70,17 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsEditing
NS_GENERIC_FACTORY_CONSTRUCTOR(nsEditorSpellCheck)
// There are no macros that enable us to have 2 constructors
// for the same object
//
// Here we are creating the same object with two different contract IDs
// and then initializing it different.
// Basically, we need to tell the filter whether it is doing mail or not
-static NS_METHOD
+static nsresult
nsComposeTxtSrvFilterConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult, PRBool aIsForMail)
{
*aResult = NULL;
if (NULL != aOuter)
{
return NS_ERROR_NO_AGGREGATION;
}
@@ -92,25 +92,25 @@ nsComposeTxtSrvFilterConstructor(nsISupp
}
NS_ADDREF(inst);
inst->Init(aIsForMail);
nsresult rv = inst->QueryInterface(aIID, aResult);
NS_RELEASE(inst);
return rv;
}
-static NS_METHOD
+static nsresult
nsComposeTxtSrvFilterConstructorForComposer(nsISupports *aOuter,
REFNSIID aIID,
void **aResult)
{
return nsComposeTxtSrvFilterConstructor(aOuter, aIID, aResult, PR_FALSE);
}
-static NS_METHOD
+static nsresult
nsComposeTxtSrvFilterConstructorForMail(nsISupports *aOuter,
REFNSIID aIID,
void **aResult)
{
return nsComposeTxtSrvFilterConstructor(aOuter, aIID, aResult, PR_TRUE);
}
@@ -143,41 +143,41 @@ CreateControllerWithSingletonCommandTabl
*aResult = controller;
NS_ADDREF(*aResult);
return NS_OK;
}
// Here we make an instance of the controller that holds doc state commands.
// We set it up with a singleton command table.
-static NS_METHOD
+static nsresult
nsHTMLEditorDocStateControllerConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult)
{
nsCOMPtr<nsIController> controller;
nsresult rv = CreateControllerWithSingletonCommandTable(kHTMLEditorDocStateCommandTableCID, getter_AddRefs(controller));
if (NS_FAILED(rv)) return rv;
return controller->QueryInterface(aIID, aResult);
}
// Tere we make an instance of the controller that holds composer commands.
// We set it up with a singleton command table.
-static NS_METHOD
+static nsresult
nsHTMLEditorControllerConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult)
{
nsCOMPtr<nsIController> controller;
nsresult rv = CreateControllerWithSingletonCommandTable(kHTMLEditorCommandTableCID, getter_AddRefs(controller));
if (NS_FAILED(rv)) return rv;
return controller->QueryInterface(aIID, aResult);
}
// Constructor for a command table that is pref-filled with HTML editor commands
-static NS_METHOD
+static nsresult
nsHTMLEditorCommandTableConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult)
{
nsresult rv;
nsCOMPtr<nsIControllerCommandTable> commandTable =
do_CreateInstance(NS_CONTROLLERCOMMANDTABLE_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
@@ -187,17 +187,17 @@ nsHTMLEditorCommandTableConstructor(nsIS
// we don't know here whether we're being created as an instance,
// or a service, so we can't become immutable
return commandTable->QueryInterface(aIID, aResult);
}
// Constructor for a command table that is pref-filled with HTML editor doc state commands
-static NS_METHOD
+static nsresult
nsHTMLEditorDocStateCommandTableConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult)
{
nsresult rv;
nsCOMPtr<nsIControllerCommandTable> commandTable =
do_CreateInstance(NS_CONTROLLERCOMMANDTABLE_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
@@ -205,52 +205,47 @@ nsHTMLEditorDocStateCommandTableConstruc
if (NS_FAILED(rv)) return rv;
// we don't know here whether we're being created as an instance,
// or a service, so we can't become immutable
return commandTable->QueryInterface(aIID, aResult);
}
-////////////////////////////////////////////////////////////////////////
-// Define a table of CIDs implemented by this module along with other
-// information like the function to create an instance, contractid, and
-// class name.
-//
-static const nsModuleComponentInfo components[] = {
+NS_DEFINE_NAMED_CID(NS_HTMLEDITORCONTROLLER_CID);
+NS_DEFINE_NAMED_CID(NS_EDITORDOCSTATECONTROLLER_CID);
+NS_DEFINE_NAMED_CID(NS_HTMLEDITOR_COMMANDTABLE_CID);
+NS_DEFINE_NAMED_CID(NS_HTMLEDITOR_DOCSTATE_COMMANDTABLE_CID);
+NS_DEFINE_NAMED_CID(NS_EDITINGSESSION_CID);
+NS_DEFINE_NAMED_CID(NS_EDITORSPELLCHECK_CID);
+NS_DEFINE_NAMED_CID(NS_COMPOSERTXTSRVFILTER_CID);
+NS_DEFINE_NAMED_CID(NS_COMPOSERTXTSRVFILTERMAIL_CID);
- { "HTML Editor Controller", NS_HTMLEDITORCONTROLLER_CID,
- "@mozilla.org/editor/htmleditorcontroller;1",
- nsHTMLEditorControllerConstructor, },
-
- { "HTML Editor DocState Controller", NS_EDITORDOCSTATECONTROLLER_CID,
- "@mozilla.org/editor/editordocstatecontroller;1",
- nsHTMLEditorDocStateControllerConstructor, },
-
- { "HTML Editor command table", NS_HTMLEDITOR_COMMANDTABLE_CID,
- "", // no point using a contract-ID
- nsHTMLEditorCommandTableConstructor, },
- { "HTML Editor doc state command table", NS_HTMLEDITOR_DOCSTATE_COMMANDTABLE_CID,
- "", // no point using a contract-ID
- nsHTMLEditorDocStateCommandTableConstructor, },
-
- { "Editing Session", NS_EDITINGSESSION_CID,
- "@mozilla.org/editor/editingsession;1", nsEditingSessionConstructor, },
-
- { "Editor Spell Checker", NS_EDITORSPELLCHECK_CID,
- "@mozilla.org/editor/editorspellchecker;1",
- nsEditorSpellCheckConstructor,},
-
- { "TxtSrv Filter", NS_COMPOSERTXTSRVFILTER_CID,
- COMPOSER_TXTSRVFILTER_CONTRACTID,
- nsComposeTxtSrvFilterConstructorForComposer, },
-
- { "TxtSrv Filter For Mail", NS_COMPOSERTXTSRVFILTERMAIL_CID,
- COMPOSER_TXTSRVFILTERMAIL_CONTRACTID,
- nsComposeTxtSrvFilterConstructorForMail, },
+static const mozilla::Module::CIDEntry kComposerCIDs[] = {
+ { &kNS_HTMLEDITORCONTROLLER_CID, false, NULL, nsHTMLEditorControllerConstructor },
+ { &kNS_EDITORDOCSTATECONTROLLER_CID, false, NULL, nsHTMLEditorDocStateControllerConstructor },
+ { &kNS_HTMLEDITOR_COMMANDTABLE_CID, false, NULL, nsHTMLEditorCommandTableConstructor },
+ { &kNS_HTMLEDITOR_DOCSTATE_COMMANDTABLE_CID, false, NULL, nsHTMLEditorDocStateCommandTableConstructor },
+ { &kNS_EDITINGSESSION_CID, false, NULL, nsEditingSessionConstructor },
+ { &kNS_EDITORSPELLCHECK_CID, false, NULL, nsEditorSpellCheckConstructor },
+ { &kNS_COMPOSERTXTSRVFILTER_CID, false, NULL, nsComposeTxtSrvFilterConstructorForComposer },
+ { &kNS_COMPOSERTXTSRVFILTERMAIL_CID, false, NULL, nsComposeTxtSrvFilterConstructorForMail },
+ { NULL }
};
-////////////////////////////////////////////////////////////////////////
-// Implement the NSGetModule() exported function for your module
-// and the entire implementation of the module object.
-//
-NS_IMPL_NSGETMODULE(nsComposerModule, components)
+static const mozilla::Module::ContractIDEntry kComposerContracts[] = {
+ { "@mozilla.org/editor/htmleditorcontroller;1", &kNS_HTMLEDITORCONTROLLER_CID },
+ { "@mozilla.org/editor/editordocstatecontroller;1", &kNS_EDITORDOCSTATECONTROLLER_CID },
+ { "@mozilla.org/editor/editingsession;1", &kNS_EDITINGSESSION_CID },
+ { "@mozilla.org/editor/editorspellchecker;1", &kNS_EDITORSPELLCHECK_CID },
+ { COMPOSER_TXTSRVFILTER_CONTRACTID, &kNS_COMPOSERTXTSRVFILTER_CID },
+ { COMPOSER_TXTSRVFILTERMAIL_CONTRACTID, &kNS_COMPOSERTXTSRVFILTERMAIL_CID },
+ { NULL }
+};
+
+static const mozilla::Module kComposerModule = {
+ mozilla::Module::kVersion,
+ kComposerCIDs,
+ kComposerContracts
+};
+
+NSMODULE_DEFN(nsComposerModule) = &kComposerModule;
--- a/editor/txmgr/src/nsTransactionManagerFactory.cpp
+++ b/editor/txmgr/src/nsTransactionManagerFactory.cpp
@@ -30,35 +30,37 @@
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-#include "nsIGenericFactory.h"
-
+#include "mozilla/ModuleUtils.h"
#include "nsTransactionManagerCID.h"
#include "nsTransactionStack.h"
#include "nsTransactionManager.h"
////////////////////////////////////////////////////////////////////////
// Define the contructor function for the objects
//
// NOTE: This creates an instance of objects by using the default constructor
//
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTransactionManager)
+NS_DEFINE_NAMED_CID(NS_TRANSACTIONMANAGER_CID);
-////////////////////////////////////////////////////////////////////////
-// Define a table of CIDs implemented by this module along with other
-// information like the function to create an instance, contractid, and
-// class name.
-//
-static const nsModuleComponentInfo components[] = {
- { "nsTransactionManager", NS_TRANSACTIONMANAGER_CID, NS_TRANSACTIONMANAGER_CONTRACTID, nsTransactionManagerConstructor },
+static const mozilla::Module::CIDEntry kTxMgrCIDs[] = {
+ { &kNS_TRANSACTIONMANAGER_CID, false, NULL, nsTransactionManagerConstructor },
+ { NULL }
};
-////////////////////////////////////////////////////////////////////////
-// Implement the NSGetModule() exported function for your module
-// and the entire implementation of the module object.
-//
-NS_IMPL_NSGETMODULE(nsTransactionManagerModule, components)
+static const mozilla::Module::ContractIDEntry kTxMgrContracts[] = {
+ { NS_TRANSACTIONMANAGER_CONTRACTID, &kNS_TRANSACTIONMANAGER_CID },
+ { NULL }
+};
+
+static const mozilla::Module kTxMgrModule = {
+ mozilla::Module::kVersion,
+ kTxMgrCIDs,
+ kTxMgrContracts
+};
+NSMODULE_DEFN(nsTransactionManagerModule) = &kTxMgrModule;
--- a/embedding/browser/build/nsWebBrowserModule.cpp
+++ b/embedding/browser/build/nsWebBrowserModule.cpp
@@ -32,79 +32,58 @@
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-#include "nsIModule.h"
+#include "mozilla/ModuleUtils.h"
#include "nsIServiceManager.h"
-#include "nsIGenericFactory.h"
-#include "nsICategoryManager.h"
#include "nsXPIDLString.h"
#include "nsEmbedCID.h"
#include "nsWebBrowser.h"
#include "nsCommandHandler.h"
#include "nsWebBrowserContentPolicy.h"
// Factory Constructors
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWebBrowser)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWebBrowserContentPolicy)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCommandHandler)
-static NS_METHOD
-RegisterContentPolicy(nsIComponentManager *aCompMgr, nsIFile *aPath,
- const char *registryLocation, const char *componentType,
- const nsModuleComponentInfo *info)
-{
- nsresult rv;
- nsCOMPtr<nsICategoryManager> catman =
- do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
- if (NS_FAILED(rv)) return rv;
- nsXPIDLCString previous;
- return catman->AddCategoryEntry("content-policy",
- NS_WEBBROWSERCONTENTPOLICY_CONTRACTID,
- NS_WEBBROWSERCONTENTPOLICY_CONTRACTID,
- PR_TRUE, PR_TRUE, getter_Copies(previous));
-}
+NS_DEFINE_NAMED_CID(NS_WEBBROWSER_CID);
+NS_DEFINE_NAMED_CID(NS_COMMANDHANDLER_CID);
+NS_DEFINE_NAMED_CID(NS_WEBBROWSERCONTENTPOLICY_CID);
-static NS_METHOD
-UnregisterContentPolicy(nsIComponentManager *aCompMgr, nsIFile *aPath,
- const char *registryLocation,
- const nsModuleComponentInfo *info)
-{
- nsresult rv;
- nsCOMPtr<nsICategoryManager> catman =
- do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
- if (NS_FAILED(rv)) return rv;
-
- return catman->DeleteCategoryEntry("content-policy",
- NS_WEBBROWSERCONTENTPOLICY_CONTRACTID,
- PR_TRUE);
-}
-
-// Component Table
-
-static const nsModuleComponentInfo components[] =
-{
- { "WebBrowser Component", NS_WEBBROWSER_CID,
- NS_WEBBROWSER_CONTRACTID, nsWebBrowserConstructor },
- { "CommandHandler Component", NS_COMMANDHANDLER_CID,
- NS_COMMANDHANDLER_CONTRACTID, nsCommandHandlerConstructor },
- { "nsIWebBrowserSetup content policy enforcer",
- NS_WEBBROWSERCONTENTPOLICY_CID,
- NS_WEBBROWSERCONTENTPOLICY_CONTRACTID,
- nsWebBrowserContentPolicyConstructor,
- RegisterContentPolicy, UnregisterContentPolicy }
+static const mozilla::Module::CIDEntry kWebBrowserCIDs[] = {
+ { &kNS_WEBBROWSER_CID, false, NULL, nsWebBrowserConstructor },
+ { &kNS_COMMANDHANDLER_CID, false, NULL, nsCommandHandlerConstructor },
+ { &kNS_WEBBROWSERCONTENTPOLICY_CID, false, NULL, nsWebBrowserContentPolicyConstructor },
+ { NULL }
};
+static const mozilla::Module::ContractIDEntry kWebBrowserContracts[] = {
+ { NS_WEBBROWSER_CONTRACTID, &kNS_WEBBROWSER_CID },
+ { NS_COMMANDHANDLER_CONTRACTID, &kNS_COMMANDHANDLER_CID },
+ { NS_WEBBROWSERCONTENTPOLICY_CONTRACTID, &kNS_WEBBROWSERCONTENTPOLICY_CID },
+ { NULL }
+};
-// NSGetModule implementation.
+static const mozilla::Module::CategoryEntry kWebBrowserCategories[] = {
+ { "content-policy", NS_WEBBROWSERCONTENTPOLICY_CONTRACTID, NS_WEBBROWSERCONTENTPOLICY_CONTRACTID },
+ { NULL }
+};
-NS_IMPL_NSGETMODULE(Browser_Embedding_Module, components)
+static const mozilla::Module kWebBrowserModule = {
+ mozilla::Module::kVersion,
+ kWebBrowserCIDs,
+ kWebBrowserContracts,
+ kWebBrowserCategories
+};
+
+NSMODULE_DEFN(Browser_Embedding_Module) = &kWebBrowserModule;
--- a/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
+++ b/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp
@@ -40,17 +40,16 @@
*
* ***** END LICENSE BLOCK ***** */
// Local Includes
#include "nsDocShellTreeOwner.h"
#include "nsWebBrowser.h"
// Helper Classes
-#include "nsIGenericFactory.h"
#include "nsStyleCoord.h"
#include "nsSize.h"
#include "nsHTMLReflowState.h"
#include "nsIServiceManager.h"
#include "nsComponentManagerUtils.h"
#include "nsXPIDLString.h"
#include "nsIAtom.h"
#include "nsReadableUtils.h"
--- a/embedding/components/build/nsEmbeddingModule.cpp
+++ b/embedding/components/build/nsEmbeddingModule.cpp
@@ -30,17 +30,17 @@
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-#include "nsIGenericFactory.h"
+#include "mozilla/ModuleUtils.h"
#include "nsDialogParamBlock.h"
#include "nsPromptService.h"
#include "nsWindowWatcher.h"
#include "nsAppStartupNotifier.h"
#include "nsFind.h"
#include "nsWebBrowserFind.h"
#include "nsWebBrowserPersist.h"
#include "nsCommandManager.h"
@@ -85,31 +85,31 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsBaseCom
#define NS_DEFAULTAUTHPROMPT_CID \
{ /* ca200860-4696-40d7-88fa-4490d423a8ef */ \
0xca200860, \
0x4696, \
0x40d7, \
{0x88, 0xfa, 0x44, 0x90, 0xd4, 0x23, 0xa8, 0xef} \
}
-static NS_METHOD
+static nsresult
nsDefaultPromptConstructor(nsISupports *outer, const nsIID &iid, void **result)
{
if (outer)
return NS_ERROR_NO_AGGREGATION;
nsCOMPtr<nsIPrompt> prompt;
nsresult rv = NS_NewPrompter(getter_AddRefs(prompt), nsnull);
if (NS_FAILED(rv))
return rv;
return prompt->QueryInterface(iid, result);
}
-static NS_METHOD
+static nsresult
nsDefaultAuthPromptConstructor(nsISupports *outer, const nsIID &iid, void **result)
{
if (outer)
return NS_ERROR_NO_AGGREGATION;
nsCOMPtr<nsIAuthPrompt> prompt;
nsresult rv = NS_NewAuthPrompter(getter_AddRefs(prompt), nsnull);
if (NS_FAILED(rv))
@@ -123,35 +123,89 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsDialogP
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPromptService, Init)
#ifdef NS_PRINTING
#ifndef WINCE
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintingPromptService, Init)
#endif
#endif
#endif
-static const nsModuleComponentInfo gComponents[] = {
-
#ifdef MOZ_XUL
- { "Dialog ParamBlock", NS_DIALOGPARAMBLOCK_CID, NS_DIALOGPARAMBLOCK_CONTRACTID, nsDialogParamBlockConstructor },
- { "Prompt Service", NS_PROMPTSERVICE_CID, NS_PROMPTSERVICE_CONTRACTID, nsPromptServiceConstructor },
+NS_DEFINE_NAMED_CID(NS_DIALOGPARAMBLOCK_CID);
+NS_DEFINE_NAMED_CID(NS_PROMPTSERVICE_CID);
#ifdef NS_PRINTING
#ifndef WINCE
- { "Printing Prompt Service", NS_PRINTINGPROMPTSERVICE_CID, NS_PRINTINGPROMPTSERVICE_CONTRACTID, nsPrintingPromptServiceConstructor },
+NS_DEFINE_NAMED_CID(NS_PRINTINGPROMPTSERVICE_CID);
+#endif
+#endif
+#endif
+NS_DEFINE_NAMED_CID(NS_WINDOWWATCHER_CID);
+NS_DEFINE_NAMED_CID(NS_FIND_CID);
+NS_DEFINE_NAMED_CID(NS_WEB_BROWSER_FIND_CID);
+NS_DEFINE_NAMED_CID(NS_APPSTARTUPNOTIFIER_CID);
+NS_DEFINE_NAMED_CID(NS_WEBBROWSERPERSIST_CID);
+NS_DEFINE_NAMED_CID(NS_CONTROLLERCOMMANDTABLE_CID);
+NS_DEFINE_NAMED_CID(NS_COMMAND_MANAGER_CID);
+NS_DEFINE_NAMED_CID(NS_COMMAND_PARAMS_CID);
+NS_DEFINE_NAMED_CID(NS_CONTROLLER_COMMAND_GROUP_CID);
+NS_DEFINE_NAMED_CID(NS_BASECOMMANDCONTROLLER_CID);
+NS_DEFINE_NAMED_CID(NS_DEFAULTPROMPT_CID);
+NS_DEFINE_NAMED_CID(NS_DEFAULTAUTHPROMPT_CID);
+
+
+static const mozilla::Module::CIDEntry kEmbeddingCIDs[] = {
+#ifdef MOZ_XUL
+ { &kNS_DIALOGPARAMBLOCK_CID, false, NULL, nsDialogParamBlockConstructor },
+ { &kNS_PROMPTSERVICE_CID, false, NULL, nsPromptServiceConstructor },
+#ifdef NS_PRINTING
+#ifndef WINCE
+ { &kNS_PRINTINGPROMPTSERVICE_CID, false, NULL, nsPrintingPromptServiceConstructor },
#endif
#endif
#endif
- { "Window Watcher", NS_WINDOWWATCHER_CID, NS_WINDOWWATCHER_CONTRACTID, nsWindowWatcherConstructor },
- { "Window Watcher", NS_WINDOWWATCHER_CID, NS_AUTHPROMPT_ADAPTER_FACTORY_CONTRACTID, nsWindowWatcherConstructor },
- { "Find", NS_FIND_CID, NS_FIND_CONTRACTID, nsFindConstructor },
- { "WebBrowserFind", NS_WEB_BROWSER_FIND_CID, NS_WEB_BROWSER_FIND_CONTRACTID, nsWebBrowserFindConstructor },
- { NS_APPSTARTUPNOTIFIER_CLASSNAME, NS_APPSTARTUPNOTIFIER_CID, NS_APPSTARTUPNOTIFIER_CONTRACTID, nsAppStartupNotifierConstructor },
- { "WebBrowserPersist Component", NS_WEBBROWSERPERSIST_CID, NS_WEBBROWSERPERSIST_CONTRACTID, nsWebBrowserPersistConstructor },
- { "Controller Command Table", NS_CONTROLLERCOMMANDTABLE_CID, NS_CONTROLLERCOMMANDTABLE_CONTRACTID, nsControllerCommandTableConstructor },
- { "Command Manager", NS_COMMAND_MANAGER_CID, NS_COMMAND_MANAGER_CONTRACTID, nsCommandManagerConstructor },
- { "Command Params", NS_COMMAND_PARAMS_CID, NS_COMMAND_PARAMS_CONTRACTID, nsCommandParamsConstructor },
- { "Command Group", NS_CONTROLLER_COMMAND_GROUP_CID, NS_CONTROLLER_COMMAND_GROUP_CONTRACTID, nsControllerCommandGroupConstructor },
- { "Base Command Controller", NS_BASECOMMANDCONTROLLER_CID, NS_BASECOMMANDCONTROLLER_CONTRACTID, nsBaseCommandControllerConstructor },
- { NS_DEFAULTPROMPT_CLASSNAME, NS_DEFAULTPROMPT_CID, NS_DEFAULTPROMPT_CONTRACTID, nsDefaultPromptConstructor },
- { NS_DEFAULTAUTHPROMPT_CLASSNAME, NS_DEFAULTAUTHPROMPT_CID, NS_DEFAULTAUTHPROMPT_CONTRACTID, nsDefaultAuthPromptConstructor }
+ { &kNS_WINDOWWATCHER_CID, false, NULL, nsWindowWatcherConstructor },
+ { &kNS_FIND_CID, false, NULL, nsFindConstructor },
+ { &kNS_WEB_BROWSER_FIND_CID, false, NULL, nsWebBrowserFindConstructor },
+ { &kNS_APPSTARTUPNOTIFIER_CID, false, NULL, nsAppStartupNotifierConstructor },
+ { &kNS_WEBBROWSERPERSIST_CID, false, NULL, nsWebBrowserPersistConstructor },
+ { &kNS_CONTROLLERCOMMANDTABLE_CID, false, NULL, nsControllerCommandTableConstructor },
+ { &kNS_COMMAND_MANAGER_CID, false, NULL, nsCommandManagerConstructor },
+ { &kNS_COMMAND_PARAMS_CID, false, NULL, nsCommandParamsConstructor },
+ { &kNS_CONTROLLER_COMMAND_GROUP_CID, false, NULL, nsControllerCommandGroupConstructor },
+ { &kNS_BASECOMMANDCONTROLLER_CID, false, NULL, nsBaseCommandControllerConstructor },
+ { &kNS_DEFAULTPROMPT_CID, false, NULL, nsDefaultPromptConstructor },
+ { &kNS_DEFAULTAUTHPROMPT_CID, false, NULL, nsDefaultAuthPromptConstructor },
+ { NULL }
};
-NS_IMPL_NSGETMODULE(embedcomponents, gComponents)
+static const mozilla::Module::ContractIDEntry kEmbeddingContracts[] = {
+#ifdef MOZ_XUL
+ { NS_DIALOGPARAMBLOCK_CONTRACTID, &kNS_DIALOGPARAMBLOCK_CID },
+ { NS_PROMPTSERVICE_CONTRACTID, &kNS_PROMPTSERVICE_CID },
+#ifdef NS_PRINTING
+#ifndef WINCE
+ { NS_PRINTINGPROMPTSERVICE_CONTRACTID, &kNS_PRINTINGPROMPTSERVICE_CID },
+#endif
+#endif
+#endif
+ { NS_WINDOWWATCHER_CONTRACTID, &kNS_WINDOWWATCHER_CID },
+ { NS_AUTHPROMPT_ADAPTER_FACTORY_CONTRACTID, &kNS_WINDOWWATCHER_CID },
+ { NS_FIND_CONTRACTID, &kNS_FIND_CID },
+ { NS_WEB_BROWSER_FIND_CONTRACTID, &kNS_WEB_BROWSER_FIND_CID },
+ { NS_APPSTARTUPNOTIFIER_CONTRACTID, &kNS_APPSTARTUPNOTIFIER_CID },
+ { NS_WEBBROWSERPERSIST_CONTRACTID, &kNS_WEBBROWSERPERSIST_CID },
+ { NS_CONTROLLERCOMMANDTABLE_CONTRACTID, &kNS_CONTROLLERCOMMANDTABLE_CID },
+ { NS_COMMAND_MANAGER_CONTRACTID, &kNS_COMMAND_MANAGER_CID },
+ { NS_COMMAND_PARAMS_CONTRACTID, &kNS_COMMAND_PARAMS_CID },
+ { NS_CONTROLLER_COMMAND_GROUP_CONTRACTID, &kNS_CONTROLLER_COMMAND_GROUP_CID },
+ { NS_BASECOMMANDCONTROLLER_CONTRACTID, &kNS_BASECOMMANDCONTROLLER_CID },
+ { NS_DEFAULTPROMPT_CONTRACTID, &kNS_DEFAULTPROMPT_CID },
+ { NS_DEFAULTAUTHPROMPT_CONTRACTID, &kNS_DEFAULTAUTHPROMPT_CID },
+ { NULL }
+};
+
+static const mozilla::Module kEmbeddingModule = {
+ mozilla::Module::kVersion,
+ kEmbeddingCIDs,
+ kEmbeddingContracts
+};
+
+NSMODULE_DEFN(embedcomponents) = &kEmbeddingModule;
--- a/embedding/components/windowwatcher/src/nsWindowWatcher.cpp
+++ b/embedding/components/windowwatcher/src/nsWindowWatcher.cpp
@@ -61,17 +61,16 @@
#include "nsIDOMWindow.h"
#include "nsIDOMChromeWindow.h"
#include "nsIDOMWindowInternal.h"
#include "nsIDOMModalContentWindow.h"
#include "nsIScriptObjectPrincipal.h"
#include "nsIScreen.h"
#include "nsIScreenManager.h"
#include "nsIScriptContext.h"
-#include "nsIGenericFactory.h"
#include "nsIJSContextStack.h"
#include "nsIObserverService.h"
#include "nsIScriptGlobalObject.h"
#include "nsIScriptSecurityManager.h"
#include "nsXPCOM.h"
#include "nsIURI.h"
#include "nsIWebBrowser.h"
#include "nsIWebBrowserChrome.h"
--- a/extensions/auth/nsAuthFactory.cpp
+++ b/extensions/auth/nsAuthFactory.cpp
@@ -29,17 +29,17 @@
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-#include "nsIGenericFactory.h"
+#include "mozilla/ModuleUtils.h"
#include "nsAuth.h"
//-----------------------------------------------------------------------------
#define NS_HTTPNEGOTIATEAUTH_CID \
{ /* 75c80fd0-accb-432c-af59-ec60668c3990 */ \
0x75c80fd0, \
0xaccb, \
@@ -66,33 +66,33 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpNeg
{0x8c, 0xd6, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66} \
}
#include "nsAuthGSSAPI.h"
#if defined( USE_SSPI )
#include "nsAuthSSPI.h"
-static NS_METHOD
+static nsresult
nsSysNTLMAuthConstructor(nsISupports *outer, REFNSIID iid, void **result)
{
if (outer)
return NS_ERROR_NO_AGGREGATION;
nsAuthSSPI *auth = new nsAuthSSPI(PACKAGE_TYPE_NTLM);
if (!auth)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(auth);
nsresult rv = auth->QueryInterface(iid, result);
NS_RELEASE(auth);
return rv;
}
-static NS_METHOD
+static nsresult
nsKerbSSPIAuthConstructor(nsISupports *outer, REFNSIID iid, void **result)
{
if (outer)
return NS_ERROR_NO_AGGREGATION;
nsAuthSSPI *auth = new nsAuthSSPI(PACKAGE_TYPE_KERBEROS);
if (!auth)
return NS_ERROR_OUT_OF_MEMORY;
@@ -133,17 +133,17 @@ nsKerbSSPIAuthConstructor(nsISupports *o
{ /* bc54f001-6eb0-4e32-9f49-7e064d8e70ef */ \
0xbc54f001, \
0x6eb0, \
0x4e32, \
{0x9f, 0x49, 0x7e, 0x06, 0x4d, 0x8e, 0x70, 0xef} \
}
#include "nsAuthSambaNTLM.h"
-static NS_METHOD
+static nsresult
nsSambaNTLMAuthConstructor(nsISupports *outer, REFNSIID iid, void **result)
{
if (outer)
return NS_ERROR_NO_AGGREGATION;
nsCOMPtr<nsAuthSambaNTLM> auth = new nsAuthSambaNTLM();
if (!auth)
return NS_ERROR_OUT_OF_MEMORY;
@@ -154,33 +154,33 @@ nsSambaNTLMAuthConstructor(nsISupports *
return rv;
}
return auth->QueryInterface(iid, result);
}
#endif
-static NS_METHOD
+static nsresult
nsKerbGSSAPIAuthConstructor(nsISupports *outer, REFNSIID iid, void **result)
{
if (outer)
return NS_ERROR_NO_AGGREGATION;
nsAuthGSSAPI *auth = new nsAuthGSSAPI(PACKAGE_TYPE_KERBEROS);
if (!auth)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(auth);
nsresult rv = auth->QueryInterface(iid, result);
NS_RELEASE(auth);
return rv;
}
-static NS_METHOD
+static nsresult
nsGSSAPIAuthConstructor(nsISupports *outer, REFNSIID iid, void **result)
{
if (outer)
return NS_ERROR_NO_AGGREGATION;
nsAuthGSSAPI *auth = new nsAuthGSSAPI(PACKAGE_TYPE_NEGOTIATE);
if (!auth)
return NS_ERROR_OUT_OF_MEMORY;
@@ -202,79 +202,83 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsAuthSSP
0x72cc, \
0x480f, \
{0x93, 0x4b, 0x14, 0x8e, 0x33, 0xc2, 0x28, 0xa6} \
}
#include "nsAuthSASL.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAuthSASL)
-//-----------------------------------------------------------------------------
+NS_DEFINE_NAMED_CID(NS_GSSAUTH_CID);
+NS_DEFINE_NAMED_CID(NS_NEGOTIATEAUTH_CID);
+#if defined( USE_SSPI )
+NS_DEFINE_NAMED_CID(NS_NEGOTIATEAUTHSSPI_CID);
+NS_DEFINE_NAMED_CID(NS_KERBAUTHSSPI_CID);
+NS_DEFINE_NAMED_CID(NS_SYSNTLMAUTH_CID);
+#else
+NS_DEFINE_NAMED_CID(NS_SAMBANTLMAUTH_CID);
+#endif
+NS_DEFINE_NAMED_CID(NS_HTTPNEGOTIATEAUTH_CID);
+NS_DEFINE_NAMED_CID(NS_AUTHSASL_CID);
-static const nsModuleComponentInfo components[] = {
- { "nsAuthKerbGSS",
- NS_GSSAUTH_CID,
- NS_AUTH_MODULE_CONTRACTID_PREFIX "kerb-gss",
- nsKerbGSSAPIAuthConstructor
- },
- { "nsAuthNegoGSSAPI",
- NS_NEGOTIATEAUTH_CID,
- NS_AUTH_MODULE_CONTRACTID_PREFIX "negotiate-gss",
- nsGSSAPIAuthConstructor
- },
+
+static const mozilla::Module::CIDEntry kAuthCIDs[] = {
+ { &kNS_GSSAUTH_CID, false, NULL, nsKerbGSSAPIAuthConstructor },
+ { &kNS_NEGOTIATEAUTH_CID, false, NULL, nsGSSAPIAuthConstructor },
#if defined( USE_SSPI )
- { "nsAuthNegoSSPI",
- NS_NEGOTIATEAUTHSSPI_CID,
- NS_AUTH_MODULE_CONTRACTID_PREFIX "negotiate-sspi",
- nsAuthSSPIConstructor
- },
- { "nsAuthKerbSSPI",
- NS_KERBAUTHSSPI_CID,
- NS_AUTH_MODULE_CONTRACTID_PREFIX "kerb-sspi",
- nsKerbSSPIAuthConstructor
- },
- { "nsAuthSYSNTLM",
- NS_SYSNTLMAUTH_CID,
- NS_AUTH_MODULE_CONTRACTID_PREFIX "sys-ntlm",
- nsSysNTLMAuthConstructor
- },
+ { &kNS_NEGOTIATEAUTHSSPI_CID, false, NULL, nsAuthSSPIConstructor },
+ { &kNS_KERBAUTHSSPI_CID, false, NULL, nsKerbSSPIAuthConstructor },
+ { &kNS_SYSNTLMAUTH_CID, false, NULL, nsSysNTLMAuthConstructor },
#else
- { "nsAuthSambaNTLM",
- NS_SAMBANTLMAUTH_CID,
- NS_AUTH_MODULE_CONTRACTID_PREFIX "sys-ntlm",
- nsSambaNTLMAuthConstructor
- },
+ { &kNS_SAMBANTLMAUTH_CID, false, NULL, nsSambaNTLMAuthConstructor },
#endif
- { "nsHttpNegotiateAuth",
- NS_HTTPNEGOTIATEAUTH_CID,
- NS_HTTP_AUTHENTICATOR_CONTRACTID_PREFIX "negotiate",
- nsHttpNegotiateAuthConstructor
- },
- { "nsAuthSASL",
- NS_AUTHSASL_CID,
- NS_AUTH_MODULE_CONTRACTID_PREFIX "sasl-gssapi",
- nsAuthSASLConstructor
- }
+ { &kNS_HTTPNEGOTIATEAUTH_CID, false, NULL, nsHttpNegotiateAuthConstructor },
+ { &kNS_AUTHSASL_CID, false, NULL, nsAuthSASLConstructor },
+ { NULL }
+};
+
+static const mozilla::Module::ContractIDEntry kAuthContracts[] = {
+ { NS_AUTH_MODULE_CONTRACTID_PREFIX "kerb-gss", &kNS_GSSAUTH_CID },
+ { NS_AUTH_MODULE_CONTRACTID_PREFIX "negotiate-gss", &kNS_NEGOTIATEAUTH_CID },
+#if defined( USE_SSPI )
+ { NS_AUTH_MODULE_CONTRACTID_PREFIX "negotiate-sspi", &kNS_NEGOTIATEAUTHSSPI_CID },
+ { NS_AUTH_MODULE_CONTRACTID_PREFIX "kerb-sspi", &kNS_KERBAUTHSSPI_CID },
+ { NS_AUTH_MODULE_CONTRACTID_PREFIX "sys-ntlm", &kNS_SYSNTLMAUTH_CID },
+#else
+ { NS_AUTH_MODULE_CONTRACTID_PREFIX "sys-ntlm", &kNS_SAMBANTLMAUTH_CID },
+#endif
+ { NS_HTTP_AUTHENTICATOR_CONTRACTID_PREFIX "negotiate", &kNS_HTTPNEGOTIATEAUTH_CID },
+ { NS_AUTH_MODULE_CONTRACTID_PREFIX "sasl-gssapi", &kNS_AUTHSASL_CID },
+ { NULL }
};
//-----------------------------------------------------------------------------
#if defined( PR_LOGGING )
PRLogModuleInfo *gNegotiateLog;
// setup nspr logging ...
static nsresult
-InitNegotiateAuth(nsIModule *self)
+InitNegotiateAuth()
{
gNegotiateLog = PR_NewLogModule("negotiateauth");
return NS_OK;
}
#else
#define InitNegotiateAuth nsnull
#endif
static void
-DestroyNegotiateAuth(nsIModule *self)
+DestroyNegotiateAuth()
{
nsAuthGSSAPI::Shutdown();
}
-NS_IMPL_NSGETMODULE_WITH_CTOR_DTOR(nsAuthModule, components,
- InitNegotiateAuth, DestroyNegotiateAuth)
+static const mozilla::Module kAuthModule = {
+ mozilla::Module::kVersion,
+ kAuthCIDs,
+ kAuthContracts,
+ NULL,
+ NULL,
+ InitNegotiateAuth,
+ DestroyNegotiateAuth
+};
+
+NSMODULE_DEFN(nsAuthModule) = &kAuthModule;
--- a/extensions/cookie/nsCookieModule.cpp
+++ b/extensions/cookie/nsCookieModule.cpp
@@ -31,49 +31,52 @@
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-#include "nsIModule.h"
-#include "nsIGenericFactory.h"
+#include "mozilla/ModuleUtils.h"
#include "nsIServiceManager.h"
#include "nsPermissionManager.h"
#include "nsPopupWindowManager.h"
#include "nsICategoryManager.h"
#include "nsCookiePromptService.h"
#include "nsCookiePermission.h"
#include "nsXPIDLString.h"
// Define the constructor function for the objects
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPermissionManager, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPopupWindowManager, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsCookiePermission, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCookiePromptService)
-// The list of components we register
-static const nsModuleComponentInfo components[] = {
- { "PermissionManager",
- NS_PERMISSIONMANAGER_CID,
- NS_PERMISSIONMANAGER_CONTRACTID,
- nsPermissionManagerConstructor
- },
- { "PopupWindowManager",
- NS_POPUPWINDOWMANAGER_CID,
- NS_POPUPWINDOWMANAGER_CONTRACTID,
- nsPopupWindowManagerConstructor
- },
- { "CookiePromptService",
- NS_COOKIEPROMPTSERVICE_CID,
- NS_COOKIEPROMPTSERVICE_CONTRACTID,
- nsCookiePromptServiceConstructor
- },
- { "CookiePermission",
- NS_COOKIEPERMISSION_CID,
- NS_COOKIEPERMISSION_CONTRACTID,
- nsCookiePermissionConstructor
- }
+NS_DEFINE_NAMED_CID(NS_PERMISSIONMANAGER_CID);
+NS_DEFINE_NAMED_CID(NS_POPUPWINDOWMANAGER_CID);
+NS_DEFINE_NAMED_CID(NS_COOKIEPROMPTSERVICE_CID);
+NS_DEFINE_NAMED_CID(NS_COOKIEPERMISSION_CID);
+
+
+static const mozilla::Module::CIDEntry kCookieCIDs[] = {
+ { &kNS_PERMISSIONMANAGER_CID, false, NULL, nsPermissionManagerConstructor },
+ { &kNS_POPUPWINDOWMANAGER_CID, false, NULL, nsPopupWindowManagerConstructor },
+ { &kNS_COOKIEPROMPTSERVICE_CID, false, NULL, nsCookiePromptServiceConstructor },
+ { &kNS_COOKIEPERMISSION_CID, false, NULL, nsCookiePermissionConstructor },
+ { NULL }
};
-NS_IMPL_NSGETMODULE(nsCookieModule, components)
+static const mozilla::Module::ContractIDEntry kCookieContracts[] = {
+ { NS_PERMISSIONMANAGER_CONTRACTID, &kNS_PERMISSIONMANAGER_CID },
+ { NS_POPUPWINDOWMANAGER_CONTRACTID, &kNS_POPUPWINDOWMANAGER_CID },
+ { NS_COOKIEPROMPTSERVICE_CONTRACTID, &kNS_COOKIEPROMPTSERVICE_CID },
+ { NS_COOKIEPERMISSION_CONTRACTID, &kNS_COOKIEPERMISSION_CID },
+ { NULL }
+};
+
+static const mozilla::Module kCookieModule = {
+ mozilla::Module::kVersion,
+ kCookieCIDs,
+ kCookieContracts
+};
+
+NSMODULE_DEFN(nsCookieModule) = &kCookieModule;
--- a/extensions/permissions/nsModuleFactory.cpp
+++ b/extensions/permissions/nsModuleFactory.cpp
@@ -29,60 +29,41 @@
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-#include "nsIModule.h"
-#include "nsIGenericFactory.h"
+#include "mozilla/ModuleUtils.h"
#include "nsIServiceManager.h"
#include "nsContentBlocker.h"
#include "nsXPIDLString.h"
-#include "nsICategoryManager.h"
// Define the constructor function for the objects
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsContentBlocker, Init)
-static NS_METHOD
-RegisterContentPolicy(nsIComponentManager *aCompMgr, nsIFile *aPath,
- const char *registryLocation, const char *componentType,
- const nsModuleComponentInfo *info)
-{
- nsresult rv;
- nsCOMPtr<nsICategoryManager> catman =
- do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
- if (NS_FAILED(rv)) return rv;
- nsXPIDLCString previous;
- return catman->AddCategoryEntry("content-policy",
- NS_CONTENTBLOCKER_CONTRACTID,
- NS_CONTENTBLOCKER_CONTRACTID,
- PR_TRUE, PR_TRUE, getter_Copies(previous));
-}
+NS_DEFINE_NAMED_CID(NS_CONTENTBLOCKER_CID);
-static NS_METHOD
-UnregisterContentPolicy(nsIComponentManager *aCompMgr, nsIFile *aPath,
- const char *registryLocation,
- const nsModuleComponentInfo *info)
-{
- nsresult rv;
- nsCOMPtr<nsICategoryManager> catman =
- do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
- if (NS_FAILED(rv)) return rv;
+static const mozilla::Module::CIDEntry kPermissionsCIDs[] = {
+ { &kNS_CONTENTBLOCKER_CID, false, NULL, nsContentBlockerConstructor },
+ { NULL }
+};
- return catman->DeleteCategoryEntry("content-policy",
- NS_CONTENTBLOCKER_CONTRACTID,
- PR_TRUE);
-}
-
-// The list of components we register
-static const nsModuleComponentInfo components[] = {
- { "ContentBlocker",
- NS_CONTENTBLOCKER_CID,
- NS_CONTENTBLOCKER_CONTRACTID,
- nsContentBlockerConstructor,
- RegisterContentPolicy, UnregisterContentPolicy
- }
+static const mozilla::Module::ContractIDEntry kPermissionsContracts[] = {
+ { NS_CONTENTBLOCKER_CONTRACTID, &kNS_CONTENTBLOCKER_CID },
+ { NULL }
};
-NS_IMPL_NSGETMODULE(nsPermissionsModule, components)
+static const mozilla::Module::CategoryEntry kPermissionsCategories[] = {
+ { "content-policy", NS_CONTENTBLOCKER_CONTRACTID, NS_CONTENTBLOCKER_CONTRACTID },
+ { NULL }
+};
+
+static const mozilla::Module kPermissionsModule = {
+ mozilla::Module::kVersion,
+ kPermissionsCIDs,
+ kPermissionsContracts,
+ kPermissionsCategories
+};
+
+NSMODULE_DEFN(nsPermissionsModule) = &kPermissionsModule;
--- a/extensions/pref/autoconfig/src/nsConfigFactory.cpp
+++ b/extensions/pref/autoconfig/src/nsConfigFactory.cpp
@@ -31,90 +31,59 @@
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-#include "nsIGenericFactory.h"
+#include "mozilla/ModuleUtils.h"
#include "nsAutoConfig.h"
#include "nsReadConfig.h"
#include "nsIAppStartupNotifier.h"
-#include "nsICategoryManager.h"
#if defined(MOZ_LDAP_XPCOM)
#include "nsLDAPSyncQuery.h"
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAutoConfig, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsReadConfig, Init)
#if defined(MOZ_LDAP_XPCOM)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsLDAPSyncQuery)
#endif
-// Registering nsReadConfig module as part of the app-startup category to get
-// it instantiated.
-
-static NS_METHOD
-RegisterReadConfig(nsIComponentManager *aCompMgr,
- nsIFile *aPath,
- const char *registryLocation,
- const char *componentType,
- const nsModuleComponentInfo *info)
-{
- nsresult rv;
- nsCOMPtr<nsICategoryManager>
- categoryManager(do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv));
- if (NS_SUCCEEDED(rv)) {
- rv = categoryManager->AddCategoryEntry("pref-config-startup",
- "ReadConfig Module",
- NS_READCONFIG_CONTRACTID,
- PR_TRUE, PR_TRUE, nsnull);
- }
- return rv;
-}
+NS_DEFINE_NAMED_CID(NS_AUTOCONFIG_CID);
+NS_DEFINE_NAMED_CID(NS_READCONFIG_CID);
+#if defined(MOZ_LDAP_XPCOM)
+NS_DEFINE_NAMED_CID(NS_LDAPSYNCQUERY_CID);
+#endif
-static NS_METHOD
-UnRegisterReadConfig(nsIComponentManager *aCompMgr,
- nsIFile *aPath,
- const char *registryLocation,
- const nsModuleComponentInfo *info)
-{
- nsresult rv;
- nsCOMPtr<nsICategoryManager>
- categoryManager(do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv));
- if (NS_SUCCEEDED(rv)) {
- rv = categoryManager->DeleteCategoryEntry(APPSTARTUP_CATEGORY,
- "ReadConfig Module", PR_TRUE);
- }
- return rv;
-}
-
-
-// The list of components we register
-static const nsModuleComponentInfo components[] =
-{
- {
- NS_AUTOCONFIG_CLASSNAME,
- NS_AUTOCONFIG_CID,
- NS_AUTOCONFIG_CONTRACTID,
- nsAutoConfigConstructor
- },
- {
- NS_READCONFIG_CLASSNAME,
- NS_READCONFIG_CID,
- NS_READCONFIG_CONTRACTID,
- nsReadConfigConstructor,
- RegisterReadConfig,
- UnRegisterReadConfig
- },
+static const mozilla::Module::CIDEntry kAutoConfigCIDs[] = {
+ { &kNS_AUTOCONFIG_CID, false, NULL, nsAutoConfigConstructor },
+ { &kNS_READCONFIG_CID, false, NULL, nsReadConfigConstructor },
#if defined(MOZ_LDAP_XPCOM)
- {
- "LDAPSyncQuery module",
- NS_LDAPSYNCQUERY_CID,
- "@mozilla.org/ldapsyncquery;1",
- nsLDAPSyncQueryConstructor
- },
+ { &kNS_LDAPSYNCQUERY_CID, false, NULL, nsLDAPSyncQueryConstructor },
#endif
+ { NULL }
};
-NS_IMPL_NSGETMODULE(nsAutoConfigModule, components)
+static const mozilla::Module::ContractIDEntry kAutoConfigContracts[] = {
+ { NS_AUTOCONFIG_CONTRACTID, &kNS_AUTOCONFIG_CID },
+ { NS_READCONFIG_CONTRACTID, &kNS_READCONFIG_CID },
+#if defined(MOZ_LDAP_XPCOM)
+ { "@mozilla.org/ldapsyncquery;1", &kNS_LDAPSYNCQUERY_CID },
+#endif
+ { NULL }
+};
+
+static const mozilla::Module::CategoryEntry kAutoConfigCategories[] = {
+ { "pref-config-startup", "ReadConfig Module", NS_READCONFIG_CONTRACTID },
+ { NULL }
+};
+
+static const mozilla::Module kAutoConfigModule = {
+ mozilla::Module::kVersion,
+ kAutoConfigCIDs,
+ kAutoConfigContracts,
+ kAutoConfigCategories
+};
+
+NSMODULE_DEFN(nsAutoConfigModule) = &kAutoConfigModule;
--- a/extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp
+++ b/extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp
@@ -40,17 +40,16 @@
// sorry, this has to be before the pre-compiled header
#define FORCE_PR_LOG /* Allow logging in the release build */
#endif
#include "jsapi.h"
#include "nsIXPCSecurityManager.h"
#include "nsIXPConnect.h"
#include "nsIJSRuntimeService.h"
#include "nsCOMPtr.h"
-#include "nsIGenericFactory.h"
#include "nsIServiceManager.h"
#include "nsIComponentManager.h"
#include "nsString.h"
#include "nsIPrefService.h"
#include "nsIJSContextStack.h"
#include "nspr.h"
extern PRLogModuleInfo *MCD;
--- a/extensions/spellcheck/hunspell/src/mozHunspellDirProvider.cpp
+++ b/extensions/spellcheck/hunspell/src/mozHunspellDirProvider.cpp
@@ -131,48 +131,10 @@ mozHunspellDirProvider::AppendingEnumera
mozHunspellDirProvider::AppendingEnumerator::AppendingEnumerator
(nsISimpleEnumerator* aBase) :
mBase(aBase)
{
// Initialize mNext to begin
GetNext(nsnull);
}
-NS_METHOD
-mozHunspellDirProvider::Register(nsIComponentManager* aCompMgr,
- nsIFile* aPath, const char *aLoaderStr,
- const char *aType,
- const nsModuleComponentInfo *aInfo)
-{
- nsresult rv;
-
- nsCOMPtr<nsICategoryManager> catMan =
- do_GetService(NS_CATEGORYMANAGER_CONTRACTID);
- if (!catMan)
- return NS_ERROR_FAILURE;
-
- rv = catMan->AddCategoryEntry(XPCOM_DIRECTORY_PROVIDER_CATEGORY,
- "spellcheck-directory-provider",
- kContractID, PR_TRUE, PR_TRUE, nsnull);
- return rv;
-}
-
-NS_METHOD
-mozHunspellDirProvider::Unregister(nsIComponentManager* aCompMgr,
- nsIFile* aPath,
- const char *aLoaderStr,
- const nsModuleComponentInfo *aInfo)
-{
- nsresult rv;
-
- nsCOMPtr<nsICategoryManager> catMan =
- do_GetService(NS_CATEGORYMANAGER_CONTRACTID);
- if (!catMan)
- return NS_ERROR_FAILURE;
-
- rv = catMan->DeleteCategoryEntry(XPCOM_DIRECTORY_PROVIDER_CATEGORY,
- "spellcheck-directory-provider",
- PR_TRUE);
- return rv;
-}
-
char const *const
mozHunspellDirProvider::kContractID = "@mozilla.org/spellcheck/dir-provider;1";
--- a/extensions/spellcheck/hunspell/src/mozHunspellDirProvider.h
+++ b/extensions/spellcheck/hunspell/src/mozHunspellDirProvider.h
@@ -32,36 +32,26 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
******* END LICENSE BLOCK *******/
#ifndef mozHunspellDirProvider_h__
#define mozHunspellDirProvider_h__
#include "nsIDirectoryService.h"
-#include "nsIGenericFactory.h"
#include "nsISimpleEnumerator.h"
class mozHunspellDirProvider :
public nsIDirectoryServiceProvider2
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIDIRECTORYSERVICEPROVIDER
NS_DECL_NSIDIRECTORYSERVICEPROVIDER2
- static NS_METHOD Register(nsIComponentManager* aCompMgr,
- nsIFile* aPath, const char *aLoaderStr,
- const char *aType,
- const nsModuleComponentInfo *aInfo);
-
- static NS_METHOD Unregister(nsIComponentManager* aCompMgr,
- nsIFile* aPath, const char *aLoaderStr,
- const nsModuleComponentInfo *aInfo);
-
static char const *const kContractID;
private:
class AppendingEnumerator : public nsISimpleEnumerator
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSISIMPLEENUMERATOR
--- a/extensions/spellcheck/src/mozSpellCheckerFactory.cpp
+++ b/extensions/spellcheck/src/mozSpellCheckerFactory.cpp
@@ -30,17 +30,17 @@
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-#include "nsIGenericFactory.h"
+#include "mozilla/ModuleUtils.h"
#ifdef MOZ_MACBROWSER
#include "mozOSXSpell.h"
#else
#include "mozHunspell.h"
#include "mozHunspellDirProvider.h"
#endif
@@ -55,22 +55,16 @@
0x8227F019, 0xAFC7, 0x461e, \
{ 0xB0, 0x30, 0x9F, 0x18, 0x5D, 0x7A, 0x0E, 0x29} }
#define MOZ_INLINESPELLCHECKER_CID \
{ /* 9FE5D975-09BD-44aa-A01A-66402EA28657 */ \
0x9fe5d975, 0x9bd, 0x44aa, \
{ 0xa0, 0x1a, 0x66, 0x40, 0x2e, 0xa2, 0x86, 0x57} }
-////////////////////////////////////////////////////////////////////////
-// Define the constructor function for the objects
-//
-// NOTE: This creates an instance of objects by using the default constructor
-//
-
#ifdef MOZ_MACBROWSER
NS_GENERIC_FACTORY_CONSTRUCTOR(mozOSXSpell)
#else
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(mozHunspell, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(mozHunspellDirProvider)
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(mozSpellChecker, Init)
@@ -78,17 +72,17 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(mozP
NS_GENERIC_FACTORY_CONSTRUCTOR(mozSpellI18NManager)
// This special constructor for the inline spell checker asks the inline
// spell checker if we can create spell checking objects at all (ie, if there
// are any dictionaries loaded) before trying to create one. The static
// CanEnableInlineSpellChecking caches the value so this will be faster (we
// have to run this code for every edit box we create, as well as for every
// right click in those edit boxes).
-static NS_IMETHODIMP
+static nsresult
mozInlineSpellCheckerConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult)
{
if (! mozInlineSpellChecker::CanEnableInlineSpellChecking())
return NS_ERROR_FAILURE;
nsresult rv;
@@ -107,68 +101,62 @@ mozInlineSpellCheckerConstructor(nsISupp
}
NS_ADDREF(inst);
rv = inst->QueryInterface(aIID, aResult);
NS_RELEASE(inst);
return rv;
}
-////////////////////////////////////////////////////////////////////////
-// Define a table of CIDs implemented by this module along with other
-// information like the function to create an instance, contractid, and
-// class name.
-//
-static const nsModuleComponentInfo components[] = {
#ifdef MOZ_MACBROWSER
- {
- "OSX Spell check service",
- MOZ_OSXSPELL_CID,
- MOZ_OSXSPELL_CONTRACTID,
- mozOSXSpellConstructor
- },
+NS_DEFINE_NAMED_CID(MOZ_OSXSPELL_CID);
#else
- {
- "mozHunspell",
- MOZ_HUNSPELL_CID,
- MOZ_HUNSPELL_CONTRACTID,
- mozHunspellConstructor
- },
- {
- "mozHunspellDirProvider",
- HUNSPELLDIRPROVIDER_CID,
- mozHunspellDirProvider::kContractID,
- mozHunspellDirProviderConstructor,
- mozHunspellDirProvider::Register,
- mozHunspellDirProvider::Unregister
- },
+NS_DEFINE_NAMED_CID(MOZ_HUNSPELL_CID);
+NS_DEFINE_NAMED_CID(HUNSPELLDIRPROVIDER_CID);
#endif // MOZ_MACBROWSER
- {
- NULL,
- NS_SPELLCHECKER_CID,
- NS_SPELLCHECKER_CONTRACTID,
- mozSpellCheckerConstructor
- },
- {
- NULL,
- MOZ_PERSONALDICTIONARY_CID,
- MOZ_PERSONALDICTIONARY_CONTRACTID,
- mozPersonalDictionaryConstructor
- },
- {
- NULL,
- MOZ_SPELLI18NMANAGER_CID,
- MOZ_SPELLI18NMANAGER_CONTRACTID,
- mozSpellI18NManagerConstructor
- },
- {
- NULL,
- MOZ_INLINESPELLCHECKER_CID,
- MOZ_INLINESPELLCHECKER_CONTRACTID,
- mozInlineSpellCheckerConstructor
- }
+NS_DEFINE_NAMED_CID(NS_SPELLCHECKER_CID);
+NS_DEFINE_NAMED_CID(MOZ_PERSONALDICTIONARY_CID);
+NS_DEFINE_NAMED_CID(MOZ_SPELLI18NMANAGER_CID);
+NS_DEFINE_NAMED_CID(MOZ_INLINESPELLCHECKER_CID);
+
+static const mozilla::Module::CIDEntry kSpellcheckCIDs[] = {
+#ifdef MOZ_MACBROWSER
+ { &kMOZ_OSXSPELL_CID, false, NULL, mozOSXSpellConstructor },
+#else
+ { &kMOZ_HUNSPELL_CID, false, NULL, mozHunspellConstructor },
+ { &kHUNSPELLDIRPROVIDER_CID, false, NULL, mozHunspellDirProviderConstructor },
+#endif // MOZ_MACBROWSER
+ { &kNS_SPELLCHECKER_CID, false, NULL, mozSpellCheckerConstructor },
+ { &kMOZ_PERSONALDICTIONARY_CID, false, NULL, mozPersonalDictionaryConstructor },
+ { &kMOZ_SPELLI18NMANAGER_CID, false, NULL, mozSpellI18NManagerConstructor },
+ { &kMOZ_INLINESPELLCHECKER_CID, false, NULL, mozInlineSpellCheckerConstructor },
+ { NULL }
};
-////////////////////////////////////////////////////////////////////////
-// Implement the NSGetModule() exported function for your module
-// and the entire implementation of the module object.
-//
-NS_IMPL_NSGETMODULE(mozSpellCheckerModule, components)
+static const mozilla::Module::ContractIDEntry kSpellcheckContracts[] = {
+#ifdef MOZ_MACBROWSER
+ { MOZ_OSXSPELL_CONTRACTID, &kMOZ_OSXSPELL_CID },
+#else
+ { MOZ_HUNSPELL_CONTRACTID, &kMOZ_HUNSPELL_CID },
+ { mozHunspellDirProvider::kContractID, &kHUNSPELLDIRPROVIDER_CID },
+#endif // MOZ_MACBROWSER
+ { NS_SPELLCHECKER_CONTRACTID, &kNS_SPELLCHECKER_CID },
+ { MOZ_PERSONALDICTIONARY_CONTRACTID, &kMOZ_PERSONALDICTIONARY_CID },
+ { MOZ_SPELLI18NMANAGER_CONTRACTID, &kMOZ_SPELLI18NMANAGER_CID },
+ { MOZ_INLINESPELLCHECKER_CONTRACTID, &kMOZ_INLINESPELLCHECKER_CID },
+ { NULL }
+};
+
+static const mozilla::Module::CategoryEntry kSpellcheckCategories[] = {
+#ifndef MOZ_MACBROWSER
+ { XPCOM_DIRECTORY_PROVIDER_CATEGORY, "spellcheck-directory-provider", mozHunspellDirProvider::kContractID },
+#endif
+ { NULL }
+};
+
+const mozilla::Module kSpellcheckModule = {
+ mozilla::Module::kVersion,
+ kSpellcheckCIDs,
+ kSpellcheckContracts,
+ kSpellcheckCategories
+};
+
+NSMODULE_DEFN(mozSpellCheckerModule) = &kSpellcheckModule;
--- a/extensions/universalchardet/src/xpcom/nsUniversalCharDetModule.cpp
+++ b/extensions/universalchardet/src/xpcom/nsUniversalCharDetModule.cpp
@@ -30,32 +30,31 @@
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
+#include "mozilla/ModuleUtils.h"
+
#include "nsICharsetAlias.h"
#include "nsCOMPtr.h"
-#include "nsIModule.h"
#include "nspr.h"
#include "nsString.h"
#include "pratom.h"
#include "nsUniversalCharDetDll.h"
#include "nsISupports.h"
#include "nsICategoryManager.h"
#include "nsIComponentManager.h"
-#include "nsIFactory.h"
#include "nsIServiceManager.h"
#include "nsICharsetDetector.h"
#include "nsIStringCharsetDetector.h"
-#include "nsIGenericFactory.h"
#include "nsUniversalDetector.h"
#include "nsUdetXPCOMWrapper.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUniversalXPCOMDetector)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUniversalXPCOMStringDetector)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsJAPSMDetector)
@@ -65,156 +64,78 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsKOStrin
NS_GENERIC_FACTORY_CONSTRUCTOR(nsZHTWPSMDetector)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsZHTWStringPSMDetector)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsZHCNPSMDetector)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsZHCNStringPSMDetector)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsZHPSMDetector)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsZHStringPSMDetector)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCJKPSMDetector)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCJKStringPSMDetector)
-
-//----------------------------------------
-static NS_METHOD
-AddCategoryEntry(const char* category,
- const char* key,
- const char* value)
-{
- nsresult rv;
- nsCOMPtr<nsICategoryManager>
- categoryManager(do_GetService("@mozilla.org/categorymanager;1", &rv));
- if (NS_FAILED(rv)) return rv;
-
- return categoryManager->AddCategoryEntry(category, key, value,
- PR_TRUE, PR_TRUE,
- nsnull);
-}
-
-static NS_METHOD nsUniversalCharDetectorRegistrationProc(nsIComponentManager *aCompMgr,
- nsIFile *aPath,
- const char *registryLocation,
- const char *componentType,
- const nsModuleComponentInfo *info)
-{
- return AddCategoryEntry(NS_CHARSET_DETECTOR_CATEGORY,
- "universal_charset_detector",
- info->mContractID);
-}
-
-static NS_METHOD
-nsJAPSMDetectorRegistrationProc(nsIComponentManager *aCompMgr,
- nsIFile *aPath,
- const char *registryLocation,
- const char *componentType,
- const nsModuleComponentInfo *info)
-{
- return AddCategoryEntry(NS_CHARSET_DETECTOR_CATEGORY,
- "ja_parallel_state_machine",
- info->mContractID);
-}
-
-static NS_METHOD
-nsKOPSMDetectorRegistrationProc(nsIComponentManager *aCompMgr,
- nsIFile *aPath,
- const char *registryLocation,
- const char *componentType,
- const nsModuleComponentInfo *info)
-{
- return AddCategoryEntry(NS_CHARSET_DETECTOR_CATEGORY,
- "ko_parallel_state_machine",
- info->mContractID);
-}
-
-static NS_METHOD
-nsZHTWPSMDetectorRegistrationProc(nsIComponentManager *aCompMgr,
- nsIFile *aPath,
- const char *registryLocation,
- const char *componentType,
- const nsModuleComponentInfo *info)
-{
- return AddCategoryEntry(NS_CHARSET_DETECTOR_CATEGORY,
- "zhtw_parallel_state_machine",
- info->mContractID);
-}
+NS_DEFINE_NAMED_CID(NS_UNIVERSAL_DETECTOR_CID);
+NS_DEFINE_NAMED_CID(NS_UNIVERSAL_STRING_DETECTOR_CID);
+NS_DEFINE_NAMED_CID(NS_JA_PSMDETECTOR_CID);
+NS_DEFINE_NAMED_CID(NS_JA_STRING_PSMDETECTOR_CID);
+NS_DEFINE_NAMED_CID(NS_KO_PSMDETECTOR_CID);
+NS_DEFINE_NAMED_CID(NS_KO_STRING_PSMDETECTOR_CID);
+NS_DEFINE_NAMED_CID(NS_ZHTW_PSMDETECTOR_CID);
+NS_DEFINE_NAMED_CID(NS_ZHTW_STRING_PSMDETECTOR_CID);
+NS_DEFINE_NAMED_CID(NS_ZHCN_PSMDETECTOR_CID);
+NS_DEFINE_NAMED_CID(NS_ZHCN_STRING_PSMDETECTOR_CID);
+NS_DEFINE_NAMED_CID(NS_ZH_PSMDETECTOR_CID);
+NS_DEFINE_NAMED_CID(NS_ZH_STRING_PSMDETECTOR_CID);
+NS_DEFINE_NAMED_CID(NS_CJK_PSMDETECTOR_CID);
+NS_DEFINE_NAMED_CID(NS_CJK_STRING_PSMDETECTOR_CID);
-static NS_METHOD
-nsZHCNPSMDetectorRegistrationProc(nsIComponentManager *aCompMgr,
- nsIFile *aPath,
- const char *registryLocation,
- const char *componentType,
- const nsModuleComponentInfo *info)
-{
- return AddCategoryEntry(NS_CHARSET_DETECTOR_CATEGORY,
- "zhcn_parallel_state_machine",
- info->mContractID);
-}
-
-static NS_METHOD
-nsZHPSMDetectorRegistrationProc(nsIComponentManager *aCompMgr,
- nsIFile *aPath,
- const char *registryLocation,
- const char *componentType,
- const nsModuleComponentInfo *info)
-{
- return AddCategoryEntry(NS_CHARSET_DETECTOR_CATEGORY,
- "zh_parallel_state_machine",
- info->mContractID);
-}
-
-static NS_METHOD
-nsCJKPSMDetectorRegistrationProc(nsIComponentManager *aCompMgr,
- nsIFile *aPath,
- const char *registryLocation,
- const char *componentType,
- const nsModuleComponentInfo *info)
-{
- return AddCategoryEntry(NS_CHARSET_DETECTOR_CATEGORY,
- "cjk_parallel_state_machine",
- info->mContractID);
-}
-
-// Component Table
-static const nsModuleComponentInfo components[] =
-{
- { "Universal Charset Detector", NS_UNIVERSAL_DETECTOR_CID,
- NS_CHARSET_DETECTOR_CONTRACTID_BASE "universal_charset_detector", nsUniversalXPCOMDetectorConstructor,
- nsUniversalCharDetectorRegistrationProc, NULL},
- { "Universal String Charset Detector", NS_UNIVERSAL_STRING_DETECTOR_CID,
- NS_STRCDETECTOR_CONTRACTID_BASE "universal_charset_detector", nsUniversalXPCOMStringDetectorConstructor,
- NULL, NULL},
- { "PSM based Japanese Charset Detector", NS_JA_PSMDETECTOR_CID,
- NS_CHARSET_DETECTOR_CONTRACTID_BASE "ja_parallel_state_machine", nsJAPSMDetectorConstructor,
- nsJAPSMDetectorRegistrationProc, NULL},
- { "PSM based Japanese String Charset Detector", NS_JA_STRING_PSMDETECTOR_CID,
- NS_STRCDETECTOR_CONTRACTID_BASE "ja_parallel_state_machine", nsJAStringPSMDetectorConstructor,
- NULL, NULL},
- { "PSM based Korean Charset Detector", NS_KO_PSMDETECTOR_CID,
- NS_CHARSET_DETECTOR_CONTRACTID_BASE "ko_parallel_state_machine", nsKOPSMDetectorConstructor,
- nsKOPSMDetectorRegistrationProc, NULL},
- { "PSM based Korean String Charset Detector", NS_KO_STRING_PSMDETECTOR_CID,
- NS_STRCDETECTOR_CONTRACTID_BASE "ko_parallel_state_machine", nsKOStringPSMDetectorConstructor,
- NULL, NULL},
- { "PSM based Traditional Chinese Charset Detector", NS_ZHTW_PSMDETECTOR_CID,
- NS_CHARSET_DETECTOR_CONTRACTID_BASE "zhtw_parallel_state_machine", nsZHTWPSMDetectorConstructor,
- nsZHTWPSMDetectorRegistrationProc, NULL},
- { "PSM based Traditional Chinese String Charset Detector", NS_ZHTW_STRING_PSMDETECTOR_CID,
- NS_STRCDETECTOR_CONTRACTID_BASE "zhtw_parallel_state_machine", nsZHTWStringPSMDetectorConstructor,
- NULL, NULL},
- { "PSM based Simplified Chinese Charset Detector", NS_ZHCN_PSMDETECTOR_CID,
- NS_CHARSET_DETECTOR_CONTRACTID_BASE "zhcn_parallel_state_machine", nsZHCNPSMDetectorConstructor,
- nsZHCNPSMDetectorRegistrationProc, NULL},
- { "PSM based Simplified Chinese String Charset Detector", NS_ZHCN_STRING_PSMDETECTOR_CID,
- NS_STRCDETECTOR_CONTRACTID_BASE "zhcn_parallel_state_machine", nsZHCNStringPSMDetectorConstructor,
- NULL, NULL},
- { "PSM based Chinese Charset Detector", NS_ZH_PSMDETECTOR_CID,
- NS_CHARSET_DETECTOR_CONTRACTID_BASE "zh_parallel_state_machine", nsZHPSMDetectorConstructor,
- nsZHPSMDetectorRegistrationProc, NULL},
- { "PSM based Chinese String Charset Detector", NS_ZH_STRING_PSMDETECTOR_CID,
- NS_STRCDETECTOR_CONTRACTID_BASE "zh_parallel_state_machine", nsZHStringPSMDetectorConstructor,
- NULL, NULL},
- { "PSM based CJK Charset Detector", NS_CJK_PSMDETECTOR_CID,
- NS_CHARSET_DETECTOR_CONTRACTID_BASE "cjk_parallel_state_machine", nsCJKPSMDetectorConstructor,
- nsCJKPSMDetectorRegistrationProc, NULL},
- { "PSM based CJK String Charset Detector", NS_CJK_STRING_PSMDETECTOR_CID,
- NS_STRCDETECTOR_CONTRACTID_BASE "cjk_parallel_state_machine", nsCJKStringPSMDetectorConstructor,
- NULL, NULL},
+static const mozilla::Module::CIDEntry kChardetCIDs[] = {
+ { &kNS_UNIVERSAL_DETECTOR_CID, false, NULL, nsUniversalXPCOMDetectorConstructor },
+ { &kNS_UNIVERSAL_STRING_DETECTOR_CID, false, NULL, nsUniversalXPCOMStringDetectorConstructor },
+ { &kNS_JA_PSMDETECTOR_CID, false, NULL, nsJAPSMDetectorConstructor },
+ { &kNS_JA_STRING_PSMDETECTOR_CID, false, NULL, nsJAStringPSMDetectorConstructor },
+ { &kNS_KO_PSMDETECTOR_CID, false, NULL, nsKOPSMDetectorConstructor },
+ { &kNS_KO_STRING_PSMDETECTOR_CID, false, NULL, nsKOStringPSMDetectorConstructor },
+ { &kNS_ZHTW_PSMDETECTOR_CID, false, NULL, nsZHTWPSMDetectorConstructor },
+ { &kNS_ZHTW_STRING_PSMDETECTOR_CID, false, NULL, nsZHTWStringPSMDetectorConstructor },
+ { &kNS_ZHCN_PSMDETECTOR_CID, false, NULL, nsZHCNPSMDetectorConstructor },
+ { &kNS_ZHCN_STRING_PSMDETECTOR_CID, false, NULL, nsZHCNStringPSMDetectorConstructor },
+ { &kNS_ZH_PSMDETECTOR_CID, false, NULL, nsZHPSMDetectorConstructor },
+ { &kNS_ZH_STRING_PSMDETECTOR_CID, false, NULL, nsZHStringPSMDetectorConstructor },
+ { &kNS_CJK_PSMDETECTOR_CID, false, NULL, nsCJKPSMDetectorConstructor },
+ { &kNS_CJK_STRING_PSMDETECTOR_CID, false, NULL, nsCJKStringPSMDetectorConstructor },
+ { NULL }
};
-NS_IMPL_NSGETMODULE(nsUniversalCharDetModule, components)
+static const mozilla::Module::ContractIDEntry kChardetContracts[] = {
+ { NS_CHARSET_DETECTOR_CONTRACTID_BASE "universal_charset_detector", &kNS_UNIVERSAL_DETECTOR_CID },
+ { NS_STRCDETECTOR_CONTRACTID_BASE "universal_charset_detector", &kNS_UNIVERSAL_STRING_DETECTOR_CID },
+ { NS_CHARSET_DETECTOR_CONTRACTID_BASE "ja_parallel_state_machine", &kNS_JA_PSMDETECTOR_CID },
+ { NS_STRCDETECTOR_CONTRACTID_BASE "ja_parallel_state_machine", &kNS_JA_STRING_PSMDETECTOR_CID },
+ { NS_CHARSET_DETECTOR_CONTRACTID_BASE "ko_parallel_state_machine", &kNS_KO_PSMDETECTOR_CID },
+ { NS_STRCDETECTOR_CONTRACTID_BASE "ko_parallel_state_machine", &kNS_KO_STRING_PSMDETECTOR_CID },
+ { NS_CHARSET_DETECTOR_CONTRACTID_BASE "zhtw_parallel_state_machine", &kNS_ZHTW_PSMDETECTOR_CID },
+ { NS_STRCDETECTOR_CONTRACTID_BASE "zhtw_parallel_state_machine", &kNS_ZHTW_STRING_PSMDETECTOR_CID },
+ { NS_CHARSET_DETECTOR_CONTRACTID_BASE "zhcn_parallel_state_machine", &kNS_ZHCN_PSMDETECTOR_CID },
+ { NS_STRCDETECTOR_CONTRACTID_BASE "zhcn_parallel_state_machine", &kNS_ZHCN_STRING_PSMDETECTOR_CID },
+ { NS_CHARSET_DETECTOR_CONTRACTID_BASE "zh_parallel_state_machine", &kNS_ZH_PSMDETECTOR_CID },
+ { NS_STRCDETECTOR_CONTRACTID_BASE "zh_parallel_state_machine", &kNS_ZH_STRING_PSMDETECTOR_CID },
+ { NS_CHARSET_DETECTOR_CONTRACTID_BASE "cjk_parallel_state_machine", &kNS_CJK_PSMDETECTOR_CID },
+ { NS_STRCDETECTOR_CONTRACTID_BASE "cjk_parallel_state_machine", &kNS_CJK_STRING_PSMDETECTOR_CID },
+ { NULL }
+};
+
+static const mozilla::Module::CategoryEntry kChardetCategories[] = {
+ { NS_CHARSET_DETECTOR_CATEGORY, "universal_charset_detector", NS_CHARSET_DETECTOR_CONTRACTID_BASE "universal_charset_detector" },
+ { NS_CHARSET_DETECTOR_CATEGORY, "ja_parallel_state_machine", NS_CHARSET_DETECTOR_CONTRACTID_BASE "ja_parallel_state_machine" },
+ { NS_CHARSET_DETECTOR_CATEGORY, "ko_parallel_state_machine", NS_CHARSET_DETECTOR_CONTRACTID_BASE "ko_parallel_state_machine" },
+ { NS_CHARSET_DETECTOR_CATEGORY, "zhtw_parallel_state_machine", NS_CHARSET_DETECTOR_CONTRACTID_BASE "zhtw_parallel_state_machine" },
+ { NS_CHARSET_DETECTOR_CATEGORY, "zhcn_parallel_state_machine", NS_CHARSET_DETECTOR_CONTRACTID_BASE "zhcn_parallel_state_machine" },
+ { NS_CHARSET_DETECTOR_CATEGORY, "zh_parallel_state_machine", NS_CHARSET_DETECTOR_CONTRACTID_BASE "zh_parallel_state_machine" },
+ { NS_CHARSET_DETECTOR_CATEGORY, "cjk_parallel_state_machine", NS_CHARSET_DETECTOR_CONTRACTID_BASE "cjk_parallel_state_machine" },
+ { NULL }
+};
+
+static const mozilla::Module kChardetModule = {
+ mozilla::Module::kVersion,
+ kChardetCIDs,
+ kChardetContracts,
+ kChardetCategories
+};
+
+NSMODULE_DEFN(nsUniversalCharDetModule) = &kChardetModule;
--- a/gfx/public/nsITheme.h
+++ b/gfx/public/nsITheme.h
@@ -166,11 +166,11 @@ public:
* Should we insert a dropmarker inside of combobox button?
*/
virtual PRBool ThemeNeedsComboboxDropmarker()=0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsITheme, NS_ITHEME_IID)
// Creator function
-extern NS_METHOD NS_NewNativeTheme(nsISupports *aOuter, REFNSIID aIID, void **aResult);
+extern nsresult NS_NewNativeTheme(nsISupports *aOuter, REFNSIID aIID, void **aResult);
#endif
--- a/gfx/src/thebes/nsThebesGfxFactory.cpp
+++ b/gfx/src/thebes/nsThebesGfxFactory.cpp
@@ -31,18 +31,17 @@
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-#include "nsIGenericFactory.h"
-#include "nsIModule.h"
+#include "mozilla/ModuleUtils.h"
#include "nsCOMPtr.h"
#include "nsGfxCIID.h"
#include "nsScriptableRegion.h"
#include "nsThebesDeviceContext.h"
#include "nsThebesRenderingContext.h"
#include "nsThebesRegion.h"
@@ -51,17 +50,18 @@
#include "gfxPlatform.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(nsThebesFontMetrics)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsThebesDeviceContext)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsThebesRenderingContext)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsThebesRegion)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsThebesFontEnumerator)
-static NS_IMETHODIMP nsScriptableRegionConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult)
+static nsresult
+nsScriptableRegionConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult)
{
nsresult rv;
nsIScriptableRegion *inst = nsnull;
if ( !aResult )
{
rv = NS_ERROR_NULL_POINTER;
@@ -92,51 +92,59 @@ static NS_IMETHODIMP nsScriptableRegionC
// reference - we don't want this to go out of scope early!
scriptableRgn = nsnull;
rv = inst->QueryInterface(aIID, aResult);
NS_RELEASE(inst);
return rv;
}
-static const nsModuleComponentInfo components[] =
-{
- { "Thebes nsFontMetrics",
- NS_FONT_METRICS_CID,
- "@mozilla.org/gfx/fontmetrics;1",
- nsThebesFontMetricsConstructor },
- { "Thebes Font Enumerator",
- NS_FONT_ENUMERATOR_CID,
- "@mozilla.org/gfx/fontenumerator;1",
- nsThebesFontEnumeratorConstructor },
- { "Thebes Device Context",
- NS_DEVICE_CONTEXT_CID,
- "@mozilla.org/gfx/devicecontext;1",
- nsThebesDeviceContextConstructor },
- { "Thebes Rendering Context",
- NS_RENDERING_CONTEXT_CID,
- "@mozilla.org/gfx/renderingcontext;1",
- nsThebesRenderingContextConstructor },
- { "Thebes Region",
- NS_REGION_CID,
- "@mozilla.org/gfx/region/nsThebes;1",
- nsThebesRegionConstructor },
- { "Scriptable Region",
- NS_SCRIPTABLE_REGION_CID,
- "@mozilla.org/gfx/region;1",
- nsScriptableRegionConstructor },
+NS_DEFINE_NAMED_CID(NS_FONT_METRICS_CID);
+NS_DEFINE_NAMED_CID(NS_FONT_ENUMERATOR_CID);
+NS_DEFINE_NAMED_CID(NS_DEVICE_CONTEXT_CID);
+NS_DEFINE_NAMED_CID(NS_RENDERING_CONTEXT_CID);
+NS_DEFINE_NAMED_CID(NS_REGION_CID);
+NS_DEFINE_NAMED_CID(NS_SCRIPTABLE_REGION_CID);
+
+static const mozilla::Module::CIDEntry kThebesCIDs[] = {
+ { &kNS_FONT_METRICS_CID, false, NULL, nsThebesFontMetricsConstructor },
+ { &kNS_FONT_ENUMERATOR_CID, false, NULL, nsThebesFontEnumeratorConstructor },
+ { &kNS_DEVICE_CONTEXT_CID, false, NULL, nsThebesDeviceContextConstructor },
+ { &kNS_RENDERING_CONTEXT_CID, false, NULL, nsThebesRenderingContextConstructor },
+ { &kNS_REGION_CID, false, NULL, nsThebesRegionConstructor },
+ { &kNS_SCRIPTABLE_REGION_CID, false, NULL, nsScriptableRegionConstructor },
+ { NULL }
+};
+
+static const mozilla::Module::ContractIDEntry kThebesContracts[] = {
+ { "@mozilla.org/gfx/fontmetrics;1", &kNS_FONT_METRICS_CID },
+ { "@mozilla.org/gfx/fontenumerator;1", &kNS_FONT_ENUMERATOR_CID },
+ { "@mozilla.org/gfx/devicecontext;1", &kNS_DEVICE_CONTEXT_CID },
+ { "@mozilla.org/gfx/renderingcontext;1", &kNS_RENDERING_CONTEXT_CID },
+ { "@mozilla.org/gfx/region/nsThebes;1", &kNS_REGION_CID },
+ { "@mozilla.org/gfx/region;1", &kNS_SCRIPTABLE_REGION_CID },
+ { NULL }
};
static nsresult
-nsThebesGfxModuleCtor(nsIModule *self)
+nsThebesGfxModuleCtor()
{
return gfxPlatform::Init();
}
static void
-nsThebesGfxModuleDtor(nsIModule *self)
+nsThebesGfxModuleDtor()
{
nsThebesDeviceContext::Shutdown();
gfxPlatform::Shutdown();
}
-NS_IMPL_NSGETMODULE_WITH_CTOR_DTOR(nsGfxModule, components,
- nsThebesGfxModuleCtor, nsThebesGfxModuleDtor)
+static const mozilla::Module kThebesModule = {
+ mozilla::Module::kVersion,
+ kThebesCIDs,
+ kThebesContracts,
+ NULL,
+ NULL,
+ nsThebesGfxModuleCtor,
+ nsThebesGfxModuleDtor
+};
+
+NSMODULE_DEFN(nsGfxModule) = &kThebesModule;
--- a/intl/build/nsI18nModule.cpp
+++ b/intl/build/nsI18nModule.cpp
@@ -30,17 +30,17 @@
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-#include "nsIGenericFactory.h"
+#include "mozilla/ModuleUtils.h"
#include "nsCOMPtr.h"
#include "nsICategoryManager.h"
#include "nsIServiceManager.h"
// lwbrk
#include "nsLWBrkConstructors.h"
#include "nsSemanticUnitScanner.h"
@@ -51,124 +51,129 @@
#include "nsStrBundleConstructors.h"
// locale
#include "nsLocaleConstructors.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSemanticUnitScanner)
-static const nsModuleComponentInfo components[] =
-{
- // lwbrk
- { "Line Breaker", NS_LBRK_CID,
- NS_LBRK_CONTRACTID, nsJISx4051LineBreakerConstructor},
- { "Word Breaker", NS_WBRK_CID,
- NS_WBRK_CONTRACTID, nsSampleWordBreakerConstructor},
- { "Semantic Unit Scanner", NS_SEMANTICUNITSCANNER_CID,
- NS_SEMANTICUNITSCANNER_CONTRACTID, nsSemanticUnitScannerConstructor},
-
- // unicharutil
- { "Unichar Utility", NS_UNICHARUTIL_CID,
- NS_UNICHARUTIL_CONTRACTID, nsCaseConversionImp2Constructor},
- { "Unichar Category Table", NS_UNICHARCATEGORY_CID,
- NS_UNICHARCATEGORY_CONTRACTID, nsCategoryImpConstructor},
- { "Unicode To Entity Converter", NS_ENTITYCONVERTER_CID,
- NS_ENTITYCONVERTER_CONTRACTID, nsEntityConverterConstructor },
- { "Unicode To Charset Converter", NS_SAVEASCHARSET_CID,
- NS_SAVEASCHARSET_CONTRACTID, nsSaveAsCharsetConstructor},
- { "Japanese Hankaku To Zenkaku", NS_HANKAKUTOZENKAKU_CID,
- NS_HANKAKUTOZENKAKU_CONTRACTID, CreateNewHankakuToZenkaku},
- { "Unicode Normlization", NS_UNICODE_NORMALIZER_CID,
- NS_UNICODE_NORMALIZER_CONTRACTID, nsUnicodeNormalizerConstructor},
-
-
- // strres
- { "String Bundle", NS_STRINGBUNDLESERVICE_CID, NS_STRINGBUNDLE_CONTRACTID,
- nsStringBundleServiceConstructor},
- { "String Textfile Overrides", NS_STRINGBUNDLETEXTOVERRIDE_CID,
- NS_STRINGBUNDLETEXTOVERRIDE_CONTRACTID,
- nsStringBundleTextOverrideConstructor },
-
- // locale
- { "nsLocaleService component",
- NS_LOCALESERVICE_CID,
- NS_LOCALESERVICE_CONTRACTID,
- CreateLocaleService },
- { "Collation factory",
- NS_COLLATIONFACTORY_CID,
- NS_COLLATIONFACTORY_CONTRACTID,
- nsCollationFactoryConstructor },
- { "Scriptable Date Format",
- NS_SCRIPTABLEDATEFORMAT_CID,
- NS_SCRIPTABLEDATEFORMAT_CONTRACTID,
- NS_NewScriptableDateFormat },
- { "Language Atom Service",
- NS_LANGUAGEATOMSERVICE_CID,
- NS_LANGUAGEATOMSERVICE_CONTRACTID,
- nsLanguageAtomServiceConstructor },
-
-#ifdef XP_WIN
- { "Platform locale",
- NS_WIN32LOCALE_CID,
- NS_WIN32LOCALE_CONTRACTID,
- nsIWin32LocaleImplConstructor },
- { "Collation",
- NS_COLLATION_CID,
- NS_COLLATION_CONTRACTID,
- nsCollationWinConstructor },
- { "Date/Time formatter",
- NS_DATETIMEFORMAT_CID,
- NS_DATETIMEFORMAT_CONTRACTID,
- nsDateTimeFormatWinConstructor },
+NS_DEFINE_NAMED_CID(NS_LBRK_CID);
+NS_DEFINE_NAMED_CID(NS_WBRK_CID);
+NS_DEFINE_NAMED_CID(NS_SEMANTICUNITSCANNER_CID);
+NS_DEFINE_NAMED_CID(NS_UNICHARUTIL_CID);
+NS_DEFINE_NAMED_CID(NS_UNICHARCATEGORY_CID);
+NS_DEFINE_NAMED_CID(NS_ENTITYCONVERTER_CID);
+NS_DEFINE_NAMED_CID(NS_SAVEASCHARSET_CID);
+NS_DEFINE_NAMED_CID(NS_HANKAKUTOZENKAKU_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODE_NORMALIZER_CID);
+NS_DEFINE_NAMED_CID(NS_STRINGBUNDLESERVICE_CID);
+NS_DEFINE_NAMED_CID(NS_STRINGBUNDLETEXTOVERRIDE_CID);
+NS_DEFINE_NAMED_CID(NS_LOCALESERVICE_CID);
+NS_DEFINE_NAMED_CID(NS_COLLATIONFACTORY_CID);
+NS_DEFINE_NAMED_CID(NS_SCRIPTABLEDATEFORMAT_CID);
+NS_DEFINE_NAMED_CID(NS_LANGUAGEATOMSERVICE_CID);
+#ifdef XP_WIN
+NS_DEFINE_NAMED_CID(NS_WIN32LOCALE_CID);
+NS_DEFINE_NAMED_CID(NS_COLLATION_CID);
+NS_DEFINE_NAMED_CID(NS_DATETIMEFORMAT_CID);
#endif
-
#ifdef USE_UNIX_LOCALE
- { "Platform locale",
- NS_POSIXLOCALE_CID,
- NS_POSIXLOCALE_CONTRACTID,
- nsPosixLocaleConstructor },
-
- { "Collation",
- NS_COLLATION_CID,
- NS_COLLATION_CONTRACTID,
- nsCollationUnixConstructor },
-
- { "Date/Time formatter",
- NS_DATETIMEFORMAT_CID,
- NS_DATETIMEFORMAT_CONTRACTID,
- nsDateTimeFormatUnixConstructor },
+NS_DEFINE_NAMED_CID(NS_POSIXLOCALE_CID);
+NS_DEFINE_NAMED_CID(NS_COLLATION_CID);
+NS_DEFINE_NAMED_CID(NS_DATETIMEFORMAT_CID);
+#endif
+#ifdef USE_MAC_LOCALE
+NS_DEFINE_NAMED_CID(NS_MACLOCALE_CID);
+NS_DEFINE_NAMED_CID(NS_COLLATION_CID);
+NS_DEFINE_NAMED_CID(NS_DATETIMEFORMAT_CID);
+#endif
+#ifdef XP_OS2
+NS_DEFINE_NAMED_CID(NS_OS2LOCALE_CID);
+NS_DEFINE_NAMED_CID(NS_COLLATION_CID);
+NS_DEFINE_NAMED_CID(NS_DATETIMEFORMAT_CID);
#endif
-#ifdef USE_MAC_LOCALE
- { "Mac locale",
- NS_MACLOCALE_CID,
- NS_MACLOCALE_CONTRACTID,
- nsMacLocaleConstructor },
- { "Collation",
- NS_COLLATION_CID,
- NS_COLLATION_CONTRACTID,
- nsCollationMacUCConstructor },
- { "Date/Time formatter",
- NS_DATETIMEFORMAT_CID,
- NS_DATETIMEFORMAT_CONTRACTID,
- nsDateTimeFormatMacConstructor },
+static const mozilla::Module::CIDEntry kIntlCIDs[] = {
+ { &kNS_LBRK_CID, false, NULL, nsJISx4051LineBreakerConstructor },
+ { &kNS_WBRK_CID, false, NULL, nsSampleWordBreakerConstructor },
+ { &kNS_SEMANTICUNITSCANNER_CID, false, NULL, nsSemanticUnitScannerConstructor },
+ { &kNS_UNICHARUTIL_CID, false, NULL, nsCaseConversionImp2Constructor },
+ { &kNS_UNICHARCATEGORY_CID, false, NULL, nsCategoryImpConstructor },
+ { &kNS_ENTITYCONVERTER_CID, false, NULL, nsEntityConverterConstructor },
+ { &kNS_SAVEASCHARSET_CID, false, NULL, nsSaveAsCharsetConstructor },
+ { &kNS_HANKAKUTOZENKAKU_CID, false, NULL, CreateNewHankakuToZenkaku },
+ { &kNS_UNICODE_NORMALIZER_CID, false, NULL, nsUnicodeNormalizerConstructor },
+ { &kNS_STRINGBUNDLESERVICE_CID, false, NULL, nsStringBundleServiceConstructor },
+ { &kNS_STRINGBUNDLETEXTOVERRIDE_CID, false, NULL, nsStringBundleTextOverrideConstructor },
+ { &kNS_LOCALESERVICE_CID, false, NULL, CreateLocaleService },
+ { &kNS_COLLATIONFACTORY_CID, false, NULL, nsCollationFactoryConstructor },
+ { &kNS_SCRIPTABLEDATEFORMAT_CID, false, NULL, NS_NewScriptableDateFormat },
+ { &kNS_LANGUAGEATOMSERVICE_CID, false, NULL, nsLanguageAtomServiceConstructor },
+#ifdef XP_WIN
+ { &kNS_WIN32LOCALE_CID, false, NULL, nsIWin32LocaleImplConstructor },
+ { &kNS_COLLATION_CID, false, NULL, nsCollationWinConstructor },
+ { &kNS_DATETIMEFORMAT_CID, false, NULL, nsDateTimeFormatWinConstructor },
#endif
-
+#ifdef USE_UNIX_LOCALE
+ { &kNS_POSIXLOCALE_CID, false, NULL, nsPosixLocaleConstructor },
+ { &kNS_COLLATION_CID, false, NULL, nsCollationUnixConstructor },
+ { &kNS_DATETIMEFORMAT_CID, false, NULL, nsDateTimeFormatUnixConstructor },
+#endif
+#ifdef USE_MAC_LOCALE
+ { &kNS_MACLOCALE_CID, false, NULL, nsMacLocaleConstructor },
+ { &kNS_COLLATION_CID, false, NULL, nsCollationMacUCConstructor },
+ { &kNS_DATETIMEFORMAT_CID, false, NULL, nsDateTimeFormatMacConstructor },
+#endif
#ifdef XP_OS2
- { "OS/2 locale",
- NS_OS2LOCALE_CID,
- NS_OS2LOCALE_CONTRACTID,
- nsOS2LocaleConstructor },
- { "Collation",
- NS_COLLATION_CID,
- NS_COLLATION_CONTRACTID,
- nsCollationOS2Constructor },
- { "Date/Time formatter",
- NS_DATETIMEFORMAT_CID,
- NS_DATETIMEFORMAT_CONTRACTID,
- nsDateTimeFormatOS2Constructor },
+ { &kNS_OS2LOCALE_CID, false, NULL, nsOS2LocaleConstructor },
+ { &kNS_COLLATION_CID, false, NULL, nsCollationOS2Constructor },
+ { &kNS_DATETIMEFORMAT_CID, false, NULL, nsDateTimeFormatOS2Constructor },
#endif
-
+ { NULL }
};
+static const mozilla::Module::ContractIDEntry kIntlContracts[] = {
+ { NS_LBRK_CONTRACTID, &kNS_LBRK_CID },
+ { NS_WBRK_CONTRACTID, &kNS_WBRK_CID },
+ { NS_SEMANTICUNITSCANNER_CONTRACTID, &kNS_SEMANTICUNITSCANNER_CID },
+ { NS_UNICHARUTIL_CONTRACTID, &kNS_UNICHARUTIL_CID },
+ { NS_UNICHARCATEGORY_CONTRACTID, &kNS_UNICHARCATEGORY_CID },
+ { NS_ENTITYCONVERTER_CONTRACTID, &kNS_ENTITYCONVERTER_CID },
+ { NS_SAVEASCHARSET_CONTRACTID, &kNS_SAVEASCHARSET_CID },
+ { NS_HANKAKUTOZENKAKU_CONTRACTID, &kNS_HANKAKUTOZENKAKU_CID },
+ { NS_UNICODE_NORMALIZER_CONTRACTID, &kNS_UNICODE_NORMALIZER_CID },
+ { NS_STRINGBUNDLE_CONTRACTID, &kNS_STRINGBUNDLESERVICE_CID },
+ { NS_STRINGBUNDLETEXTOVERRIDE_CONTRACTID, &kNS_STRINGBUNDLETEXTOVERRIDE_CID },
+ { NS_LOCALESERVICE_CONTRACTID, &kNS_LOCALESERVICE_CID },
+ { NS_COLLATIONFACTORY_CONTRACTID, &kNS_COLLATIONFACTORY_CID },
+ { NS_SCRIPTABLEDATEFORMAT_CONTRACTID, &kNS_SCRIPTABLEDATEFORMAT_CID },
+ { NS_LANGUAGEATOMSERVICE_CONTRACTID, &kNS_LANGUAGEATOMSERVICE_CID },
+#ifdef XP_WIN
+ { NS_WIN32LOCALE_CONTRACTID, &kNS_WIN32LOCALE_CID },
+ { NS_COLLATION_CONTRACTID, &kNS_COLLATION_CID },
+ { NS_DATETIMEFORMAT_CONTRACTID, &kNS_DATETIMEFORMAT_CID },
+#endif
+#ifdef USE_UNIX_LOCALE
+ { NS_POSIXLOCALE_CONTRACTID, &kNS_POSIXLOCALE_CID },
+ { NS_COLLATION_CONTRACTID, &kNS_COLLATION_CID },
+ { NS_DATETIMEFORMAT_CONTRACTID, &kNS_DATETIMEFORMAT_CID },
+#endif
+#ifdef USE_MAC_LOCALE
+ { NS_MACLOCALE_CONTRACTID, &kNS_MACLOCALE_CID },
+ { NS_COLLATION_CONTRACTID, &kNS_COLLATION_CID },
+ { NS_DATETIMEFORMAT_CONTRACTID, &kNS_DATETIMEFORMAT_CID },
+#endif
+#ifdef XP_OS2
+ { NS_OS2LOCALE_CONTRACTID, &kNS_OS2LOCALE_CID },
+ { NS_COLLATION_CONTRACTID, &kNS_COLLATION_CID },
+ { NS_DATETIMEFORMAT_CONTRACTID, &kNS_DATETIMEFORMAT_CID },
+#endif
+ { NULL }
+};
-NS_IMPL_NSGETMODULE(nsI18nModule, components)
+static const mozilla::Module kIntlModule = {
+ mozilla::Module::kVersion,
+ kIntlCIDs,
+ kIntlContracts,
+};
+
+NSMODULE_DEFN(nsI18nModule) = &kIntlModule;
--- a/intl/chardet/src/nsChardetModule.cpp
+++ b/intl/chardet/src/nsChardetModule.cpp
@@ -1,9 +1,9 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
@@ -30,142 +30,79 @@
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-#include "nsIGenericFactory.h"
+#include "mozilla/ModuleUtils.h"
#include "nsCOMPtr.h"
#include "nsICategoryManager.h"
#include "nsIServiceManager.h"
#include "nsCharDetConstructors.h"
-
-static NS_METHOD
-AddCategoryEntry(const char* category,
- const char* key,
- const char* value)
-{
- nsresult rv;
- nsCOMPtr<nsICategoryManager>
- categoryManager(do_GetService("@mozilla.org/categorymanager;1", &rv));
- if (NS_FAILED(rv)) return rv;
-
- return categoryManager->AddCategoryEntry(category, key, value,
- PR_TRUE, PR_TRUE,
- nsnull);
-}
-
-static NS_METHOD
-DeleteCategoryEntry(const char* category,
- const char* key)
-{
- nsresult rv;
- nsCOMPtr<nsICategoryManager>
- categoryManager(do_GetService("@mozilla.org/categorymanager;1", &rv));
- if (NS_FAILED(rv)) return rv;
-
- return categoryManager->DeleteCategoryEntry(category, key, PR_TRUE);
-}
-
-static NS_METHOD
-nsMetaCharsetObserverRegistrationProc(nsIComponentManager *aCompMgr,
- nsIFile *aPath,
- const char *registryLocation,
- const char *componentType,
- const nsModuleComponentInfo *info)
-{
- return AddCategoryEntry("parser-service-category",
- "Meta Charset Service",
- NS_META_CHARSET_CONTRACTID);
-}
-
-static NS_METHOD
-nsMetaCharsetObserverUnegistrationProc(nsIComponentManager *aCompMgr,
- nsIFile *aPath,
- const char *registryLocation,
- const nsModuleComponentInfo *info)
-{
- return DeleteCategoryEntry("parser-service-category",
- "Meta Charset Service");
-}
-
-static NS_METHOD
-nsDetectionAdaptorRegistrationProc(nsIComponentManager *aCompMgr,
- nsIFile *aPath,
- const char *registryLocation,
- const char *componentType,
- const nsModuleComponentInfo *info)
-{
- return AddCategoryEntry(NS_CHARSET_DETECTOR_CATEGORY, "off", "off");
-}
+NS_DEFINE_NAMED_CID(NS_META_CHARSET_CID);
+NS_DEFINE_NAMED_CID(NS_DOCUMENTCHARSETINFO_CID);
+NS_DEFINE_NAMED_CID(NS_XML_ENCODING_CID);
+NS_DEFINE_NAMED_CID(NS_CHARSET_DETECTION_ADAPTOR_CID);
+NS_DEFINE_NAMED_CID(NS_RU_PROBDETECTOR_CID);
+NS_DEFINE_NAMED_CID(NS_UK_PROBDETECTOR_CID);
+NS_DEFINE_NAMED_CID(NS_RU_STRING_PROBDETECTOR_CID);
+NS_DEFINE_NAMED_CID(NS_UK_STRING_PROBDETECTOR_CID);
+#ifdef INCLUDE_DBGDETECTOR
+NS_DEFINE_NAMED_CID(NS_1STBLKDBG_DETECTOR_CID);
+NS_DEFINE_NAMED_CID(NS_2NDBLKDBG_DETECTOR_CID);
+NS_DEFINE_NAMED_CID(NS_LASTBLKDBG_DETECTOR_CID);
+#endif /* INCLUDE_DBGDETECTOR */
-static NS_METHOD
-nsRUProbDetectorRegistrationProc(nsIComponentManager *aCompMgr,
- nsIFile *aPath,
- const char *registryLocation,
- const char *componentType,
- const nsModuleComponentInfo *info)
-{
- return AddCategoryEntry(NS_CHARSET_DETECTOR_CATEGORY,
- "ruprob",
- info->mContractID);
-}
-
-static NS_METHOD
-nsUKProbDetectorRegistrationProc(nsIComponentManager *aCompMgr,
- nsIFile *aPath,
- const char *registryLocation,
- const char *componentType,
- const nsModuleComponentInfo *info)
-{
- return AddCategoryEntry(NS_CHARSET_DETECTOR_CATEGORY,
- "ukprob",
- info->mContractID);
-}
-
-
-static const nsModuleComponentInfo components[] =
-{
- { "Meta Charset", NS_META_CHARSET_CID,
- NS_META_CHARSET_CONTRACTID, nsMetaCharsetObserverConstructor,
- nsMetaCharsetObserverRegistrationProc, nsMetaCharsetObserverUnegistrationProc,
- NULL},
- { "Document Charset Info", NS_DOCUMENTCHARSETINFO_CID,
- NS_DOCUMENTCHARSETINFO_CONTRACTID, nsDocumentCharsetInfoConstructor,
- NULL, NULL},
- { "XML Encoding", NS_XML_ENCODING_CID,
- NS_XML_ENCODING_CONTRACTID, nsXMLEncodingObserverConstructor,
- NULL, NULL},
- { "Charset Detection Adaptor", NS_CHARSET_DETECTION_ADAPTOR_CID,
- NS_CHARSET_DETECTION_ADAPTOR_CONTRACTID, nsDetectionAdaptorConstructor,
- nsDetectionAdaptorRegistrationProc, NULL},
- { "Probability based Russian Charset Detector", NS_RU_PROBDETECTOR_CID,
- NS_CHARSET_DETECTOR_CONTRACTID_BASE "ruprob", nsRUProbDetectorConstructor,
- nsRUProbDetectorRegistrationProc, NULL},
- { "Probability based Ukrainian Charset Detector", NS_UK_PROBDETECTOR_CID,
- NS_CHARSET_DETECTOR_CONTRACTID_BASE "ukprob", nsUKProbDetectorConstructor,
- nsUKProbDetectorRegistrationProc, NULL},
- { "Probability based Russian String Charset Detector", NS_RU_STRING_PROBDETECTOR_CID,
- NS_STRCDETECTOR_CONTRACTID_BASE "ruprob", nsRUStringProbDetectorConstructor,
- NULL, NULL},
- { "Probability based Ukrainian String Charset Detector", NS_UK_STRING_PROBDETECTOR_CID,
- NS_STRCDETECTOR_CONTRACTID_BASE "ukprob", nsUKStringProbDetectorConstructor,
- NULL, NULL},
+static const mozilla::Module::CIDEntry kChardetCIDs[] = {
+ { &kNS_META_CHARSET_CID, false, NULL, nsMetaCharsetObserverConstructor },
+ { &kNS_DOCUMENTCHARSETINFO_CID, false, NULL, nsDocumentCharsetInfoConstructor },
+ { &kNS_XML_ENCODING_CID, false, NULL, nsXMLEncodingObserverConstructor },
+ { &kNS_CHARSET_DETECTION_ADAPTOR_CID, false, NULL, nsDetectionAdaptorConstructor },
+ { &kNS_RU_PROBDETECTOR_CID, false, NULL, nsRUProbDetectorConstructor },
+ { &kNS_UK_PROBDETECTOR_CID, false, NULL, nsUKProbDetectorConstructor },
+ { &kNS_RU_STRING_PROBDETECTOR_CID, false, NULL, nsRUStringProbDetectorConstructor },
+ { &kNS_UK_STRING_PROBDETECTOR_CID, false, NULL, nsUKStringProbDetectorConstructor },
#ifdef INCLUDE_DBGDETECTOR
- { "Debugging Detector 1st block", NS_1STBLKDBG_DETECTOR_CID,
- NS_CHARSET_DETECTOR_CONTRACTID_BASE "1stblkdbg", ns1stBlkDbgDetectorConstructor,
- NULL, NULL},
- { "Debugging Detector 2nd block", NS_2NDBLKDBG_DETECTOR_CID,
- NS_CHARSET_DETECTOR_CONTRACTID_BASE "2ndblkdbg", ns2ndBlkDbgDetectorConstructor,
- NULL, NULL},
- { "Debugging Detector Last block", NS_LASTBLKDBG_DETECTOR_CID,
- NS_CHARSET_DETECTOR_CONTRACTID_BASE "lastblkdbg", nsLastBlkDbgDetectorConstructor,
- NULL, NULL},
+ { &kNS_1STBLKDBG_DETECTOR_CID, false, NULL, ns1stBlkDbgDetectorConstructor },
+ { &kNS_2NDBLKDBG_DETECTOR_CID, false, NULL, ns2ndBlkDbgDetectorConstructor },
+ { &kNS_LASTBLKDBG_DETECTOR_CID, false, NULL, nsLastBlkDbgDetectorConstructor },
#endif /* INCLUDE_DBGDETECTOR */
+ { NULL }
};
+static const mozilla::Module::ContractIDEntry kChardetContracts[] = {
+ { NS_META_CHARSET_CONTRACTID, &kNS_META_CHARSET_CID },
+ { NS_DOCUMENTCHARSETINFO_CONTRACTID, &kNS_DOCUMENTCHARSETINFO_CID },
+ { NS_XML_ENCODING_CONTRACTID, &kNS_XML_ENCODING_CID },
+ { NS_CHARSET_DETECTION_ADAPTOR_CONTRACTID, &kNS_CHARSET_DETECTION_ADAPTOR_CID },
+ { NS_CHARSET_DETECTOR_CONTRACTID_BASE "ruprob", &kNS_RU_PROBDETECTOR_CID },
+ { NS_CHARSET_DETECTOR_CONTRACTID_BASE "ukprob", &kNS_UK_PROBDETECTOR_CID },
+ { NS_STRCDETECTOR_CONTRACTID_BASE "ruprob", &kNS_RU_STRING_PROBDETECTOR_CID },
+ { NS_STRCDETECTOR_CONTRACTID_BASE "ukprob", &kNS_UK_STRING_PROBDETECTOR_CID },
+#ifdef INCLUDE_DBGDETECTOR
+ { NS_CHARSET_DETECTOR_CONTRACTID_BASE "1stblkdbg", &kNS_1STBLKDBG_DETECTOR_CID },
+ { NS_CHARSET_DETECTOR_CONTRACTID_BASE "2ndblkdbg", &kNS_2NDBLKDBG_DETECTOR_CID },
+ { NS_CHARSET_DETECTOR_CONTRACTID_BASE "lastblkdbg", &kNS_LASTBLKDBG_DETECTOR_CID },
+#endif /* INCLUDE_DBGDETECTOR */
+ { NULL }
+};
-NS_IMPL_NSGETMODULE(nsChardetModule, components)
+static const mozilla::Module::CategoryEntry kChardetCategories[] = {
+ { "parser-service-category", "Meta Charset Service", NS_META_CHARSET_CONTRACTID },
+ { NS_CHARSET_DETECTOR_CATEGORY, "off", "off" },
+ { NS_CHARSET_DETECTOR_CATEGORY, "ruprob", NS_CHARSET_DETECTOR_CONTRACTID_BASE "ruprob" },
+ { NS_CHARSET_DETECTOR_CATEGORY, "ukprob", NS_CHARSET_DETECTOR_CONTRACTID_BASE "ukprob" },
+ { NULL }
+};
+
+static const mozilla::Module kChardetModule = {
+ mozilla::Module::kVersion,
+ kChardetCIDs,
+ kChardetContracts,
+ kChardetCategories
+};
+
+NSMODULE_DEFN(nsChardetModule) = &kChardetModule;
--- a/intl/locale/idl/nsIScriptableDateFormat.idl
+++ b/intl/locale/idl/nsIScriptableDateFormat.idl
@@ -64,17 +64,17 @@ enum
%{C++
// Define Contractid and CID
// {2EA2E7D0-4095-11d3-9144-006008A6EDF6}
#define NS_SCRIPTABLEDATEFORMAT_CID \
{ 0x2ea2e7d0, 0x4095, 0x11d3, { 0x91, 0x44, 0x0, 0x60, 0x8, 0xa6, 0xed, 0xf6 } }
#define NS_SCRIPTABLEDATEFORMAT_CONTRACTID "@mozilla.org/intl/scriptabledateformat;1"
-extern NS_IMETHODIMP
+extern nsresult
NS_NewScriptableDateFormat(nsISupports* aOuter, REFNSIID aIID, void** aResult);
%}
/**
* Format date and time in a human readable format.
*/
[scriptable, uuid(0c89efb0-1aae-11d3-9141-006008a6edf6)]
interface nsIScriptableDateFormat : nsISupports
--- a/intl/locale/src/nsLocaleConstructors.h
+++ b/intl/locale/src/nsLocaleConstructors.h
@@ -36,17 +36,17 @@
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsLocaleConstructors_h__
#define nsLocaleConstructors_h__
#include "nsCollationCID.h"
#include "nsDateTimeFormatCID.h"
-#include "nsIGenericFactory.h"
+#include "mozilla/ModuleUtils.h"
#include "nsILocaleService.h"
#include "nsIScriptableDateFormat.h"
#include "nsIServiceManager.h"
#include "nsLanguageAtomService.h"
#include "nsLocaleCID.h"
#if defined(XP_MACOSX)
#define USE_MAC_LOCALE
@@ -76,17 +76,17 @@
#ifdef USE_UNIX_LOCALE
#include "nsCollationUnix.h"
#include "nsDateTimeFormatUnix.h"
#include "nsPosixLocale.h"
#endif
#define NSLOCALE_MAKE_CTOR(ctor_, iface_, func_) \
-static NS_IMETHODIMP \
+static nsresult \
ctor_(nsISupports* aOuter, REFNSIID aIID, void** aResult) \
{ \
*aResult = nsnull; \
if (aOuter) \
return NS_ERROR_NO_AGGREGATION; \
iface_* inst; \
nsresult rv = func_(&inst); \
if (NS_SUCCEEDED(rv)) { \
--- a/intl/locale/src/nsScriptableDateFormat.cpp
+++ b/intl/locale/src/nsScriptableDateFormat.cpp
@@ -156,17 +156,17 @@ NS_IMETHODIMP nsScriptableDateFormat::Fo
prtime, mStringOut);
}
if (NS_SUCCEEDED(rv))
*dateTimeString = ToNewUnicode(mStringOut);
return rv;
}
-NS_IMETHODIMP
+nsresult
NS_NewScriptableDateFormat(nsISupports* aOuter, REFNSIID aIID, void** aResult)
{
if (aOuter)
return NS_ERROR_NO_AGGREGATION;
nsScriptableDateFormat* result = new nsScriptableDateFormat();
if (! result)
return NS_ERROR_OUT_OF_MEMORY;
--- a/intl/strres/src/nsStringBundle.cpp
+++ b/intl/strres/src/nsStringBundle.cpp
@@ -49,22 +49,20 @@
#include "nsArrayEnumerator.h"
#include "nscore.h"
#include "nsHashtable.h"
#include "nsMemory.h"
#include "plstr.h"
#include "nsNetUtil.h"
#include "nsIURL.h"
#include "nsIComponentManager.h"
-#include "nsIGenericFactory.h"
#include "nsIMemory.h"
#include "nsIObserverService.h"
#include "pratom.h"
#include "prmem.h"
-#include "nsIModule.h"
#include "nsCOMArray.h"
#include "nsAutoLock.h"
#include "nsTextFormatter.h"
#include "nsIErrorService.h"
#include "nsITimelineService.h"
#include "nsICategoryManager.h"
#include "nsPrintfCString.h"
--- a/intl/uconv/public/nsEncoderDecoderUtils.h
+++ b/intl/uconv/public/nsEncoderDecoderUtils.h
@@ -46,116 +46,26 @@
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 0x02)
#define NS_UNICODEDECODER_NAME "Charset Decoders"
#define NS_UNICODEENCODER_NAME "Charset Encoders"
#define NS_DATA_BUNDLE_CATEGORY "uconv-charset-data"
#define NS_TITLE_BUNDLE_CATEGORY "uconv-charset-titles"
-struct nsConverterRegistryInfo {
- PRBool isEncoder; // PR_TRUE = encoder, PR_FALSE = decoder
- const char *charset;
- nsCID cid;
-};
-
#define NS_CONVERTER_REGISTRY_START \
- static const nsConverterRegistryInfo gConverterRegistryInfo[] = {
+ static const mozilla::Module::CategoryEntry kUConvCategories[] = {
#define NS_CONVERTER_REGISTRY_END \
+ { NULL } \
};
-
-#define NS_IMPL_NSUCONVERTERREGSELF \
-static NS_IMETHODIMP \
-nsUConverterRegSelf(nsIComponentManager *aCompMgr, \
- nsIFile *aPath, \
- const char* registryLocation, \
- const char* componentType, \
- const nsModuleComponentInfo *info) \
-{ \
- nsresult rv; \
- nsCOMPtr<nsICategoryManager> catman = \
- do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv); \
- if (NS_FAILED(rv)) return rv; \
- \
- nsXPIDLCString previous; \
- PRUint32 i; \
- for (i=0; i<sizeof(gConverterRegistryInfo)/sizeof(gConverterRegistryInfo[0]); i++) { \
- const nsConverterRegistryInfo* entry = &gConverterRegistryInfo[i]; \
- const char *category; \
- const char *key; \
- \
- if (entry->isEncoder) { \
- category = NS_UNICODEENCODER_NAME; \
- } else { \
- category = NS_UNICODEDECODER_NAME; \
- } \
- key = entry->charset; \
- \
- rv = catman->AddCategoryEntry(category, key, "", \
- PR_TRUE, \
- PR_TRUE, \
- getter_Copies(previous)); \
- } \
- return rv; \
-} \
-static NS_IMETHODIMP \
-nsUConverterUnregSelf(nsIComponentManager *aCompMgr, \
- nsIFile *aPath, \
- const char*, \
- const nsModuleComponentInfo *info) \
-{ \
- nsresult rv; \
- nsCOMPtr<nsICategoryManager> catman = \
- do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv); \
- if (NS_FAILED(rv)) return rv; \
- \
- nsXPIDLCString previous; \
- PRUint32 i; \
- for (i=0; i<sizeof(gConverterRegistryInfo)/sizeof(gConverterRegistryInfo[0]); i++) { \
- const nsConverterRegistryInfo* entry = &gConverterRegistryInfo[i]; \
- const char *category; \
- const char *key; \
- \
- if (entry->isEncoder) { \
- category = NS_UNICODEDECODER_NAME; \
- } else { \
- category = NS_UNICODEENCODER_NAME; \
- } \
- key = entry->charset; \
- \
- rv = catman->DeleteCategoryEntry(category, key, PR_TRUE); \
- } \
- return rv; \
-}
-
-
#define NS_UCONV_REG_UNREG_DECODER(_Charset, _CID) \
- { \
- PR_FALSE, \
- _Charset, \
- _CID, \
- },
+ { NS_UNICODEDECODER_NAME, _Charset, "" },
#define NS_UCONV_REG_UNREG_ENCODER(_Charset, _CID) \
- { \
- PR_TRUE, \
- _Charset, \
- _CID, \
- },
+ { NS_UNICODEENCODER_NAME, _Charset, "" },
- // this needs to be written out per some odd cpp behavior that
- // I could not work around - the behavior is document in the cpp
- // info page however, so I'm not the only one to hit this!
#define NS_UCONV_REG_UNREG(_Charset, _DecoderCID, _EncoderCID) \
- { \
- PR_FALSE, \
- _Charset, \
- _DecoderCID, \
- }, \
- { \
- PR_TRUE, \
- _Charset, \
- _EncoderCID, \
- },
-
+ NS_UCONV_REG_UNREG_DECODER(_Charset, *) \
+ NS_UCONV_REG_UNREG_ENCODER(_Charset, *)
+
#endif
--- a/intl/uconv/src/nsCP1252ToUnicode.cpp
+++ b/intl/uconv/src/nsCP1252ToUnicode.cpp
@@ -40,15 +40,15 @@
//----------------------------------------------------------------------
// Global functions and data [declaration]
static const PRUint16 g_utMappingTable[] = {
#include "cp1252.ut"
};
-NS_METHOD
+nsresult
nsCP1252ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult)
{
return CreateOneByteDecoder((uMappingTable*) &g_utMappingTable,
aOuter, aIID, aResult);
}
--- a/intl/uconv/src/nsCP1252ToUnicode.h
+++ b/intl/uconv/src/nsCP1252ToUnicode.h
@@ -48,13 +48,13 @@
#define NS_CP1252TOUNICODE_CONTRACTID "@mozilla.org/intl/unicode/decoder;1?charset=windows-1252"
/**
* A character set converter from CP1252 to Unicode.
*
* @created 20/Apr/1999
* @author Catalin Rotaru [CATA]
*/
-NS_METHOD
+nsresult
nsCP1252ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult);
#endif /* nsCP1252ToUnicode_h___ */
--- a/intl/uconv/src/nsCharsetConverterManager.cpp
+++ b/intl/uconv/src/nsCharsetConverterManager.cpp
@@ -50,16 +50,17 @@
#include "prmem.h"
#include "nsCRT.h"
#include "nsTArray.h"
#include "nsStringEnumerator.h"
#include "nsThreadUtils.h"
#include "mozilla/Services.h"
#include "nsXPCOM.h"
+#include "nsComponentManagerUtils.h"
#include "nsISupportsPrimitives.h"
// just for CONTRACTIDs
#include "nsCharsetConverterManager.h"
#ifdef MOZ_USE_NATIVE_UCONV
#include "nsNativeUConvService.h"
#endif
@@ -79,40 +80,16 @@ nsCharsetConverterManager::nsCharsetConv
}
nsCharsetConverterManager::~nsCharsetConverterManager()
{
NS_IF_RELEASE(mDataBundle);
NS_IF_RELEASE(mTitleBundle);
}
-nsresult nsCharsetConverterManager::RegisterConverterManagerData()
-{
- nsresult rv;
- nsCOMPtr<nsICategoryManager> catman = do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
- if (NS_FAILED(rv))
- return rv;
-
- RegisterConverterCategory(catman, NS_TITLE_BUNDLE_CATEGORY,
- "chrome://global/locale/charsetTitles.properties");
- RegisterConverterCategory(catman, NS_DATA_BUNDLE_CATEGORY,
- "resource://gre-resources/charsetData.properties");
-
- return NS_OK;
-}
-
-nsresult
-nsCharsetConverterManager::RegisterConverterCategory(nsICategoryManager* catman,
- const char* aCategory,
- const char* aURL)
-{
- return catman->AddCategoryEntry(aCategory, aURL, "",
- PR_TRUE, PR_TRUE, nsnull);
-}
-
nsresult nsCharsetConverterManager::LoadExtensibleBundle(
const char* aCategory,
nsIStringBundle ** aResult)
{
nsCOMPtr<nsIStringBundleService> sbServ =
mozilla::services::GetStringBundleService();
if (!sbServ)
return NS_ERROR_FAILURE;
--- a/intl/uconv/src/nsCharsetConverterManager.h
+++ b/intl/uconv/src/nsCharsetConverterManager.h
@@ -64,31 +64,23 @@ private:
#ifdef MOZ_USE_NATIVE_UCONV
nsCOMPtr<nsINativeUConvService> mNativeUC;
#endif
nsresult LoadExtensibleBundle(const char * aRegistryKey,
nsIStringBundle ** aResult);
- static nsresult RegisterConverterCategory(nsICategoryManager*,
- const char* aCategory,
- const char* aURL);
-
nsresult GetBundleValue(nsIStringBundle * aBundle,
const char * aName,
const nsAFlatString& aProp, PRUnichar ** aResult);
nsresult GetBundleValue(nsIStringBundle * aBundle,
const char * aName,
const nsAFlatString& aProp, nsAString& aResult);
nsresult GetList(const nsACString& aCategory,
const nsACString& aPrefix,
nsIUTF8StringEnumerator** aResult);
-
-public:
- static nsresult RegisterConverterManagerData();
-
};
#endif // nsCharsetConverterManager_h__
--- a/intl/uconv/src/nsISO88591ToUnicode.cpp
+++ b/intl/uconv/src/nsISO88591ToUnicode.cpp
@@ -40,16 +40,16 @@
//----------------------------------------------------------------------
// Global functions and data [declaration]
static const PRUint16 g_utMappingTable[] = {
#include "cp1252.ut"
};
-NS_METHOD
+nsresult
nsISO88591ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult)
{
return CreateOneByteDecoder((uMappingTable*) &g_utMappingTable,
aOuter, aIID, aResult);
}
--- a/intl/uconv/src/nsISO88591ToUnicode.h
+++ b/intl/uconv/src/nsISO88591ToUnicode.h
@@ -48,13 +48,13 @@
#define NS_ISO88591TOUNICODE_CONTRACTID "@mozilla.org/intl/unicode/decoder;1?charset=ISO-8859-1"
/**
* A character set converter from ISO88591 to Unicode.
*
* @created 23/Nov/1998
* @author Catalin Rotaru [CATA]
*/
-NS_METHOD
+nsresult
nsISO88591ToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult);
#endif /* nsISO88591ToUnicode_h___ */
--- a/intl/uconv/src/nsMacRomanToUnicode.cpp
+++ b/intl/uconv/src/nsMacRomanToUnicode.cpp
@@ -40,16 +40,16 @@
//----------------------------------------------------------------------
// Global functions and data [declaration]
static const PRUint16 g_MacRomanMappingTable[] = {
#include "macroman.ut"
};
-NS_METHOD
+nsresult
nsMacRomanToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult)
{
return CreateOneByteDecoder((uMappingTable*) &g_MacRomanMappingTable,
aOuter, aIID, aResult);
}
--- a/intl/uconv/src/nsMacRomanToUnicode.h
+++ b/intl/uconv/src/nsMacRomanToUnicode.h
@@ -51,13 +51,13 @@
// NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_UCONV, 0x31)
/**
* A character set converter from MacRoman to Unicode.
*
* @created 05/Apr/1999
* @author Catalin Rotaru [CATA]
*/
-NS_METHOD
+nsresult
nsMacRomanToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult);
#endif /* nsMacRomanToUnicode_h___ */
--- a/intl/uconv/src/nsScriptableUConv.cpp
+++ b/intl/uconv/src/nsScriptableUConv.cpp
@@ -41,16 +41,17 @@
#include "nsString.h"
#include "nsReadableUtils.h"
#include "nsIServiceManager.h"
#include "nsICharsetConverterManager.h"
#include "nsIScriptableUConv.h"
#include "nsScriptableUConv.h"
#include "nsIStringStream.h"
#include "nsCRT.h"
+#include "nsComponentManagerUtils.h"
#include "nsIPlatformCharset.h"
static PRInt32 gInstanceCount = 0;
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsScriptableUnicodeConverter, nsIScriptableUnicodeConverter)
--- a/intl/uconv/src/nsUConvModule.cpp
+++ b/intl/uconv/src/nsUConvModule.cpp
@@ -33,18 +33,17 @@
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsCOMPtr.h"
#include "nsCRT.h"
-#include "nsIModule.h"
-#include "nsIGenericFactory.h"
+#include "mozilla/ModuleUtils.h"
#include "nsIComponentManager.h"
#include "nsICategoryManager.h"
#include "nsICharsetConverterManager.h"
#include "nsEncoderDecoderUtils.h"
#include "nsIUnicodeDecoder.h"
#include "nsIUnicodeEncoder.h"
#include "nsICharsetAlias.h"
#include "nsIServiceManager.h"
@@ -397,21 +396,22 @@ NS_UCONV_REG_UNREG_ENCODER("x-koreanjamo
// ucvcn
NS_UCONV_REG_UNREG("GB2312", NS_GB2312TOUNICODE_CID, NS_UNICODETOGB2312_CID)
NS_UCONV_REG_UNREG("windows-936", NS_CP936TOUNICODE_CID, NS_UNICODETOCP936_CID)
NS_UCONV_REG_UNREG("x-gbk", NS_GBKTOUNICODE_CID, NS_UNICODETOGBK_CID)
NS_UCONV_REG_UNREG("HZ-GB-2312", NS_HZTOUNICODE_CID, NS_UNICODETOHZ_CID)
NS_UCONV_REG_UNREG("gb18030", NS_GB18030TOUNICODE_CID, NS_UNICODETOGB18030_CID)
NS_UCONV_REG_UNREG_DECODER("ISO-2022-CN", NS_ISO2022CNTOUNICODE_CID)
+
+{ NS_TITLE_BUNDLE_CATEGORY, "chrome://global/locale/charsetTitles.properties", "" },
+{ NS_DATA_BUNDLE_CATEGORY, "resource://gre-resources/charsetData.properties", "" },
NS_CONVERTER_REGISTRY_END
-NS_IMPL_NSUCONVERTERREGSELF
-
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUTF8)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUTF8ToUnicode)
// ucvlatin
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUTF7ToUnicode)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMUTF7ToUnicode)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUTF16ToUnicode)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUTF16BEToUnicode)
@@ -594,1039 +594,649 @@ const PRUint16 g_ufJohabJamoMapping[] ={
#include "nsINativeUConvService.h"
#include "nsNativeUConvService.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(NativeUConvService)
#endif // #ifndef MOZ_USE_NATIVE_UCONV
-
-NS_IMETHODIMP
-nsConverterManagerDataRegister(nsIComponentManager* aCompMgr,
- nsIFile* aPath,
- const char *aLocation,
- const char *aType,
- const nsModuleComponentInfo* aInfo)
-{
- return nsCharsetConverterManager::RegisterConverterManagerData();
-}
-
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCharsetConverterManager)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTextToSubURI)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUTF8ConverterService)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCharsetAlias2)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsConverterInputStream)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsConverterOutputStream)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPlatformCharset, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsScriptableUnicodeConverter)
-static const nsModuleComponentInfo components[] =
-{
- {
- "Charset Conversion Manager", NS_ICHARSETCONVERTERMANAGER_CID,
- NS_CHARSETCONVERTERMANAGER_CONTRACTID,
- nsCharsetConverterManagerConstructor,
- nsConverterManagerDataRegister,
- },
- {
- "Charset Alias Information", NS_CHARSETALIAS_CID,
- NS_CHARSETALIAS_CONTRACTID,
- nsCharsetAlias2Constructor
- },
- {
- "Text To Sub URI Helper", NS_TEXTTOSUBURI_CID,
- NS_ITEXTTOSUBURI_CONTRACTID,
- nsTextToSubURIConstructor
- },
- {
- "Platform Charset Information", NS_PLATFORMCHARSET_CID,
- NS_PLATFORMCHARSET_CONTRACTID,
- nsPlatformCharsetConstructor
- },
- { "Unicode converter input stream", NS_CONVERTERINPUTSTREAM_CID,
- NS_CONVERTERINPUTSTREAM_CONTRACTID,
- nsConverterInputStreamConstructor
- },
- { "Unicode converter output stream", NS_CONVERTEROUTPUTSTREAM_CID,
- "@mozilla.org/intl/converter-output-stream;1",
- nsConverterOutputStreamConstructor
- },
- {
- "Unicode Encoder / Decoder for Script", NS_ISCRIPTABLEUNICODECONVERTER_CID,
- NS_ISCRIPTABLEUNICODECONVERTER_CONTRACTID,
- nsScriptableUnicodeConverterConstructor
- },
+NS_DEFINE_NAMED_CID(NS_ICHARSETCONVERTERMANAGER_CID);
+NS_DEFINE_NAMED_CID(NS_CHARSETALIAS_CID);
+NS_DEFINE_NAMED_CID(NS_TEXTTOSUBURI_CID);
+NS_DEFINE_NAMED_CID(NS_PLATFORMCHARSET_CID);
+NS_DEFINE_NAMED_CID(NS_CONVERTERINPUTSTREAM_CID);
+NS_DEFINE_NAMED_CID(NS_CONVERTEROUTPUTSTREAM_CID);
+NS_DEFINE_NAMED_CID(NS_ISCRIPTABLEUNICODECONVERTER_CID);
#ifdef MOZ_USE_NATIVE_UCONV
- {
- "Native UConv Service",
- NS_NATIVE_UCONV_SERVICE_CID,
- NS_NATIVE_UCONV_SERVICE_CONTRACT_ID,
- NativeUConvServiceConstructor,
- },
+NS_DEFINE_NAMED_CID(NS_NATIVE_UCONV_SERVICE_CID);
#else
- {
- "Converter to/from UTF8 with charset", NS_UTF8CONVERTERSERVICE_CID,
- NS_UTF8CONVERTERSERVICE_CONTRACTID,
- nsUTF8ConverterServiceConstructor
- },
- {
- "ISO-8859-1 To Unicode Converter", NS_ISO88591TOUNICODE_CID,
- NS_ISO88591TOUNICODE_CONTRACTID,
- nsISO88591ToUnicodeConstructor,
- // global converter registration
- nsUConverterRegSelf, nsUConverterUnregSelf,
- },
- {
- "windows-1252 To Unicode Converter", NS_CP1252TOUNICODE_CID,
- NS_CP1252TOUNICODE_CONTRACTID,
- nsCP1252ToUnicodeConstructor,
- },
- {
- "x-mac-roman To Unicode Converter", NS_MACROMANTOUNICODE_CID,
- NS_MACROMANTOUNICODE_CONTRACTID,
- nsMacRomanToUnicodeConstructor,
- },
- {
- "UTF-8 To Unicode Converter", NS_UTF8TOUNICODE_CID,
- NS_UTF8TOUNICODE_CONTRACTID,
- nsUTF8ToUnicodeConstructor,
- },
- {
- "Unicode To ISO-8859-1 Converter", NS_UNICODETOISO88591_CID,
- NS_UNICODETOISO88591_CONTRACTID,
- nsUnicodeToISO88591Constructor,
- },
- {
- "Unicode To windows-1252 Converter", NS_UNICODETOCP1252_CID,
- NS_UNICODETOCP1252_CONTRACTID,
- nsUnicodeToCP1252Constructor,
- },
- {
- "Unicode To x-mac-roman Converter", NS_UNICODETOMACROMAN_CID,
- NS_UNICODETOMACROMAN_CONTRACTID,
- nsUnicodeToMacRomanConstructor,
- },
- {
- "Unicode To UTF-8 Converter", NS_UNICODETOUTF8_CID,
- NS_UNICODETOUTF8_CONTRACTID,
- nsUnicodeToUTF8Constructor,
- },
+NS_DEFINE_NAMED_CID(NS_UTF8CONVERTERSERVICE_CID);
+NS_DEFINE_NAMED_CID(NS_ISO88591TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_CP1252TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_MACROMANTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UTF8TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOISO88591_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP1252_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOMACROMAN_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOUTF8_CID);
+NS_DEFINE_NAMED_CID(NS_ASCIITOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_ISO88592TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_ISO88593TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_ISO88594TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_ISO88595TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_ISO88596TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_ISO88596ITOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_ISO88596ETOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_ISO88597TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_ISO88598TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_ISO88598ITOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_ISO88598ETOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_ISO88599TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_ISO885910TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_ISO885913TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_ISO885914TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_ISO885915TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_ISO885916TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_ISOIR111TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_CP1250TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_CP1251TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_CP1253TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_CP1254TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_CP1255TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_CP1256TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_CP1257TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_CP1258TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_TIS620TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_ISO885911TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_CP874TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_CP866TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_KOI8RTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_KOI8UTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_MACCETOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_MACGREEKTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_MACTURKISHTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_MACCROATIANTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_MACROMANIANTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_MACCYRILLICTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_MACICELANDICTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_GEOSTD8TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_ARMSCII8TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_TCVN5712TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_VISCIITOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_VPSTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UTF7TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_MUTF7TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UTF16TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UTF16BETOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UTF16LETOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UTF32TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UTF32BETOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UTF32LETOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_T61TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_USERDEFINEDTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_MACARABICTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_MACDEVANAGARITOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_MACFARSITOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_MACGURMUKHITOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_MACGUJARATITOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_MACHEBREWTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOASCII_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOISO88592_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOISO88593_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOISO88594_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOISO88595_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOISO88596_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOISO88596I_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOISO88596E_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOISO88597_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOISO88598_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOISO88598I_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOISO88598E_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOISO88599_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOISO885910_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOISO885913_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOISO885914_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOISO885915_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOISO885916_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOISOIR111_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP1250_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP1251_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP1253_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP1254_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP1255_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP1256_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP1257_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP1258_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOTIS620_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOISO885911_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP874_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP866_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOKOI8R_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOKOI8U_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOMACCE_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOMACGREEK_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOMACTURKISH_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOMACCROATIAN_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOMACROMANIAN_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOMACCYRILLIC_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOMACICELANDIC_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOGEOSTD8_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOARMSCII8_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOTCVN5712_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOVISCII_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOVPS_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOUTF7_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOMUTF7_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOUTF16BE_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOUTF16LE_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOUTF16_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOUTF32BE_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOUTF32LE_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOUTF32_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOT61_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOUSERDEFINED_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOSYMBOL_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOZAPFDINGBATS_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOADOBEEURO_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOMACARABIC_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOMACDEVANAGARI_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOMACFARSI_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOMACGURMUKHI_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOMACGUJARATI_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOMACHEBREW_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOTSCII_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOTAMILTTF_CID);
+NS_DEFINE_NAMED_CID(NS_CP850TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_CP852TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_CP855TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_CP857TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_CP862TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_CP864TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_CP864ITOUNICODE_CID);
+#ifdef XP_OS2
+NS_DEFINE_NAMED_CID(NS_CP869TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_CP1125TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_CP1131TOUNICODE_CID);
+#endif
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP850_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP852_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP855_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP857_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP862_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP864_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP864I_CID);
+#ifdef XP_OS2
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP869_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP1125_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP1131_CID);
+#endif
+NS_DEFINE_NAMED_CID(NS_SJISTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_EUCJPTOUNICODE_CID);
+NS_DEFINE_NAMED_CID( NS_ISO2022JPTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOSJIS_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOEUCJP_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOISO2022JP_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOJISX0201_CID);
+NS_DEFINE_NAMED_CID(NS_EUCTWTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOEUCTW_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOBIG5_CID);
+NS_DEFINE_NAMED_CID(NS_BIG5TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOBIG5HKSCS_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOHKSCS_CID);
+NS_DEFINE_NAMED_CID(NS_BIG5HKSCSTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_EUCKRTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOEUCKR_CID);
+NS_DEFINE_NAMED_CID(NS_JOHABTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOJOHAB_CID);
+NS_DEFINE_NAMED_CID(NS_CP949TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP949_CID);
+NS_DEFINE_NAMED_CID(NS_ISO2022KRTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOJAMOTTF_CID);
+NS_DEFINE_NAMED_CID(NS_GB2312TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOGB2312_CID);
+NS_DEFINE_NAMED_CID(NS_CP936TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOCP936_CID);
+NS_DEFINE_NAMED_CID(NS_GBKTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOGBK_CID);
+NS_DEFINE_NAMED_CID(NS_HZTOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOHZ_CID);
+NS_DEFINE_NAMED_CID(NS_GB18030TOUNICODE_CID);
+NS_DEFINE_NAMED_CID(NS_UNICODETOGB18030_CID);
+NS_DEFINE_NAMED_CID(NS_ISO2022CNTOUNICODE_CID);
+#endif
- // ucvlatin
- {
- DECODER_NAME_BASE "us-ascii" , NS_ASCIITOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "us-ascii",
- nsAsciiToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "ISO-8859-2" , NS_ISO88592TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "ISO-8859-2",
- nsISO88592ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "ISO-8859-3" , NS_ISO88593TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "ISO-8859-3",
- nsISO88593ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "ISO-8859-4" , NS_ISO88594TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "ISO-8859-4",
- nsISO88594ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "ISO-8859-5" , NS_ISO88595TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "ISO-8859-5",
- nsISO88595ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "ISO-8859-6" , NS_ISO88596TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "ISO-8859-6",
- nsISO88596ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "ISO-8859-6-I" , NS_ISO88596ITOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "ISO-8859-6-I",
- nsISO88596IToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "ISO-8859-6-E" , NS_ISO88596ETOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "ISO-8859-6-E",
- nsISO88596EToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "ISO-8859-7" , NS_ISO88597TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "ISO-8859-7",
- nsISO88597ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "ISO-8859-8" , NS_ISO88598TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "ISO-8859-8",
- nsISO88598ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "ISO-8859-8-I" , NS_ISO88598ITOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "ISO-8859-8-I",
- nsISO88598IToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "ISO-8859-8-E" , NS_ISO88598ETOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "ISO-8859-8-E",
- nsISO88598EToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "ISO-8859-9" , NS_ISO88599TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "ISO-8859-9",
- nsISO88599ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "ISO-8859-10" , NS_ISO885910TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "ISO-8859-10",
- nsISO885910ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "ISO-8859-13" , NS_ISO885913TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "ISO-8859-13",
- nsISO885913ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "ISO-8859-14" , NS_ISO885914TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "ISO-8859-14",
- nsISO885914ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "ISO-8859-15" , NS_ISO885915TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "ISO-8859-15",
- nsISO885915ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "ISO-8859-16" , NS_ISO885916TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "ISO-8859-16",
- nsISO885916ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "ISO-IR-111" , NS_ISOIR111TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "ISO-IR-111",
- nsISOIR111ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "windows-1250" , NS_CP1250TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "windows-1250",
- nsCP1250ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "windows-1251" , NS_CP1251TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "windows-1251",
- nsCP1251ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "windows-1253" , NS_CP1253TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "windows-1253",
- nsCP1253ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "windows-1254" , NS_CP1254TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "windows-1254",
- nsCP1254ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "windows-1255" , NS_CP1255TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "windows-1255",
- nsCP1255ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "windows-1256" , NS_CP1256TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "windows-1256",
- nsCP1256ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "windows-1257" , NS_CP1257TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "windows-1257",
- nsCP1257ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "windows-1258" , NS_CP1258TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "windows-1258",
- nsCP1258ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "TIS-620" , NS_TIS620TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "TIS-620",
- nsTIS620ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "ISO-8859-11" , NS_ISO885911TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "ISO-8859-11",
- nsISO885911ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "windows-874" , NS_CP874TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "windows-874",
- nsCP874ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "IBM866" , NS_CP866TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "IBM866",
- nsCP866ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "KOI8-R" , NS_KOI8RTOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "KOI8-R",
- nsKOI8RToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "KOI8-U" , NS_KOI8UTOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "KOI8-U",
- nsKOI8UToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "x-mac-ce" , NS_MACCETOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "x-mac-ce",
- nsMacCEToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "x-mac-greek" , NS_MACGREEKTOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "x-mac-greek",
- nsMacGreekToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "x-mac-turkish" , NS_MACTURKISHTOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "x-mac-turkish",
- nsMacTurkishToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "x-mac-croatian" , NS_MACCROATIANTOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "x-mac-croatian",
- nsMacCroatianToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "x-mac-romanian" , NS_MACROMANIANTOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "x-mac-romanian",
- nsMacRomanianToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "x-mac-cyrillic" , NS_MACCYRILLICTOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "x-mac-cyrillic",
- nsMacCyrillicToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "x-mac-icelandic" , NS_MACICELANDICTOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "x-mac-icelandic",
- nsMacIcelandicToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "GEOSTD8" , NS_GEOSTD8TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "GEOSTD8",
- nsGEOSTD8ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "armscii-8" , NS_ARMSCII8TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "armscii-8",
- nsARMSCII8ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "x-viet-tcvn5712" , NS_TCVN5712TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "x-viet-tcvn5712",
- nsTCVN5712ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "VISCII" , NS_VISCIITOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "VISCII",
- nsVISCIIToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "x-viet-vps" , NS_VPSTOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "x-viet-vps",
- nsVPSToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "UTF-7" , NS_UTF7TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "UTF-7",
- nsUTF7ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "x-imap4-modified-utf7" , NS_MUTF7TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "x-imap4-modified-utf7",
- nsMUTF7ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "UTF-16" , NS_UTF16TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "UTF-16",
- nsUTF16ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "UTF-16BE" , NS_UTF16BETOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "UTF-16BE",
- nsUTF16BEToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "UTF-16LE" , NS_UTF16LETOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "UTF-16LE",
- nsUTF16LEToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "UTF-32" , NS_UTF32TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "UTF-32",
- nsUTF32ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "UTF-32BE" , NS_UTF32BETOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "UTF-32BE",
- nsUTF32BEToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "UTF-32LE" , NS_UTF32LETOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "UTF-32LE",
- nsUTF32LEToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "T.61-8bit" , NS_T61TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "T.61-8bit",
- nsT61ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "x-user-defined" , NS_USERDEFINEDTOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "x-user-defined",
- nsUserDefinedToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "x-mac-arabic" , NS_MACARABICTOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "x-mac-arabic",
- nsMacArabicToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "x-mac-devanagari" , NS_MACDEVANAGARITOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "x-mac-devanagari",
- nsMacDevanagariToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "x-mac-farsi" , NS_MACFARSITOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "x-mac-farsi",
- nsMacFarsiToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "x-mac-gurmukhi" , NS_MACGURMUKHITOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "x-mac-gurmukhi",
- nsMacGurmukhiToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "x-mac-gujarati" , NS_MACGUJARATITOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "x-mac-gujarati",
- nsMacGujaratiToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "x-mac-hebrew" , NS_MACHEBREWTOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "x-mac-hebrew",
- nsMacHebrewToUnicodeConstructor ,
- },
- {
- ENCODER_NAME_BASE "us-ascii" , NS_UNICODETOASCII_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "us-ascii",
- nsUnicodeToAsciiConstructor,
- },
- {
- ENCODER_NAME_BASE "ISO-8859-2" , NS_UNICODETOISO88592_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "ISO-8859-2",
- nsUnicodeToISO88592Constructor,
- },
- {
- ENCODER_NAME_BASE "ISO-8859-3" , NS_UNICODETOISO88593_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "ISO-8859-3",
- nsUnicodeToISO88593Constructor,
- },
- {
- ENCODER_NAME_BASE "ISO-8859-4" , NS_UNICODETOISO88594_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "ISO-8859-4",
- nsUnicodeToISO88594Constructor,
- },
- {
- ENCODER_NAME_BASE "ISO-8859-5" , NS_UNICODETOISO88595_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "ISO-8859-5",
- nsUnicodeToISO88595Constructor,
- },
- {
- ENCODER_NAME_BASE "ISO-8859-6" , NS_UNICODETOISO88596_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "ISO-8859-6",
- nsUnicodeToISO88596Constructor,
- },
- {
- ENCODER_NAME_BASE "ISO-8859-6-I" , NS_UNICODETOISO88596I_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "ISO-8859-6-I",
- nsUnicodeToISO88596IConstructor,
- },
- {
- ENCODER_NAME_BASE "ISO-8859-6-E" , NS_UNICODETOISO88596E_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "ISO-8859-6-E",
- nsUnicodeToISO88596EConstructor,
- },
- {
- ENCODER_NAME_BASE "ISO-8859-7" , NS_UNICODETOISO88597_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "ISO-8859-7",
- nsUnicodeToISO88597Constructor,
- },
- {
- ENCODER_NAME_BASE "ISO-8859-8" , NS_UNICODETOISO88598_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "ISO-8859-8",
- nsUnicodeToISO88598Constructor,
- },
- {
- ENCODER_NAME_BASE "ISO-8859-8-I" , NS_UNICODETOISO88598I_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "ISO-8859-8-I",
- nsUnicodeToISO88598IConstructor,
- },
- {
- ENCODER_NAME_BASE "ISO-8859-8-E" , NS_UNICODETOISO88598E_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "ISO-8859-8-E",
- nsUnicodeToISO88598EConstructor,
- },
- {
- ENCODER_NAME_BASE "ISO-8859-9" , NS_UNICODETOISO88599_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "ISO-8859-9",
- nsUnicodeToISO88599Constructor,
- },
- {
- ENCODER_NAME_BASE "ISO-8859-10" , NS_UNICODETOISO885910_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "ISO-8859-10",
- nsUnicodeToISO885910Constructor,
- },
- {
- ENCODER_NAME_BASE "ISO-8859-13" , NS_UNICODETOISO885913_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "ISO-8859-13",
- nsUnicodeToISO885913Constructor,
- },
- {
- ENCODER_NAME_BASE "ISO-8859-14" , NS_UNICODETOISO885914_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "ISO-8859-14",
- nsUnicodeToISO885914Constructor,
- },
- {
- ENCODER_NAME_BASE "ISO-8859-15" , NS_UNICODETOISO885915_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "ISO-8859-15",
- nsUnicodeToISO885915Constructor,
- },
- {
- ENCODER_NAME_BASE "ISO-8859-16" , NS_UNICODETOISO885916_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "ISO-8859-16",
- nsUnicodeToISO885916Constructor,
- },
- {
- ENCODER_NAME_BASE "ISO-IR-111" , NS_UNICODETOISOIR111_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "ISO-IR-111",
- nsUnicodeToISOIR111Constructor,
- },
- {
- ENCODER_NAME_BASE "windows-1250" , NS_UNICODETOCP1250_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "windows-1250",
- nsUnicodeToCP1250Constructor,
- },
- {
- ENCODER_NAME_BASE "windows-1251" , NS_UNICODETOCP1251_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "windows-1251",
- nsUnicodeToCP1251Constructor,
- },
- {
- ENCODER_NAME_BASE "windows-1253" , NS_UNICODETOCP1253_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "windows-1253",
- nsUnicodeToCP1253Constructor,
- },
- {
- ENCODER_NAME_BASE "windows-1254" , NS_UNICODETOCP1254_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "windows-1254",
- nsUnicodeToCP1254Constructor,
- },
- {
- ENCODER_NAME_BASE "windows-1255" , NS_UNICODETOCP1255_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "windows-1255",
- nsUnicodeToCP1255Constructor,
- },
- {
- ENCODER_NAME_BASE "windows-1256" , NS_UNICODETOCP1256_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "windows-1256",
- nsUnicodeToCP1256Constructor,
- },
- {
- ENCODER_NAME_BASE "windows-1257" , NS_UNICODETOCP1257_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "windows-1257",
- nsUnicodeToCP1257Constructor,
- },
- {
- ENCODER_NAME_BASE "windows-1258" , NS_UNICODETOCP1258_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "windows-1258",
- nsUnicodeToCP1258Constructor,
- },
- {
- ENCODER_NAME_BASE "TIS-620" , NS_UNICODETOTIS620_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "TIS-620",
- nsUnicodeToTIS620Constructor,
- },
- {
- ENCODER_NAME_BASE "ISO-8859-11" , NS_UNICODETOISO885911_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "ISO-8859-11",
- nsUnicodeToISO885911Constructor ,
- },
- {
- ENCODER_NAME_BASE "windows-874" , NS_UNICODETOCP874_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "windows-874",
- nsUnicodeToCP874Constructor ,
- },
- {
- ENCODER_NAME_BASE "IBM866" , NS_UNICODETOCP866_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "IBM866",
- nsUnicodeToCP866Constructor,
- },
- {
- ENCODER_NAME_BASE "KOI8-R" , NS_UNICODETOKOI8R_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "KOI8-R",
- nsUnicodeToKOI8RConstructor,
- },
- {
- ENCODER_NAME_BASE "KOI8-U" , NS_UNICODETOKOI8U_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "KOI8-U",
- nsUnicodeToKOI8UConstructor,
- },
- {
- ENCODER_NAME_BASE "x-mac-ce" , NS_UNICODETOMACCE_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-ce",
- nsUnicodeToMacCEConstructor,
- },
- {
- ENCODER_NAME_BASE "x-mac-greek" , NS_UNICODETOMACGREEK_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-greek",
- nsUnicodeToMacGreekConstructor,
- },
- {
- ENCODER_NAME_BASE "x-mac-turkish" , NS_UNICODETOMACTURKISH_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-turkish",
- nsUnicodeToMacTurkishConstructor,
- },
- {
- ENCODER_NAME_BASE "x-mac-croatian" , NS_UNICODETOMACCROATIAN_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-croatian",
- nsUnicodeToMacCroatianConstructor,
- },
- {
- ENCODER_NAME_BASE "x-mac-romanian" , NS_UNICODETOMACROMANIAN_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-romanian",
- nsUnicodeToMacRomanianConstructor,
- },
- {
- ENCODER_NAME_BASE "x-mac-cyrillic" , NS_UNICODETOMACCYRILLIC_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-cyrillic",
- nsUnicodeToMacCyrillicConstructor,
- },
- {
- ENCODER_NAME_BASE "x-mac-icelandic" , NS_UNICODETOMACICELANDIC_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-icelandic",
- nsUnicodeToMacIcelandicConstructor,
- },
- {
- ENCODER_NAME_BASE "GEOSTD8" , NS_UNICODETOGEOSTD8_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "GEOSTD8",
- nsUnicodeToGEOSTD8Constructor,
- },
- {
- ENCODER_NAME_BASE "armscii-8" , NS_UNICODETOARMSCII8_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "armscii-8",
- nsUnicodeToARMSCII8Constructor,
- },
- {
- ENCODER_NAME_BASE "x-viet-tcvn5712" , NS_UNICODETOTCVN5712_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-viet-tcvn5712",
- nsUnicodeToTCVN5712Constructor,
- },
- {
- ENCODER_NAME_BASE "VISCII" , NS_UNICODETOVISCII_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "VISCII",
- nsUnicodeToVISCIIConstructor,
- },
- {
- ENCODER_NAME_BASE "x-viet-vps" , NS_UNICODETOVPS_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-viet-vps",
- nsUnicodeToVPSConstructor,
- },
- {
- ENCODER_NAME_BASE "UTF-7" , NS_UNICODETOUTF7_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "UTF-7",
- nsUnicodeToUTF7Constructor,
- },
- {
- ENCODER_NAME_BASE "x-imap4-modified-utf7" , NS_UNICODETOMUTF7_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-imap4-modified-utf7",
- nsUnicodeToMUTF7Constructor,
- },
- {
- ENCODER_NAME_BASE "UTF-16BE" , NS_UNICODETOUTF16BE_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "UTF-16BE",
- nsUnicodeToUTF16BEConstructor,
- },
- {
- ENCODER_NAME_BASE "UTF-16LE" , NS_UNICODETOUTF16LE_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "UTF-16LE",
- nsUnicodeToUTF16LEConstructor,
- },
- {
- ENCODER_NAME_BASE "UTF-16" , NS_UNICODETOUTF16_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "UTF-16",
- nsUnicodeToUTF16Constructor,
- },
- {
- ENCODER_NAME_BASE "UTF-32BE" , NS_UNICODETOUTF32BE_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "UTF-32BE",
- nsUnicodeToUTF32BEConstructor,
- },
- {
- ENCODER_NAME_BASE "UTF-32LE" , NS_UNICODETOUTF32LE_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "UTF-32LE",
- nsUnicodeToUTF32LEConstructor,
- },
- {
- ENCODER_NAME_BASE "UTF-32" , NS_UNICODETOUTF32_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "UTF-32",
- nsUnicodeToUTF32Constructor,
- },
- {
- ENCODER_NAME_BASE "T.61-8bit" , NS_UNICODETOT61_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "T.61-8bit",
- nsUnicodeToT61Constructor,
- },
- {
- ENCODER_NAME_BASE "x-user-defined" , NS_UNICODETOUSERDEFINED_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-user-defined",
- nsUnicodeToUserDefinedConstructor,
- },
- {
- ENCODER_NAME_BASE "Adobe-Symbol-Encoding" , NS_UNICODETOSYMBOL_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "Adobe-Symbol-Encoding",
- nsUnicodeToSymbolConstructor,
- },
- {
- ENCODER_NAME_BASE "x-zapf-dingbats" , NS_UNICODETOZAPFDINGBATS_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-zapf-dingbats",
- nsUnicodeToZapfDingbatConstructor,
- },
- {
- ENCODER_NAME_BASE "x-adobe-euro", NS_UNICODETOADOBEEURO_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-adobe-euro",
- nsUnicodeToAdobeEuroConstructor,
- },
- {
- ENCODER_NAME_BASE "x-mac-arabic" , NS_UNICODETOMACARABIC_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-arabic",
- nsUnicodeToMacArabicConstructor,
- },
- {
- ENCODER_NAME_BASE "x-mac-devanagari" , NS_UNICODETOMACDEVANAGARI_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-devanagari",
- nsUnicodeToMacDevanagariConstructor,
- },
- {
- ENCODER_NAME_BASE "x-mac-farsi" , NS_UNICODETOMACFARSI_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-farsi",
- nsUnicodeToMacFarsiConstructor,
- },
- {
- ENCODER_NAME_BASE "x-mac-gurmukhi" , NS_UNICODETOMACGURMUKHI_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-gurmukhi",
- nsUnicodeToMacGurmukhiConstructor,
- },
- {
- ENCODER_NAME_BASE "x-mac-gujarati" , NS_UNICODETOMACGUJARATI_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-gujarati",
- nsUnicodeToMacGujaratiConstructor,
- },
- {
- ENCODER_NAME_BASE "x-mac-hebrew" , NS_UNICODETOMACHEBREW_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-hebrew",
- nsUnicodeToMacHebrewConstructor,
- },
- {
- ENCODER_NAME_BASE "x-tscii" , NS_UNICODETOTSCII_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-tscii",
- nsUnicodeToTSCIIConstructor,
- },
- {
- ENCODER_NAME_BASE "x-tamilttf-0" , NS_UNICODETOTAMILTTF_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-tamilttf-0",
- nsUnicodeToTamilTTFConstructor,
- },
- // ucvibm
- {
- DECODER_NAME_BASE "IBM850" , NS_CP850TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "IBM850",
- nsCP850ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "IBM852" , NS_CP852TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "IBM852",
- nsCP852ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "IBM855" , NS_CP855TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "IBM855",
- nsCP855ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "IBM857" , NS_CP857TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "IBM857",
- nsCP857ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "IBM862" , NS_CP862TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "IBM862",
- nsCP862ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "IBM864" , NS_CP864TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "IBM864",
- nsCP864ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "IBM864i" , NS_CP864ITOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "IBM864i",
- nsCP864iToUnicodeConstructor ,
- },
+static const mozilla::Module::CIDEntry kUConvCIDs[] = {
+ { &kNS_ICHARSETCONVERTERMANAGER_CID, false, NULL, nsCharsetConverterManagerConstructor },
+ { &kNS_CHARSETALIAS_CID, false, NULL, nsCharsetAlias2Constructor },
+ { &kNS_TEXTTOSUBURI_CID, false, NULL, nsTextToSubURIConstructor },
+ { &kNS_PLATFORMCHARSET_CID, false, NULL, nsPlatformCharsetConstructor },
+ { &kNS_CONVERTERINPUTSTREAM_CID, false, NULL, nsConverterInputStreamConstructor },
+ { &kNS_CONVERTEROUTPUTSTREAM_CID, false, NULL, nsConverterOutputStreamConstructor },
+ { &kNS_ISCRIPTABLEUNICODECONVERTER_CID, false, NULL, nsScriptableUnicodeConverterConstructor },
+#ifdef MOZ_USE_NATIVE_ICONV
+ { &kNS_NATIVE_UCONV_SERVICE_CID, false, NULL, NativeUConvServiceConstructor },
+#else
+ { &kNS_UTF8CONVERTERSERVICE_CID, false, NULL, nsUTF8ConverterServiceConstructor },
+ { &kNS_ISO88591TOUNICODE_CID, false, NULL, nsISO88591ToUnicodeConstructor },
+ { &kNS_CP1252TOUNICODE_CID, false, NULL, nsCP1252ToUnicodeConstructor },
+ { &kNS_MACROMANTOUNICODE_CID, false, NULL, nsMacRomanToUnicodeConstructor },
+ { &kNS_UTF8TOUNICODE_CID, false, NULL, nsUTF8ToUnicodeConstructor },
+ { &kNS_UNICODETOISO88591_CID, false, NULL, nsUnicodeToISO88591Constructor },
+ { &kNS_UNICODETOCP1252_CID, false, NULL, nsUnicodeToCP1252Constructor },
+ { &kNS_UNICODETOMACROMAN_CID, false, NULL, nsUnicodeToMacRomanConstructor },
+ { &kNS_UNICODETOUTF8_CID, false, NULL, nsUnicodeToUTF8Constructor },
+ { &kNS_ASCIITOUNICODE_CID, false, NULL, nsAsciiToUnicodeConstructor },
+ { &kNS_ISO88592TOUNICODE_CID, false, NULL, nsISO88592ToUnicodeConstructor },
+ { &kNS_ISO88593TOUNICODE_CID, false, NULL, nsISO88593ToUnicodeConstructor },
+ { &kNS_ISO88594TOUNICODE_CID, false, NULL, nsISO88594ToUnicodeConstructor },
+ { &kNS_ISO88595TOUNICODE_CID, false, NULL, nsISO88595ToUnicodeConstructor },
+ { &kNS_ISO88596TOUNICODE_CID, false, NULL, nsISO88596ToUnicodeConstructor },
+ { &kNS_ISO88596ITOUNICODE_CID, false, NULL, nsISO88596IToUnicodeConstructor },
+ { &kNS_ISO88596ETOUNICODE_CID, false, NULL, nsISO88596EToUnicodeConstructor },
+ { &kNS_ISO88597TOUNICODE_CID, false, NULL, nsISO88597ToUnicodeConstructor },
+ { &kNS_ISO88598TOUNICODE_CID, false, NULL, nsISO88598ToUnicodeConstructor },
+ { &kNS_ISO88598ITOUNICODE_CID, false, NULL, nsISO88598IToUnicodeConstructor },
+ { &kNS_ISO88598ETOUNICODE_CID, false, NULL, nsISO88598EToUnicodeConstructor },
+ { &kNS_ISO88599TOUNICODE_CID, false, NULL, nsISO88599ToUnicodeConstructor },
+ { &kNS_ISO885910TOUNICODE_CID, false, NULL, nsISO885910ToUnicodeConstructor },
+ { &kNS_ISO885913TOUNICODE_CID, false, NULL, nsISO885913ToUnicodeConstructor },
+ { &kNS_ISO885914TOUNICODE_CID, false, NULL, nsISO885914ToUnicodeConstructor },
+ { &kNS_ISO885915TOUNICODE_CID, false, NULL, nsISO885915ToUnicodeConstructor },
+ { &kNS_ISO885916TOUNICODE_CID, false, NULL, nsISO885916ToUnicodeConstructor },
+ { &kNS_ISOIR111TOUNICODE_CID, false, NULL, nsISOIR111ToUnicodeConstructor },
+ { &kNS_CP1250TOUNICODE_CID, false, NULL, nsCP1250ToUnicodeConstructor },
+ { &kNS_CP1251TOUNICODE_CID, false, NULL, nsCP1251ToUnicodeConstructor },
+ { &kNS_CP1253TOUNICODE_CID, false, NULL, nsCP1253ToUnicodeConstructor },
+ { &kNS_CP1254TOUNICODE_CID, false, NULL, nsCP1254ToUnicodeConstructor },
+ { &kNS_CP1255TOUNICODE_CID, false, NULL, nsCP1255ToUnicodeConstructor },
+ { &kNS_CP1256TOUNICODE_CID, false, NULL, nsCP1256ToUnicodeConstructor },
+ { &kNS_CP1257TOUNICODE_CID, false, NULL, nsCP1257ToUnicodeConstructor },
+ { &kNS_CP1258TOUNICODE_CID, false, NULL, nsCP1258ToUnicodeConstructor },
+ { &kNS_TIS620TOUNICODE_CID, false, NULL, nsTIS620ToUnicodeConstructor },
+ { &kNS_ISO885911TOUNICODE_CID, false, NULL, nsISO885911ToUnicodeConstructor },
+ { &kNS_CP874TOUNICODE_CID, false, NULL, nsCP874ToUnicodeConstructor },
+ { &kNS_CP866TOUNICODE_CID, false, NULL, nsCP866ToUnicodeConstructor },
+ { &kNS_KOI8RTOUNICODE_CID, false, NULL, nsKOI8RToUnicodeConstructor },
+ { &kNS_KOI8UTOUNICODE_CID, false, NULL, nsKOI8UToUnicodeConstructor },
+ { &kNS_MACCETOUNICODE_CID, false, NULL, nsMacCEToUnicodeConstructor },
+ { &kNS_MACGREEKTOUNICODE_CID, false, NULL, nsMacGreekToUnicodeConstructor },
+ { &kNS_MACTURKISHTOUNICODE_CID, false, NULL, nsMacTurkishToUnicodeConstructor },
+ { &kNS_MACCROATIANTOUNICODE_CID, false, NULL, nsMacCroatianToUnicodeConstructor },
+ { &kNS_MACROMANIANTOUNICODE_CID, false, NULL, nsMacRomanianToUnicodeConstructor },
+ { &kNS_MACCYRILLICTOUNICODE_CID, false, NULL, nsMacCyrillicToUnicodeConstructor },
+ { &kNS_MACICELANDICTOUNICODE_CID, false, NULL, nsMacIcelandicToUnicodeConstructor },
+ { &kNS_GEOSTD8TOUNICODE_CID, false, NULL, nsGEOSTD8ToUnicodeConstructor },
+ { &kNS_ARMSCII8TOUNICODE_CID, false, NULL, nsARMSCII8ToUnicodeConstructor },
+ { &kNS_TCVN5712TOUNICODE_CID, false, NULL, nsTCVN5712ToUnicodeConstructor },
+ { &kNS_VISCIITOUNICODE_CID, false, NULL, nsVISCIIToUnicodeConstructor },
+ { &kNS_VPSTOUNICODE_CID, false, NULL, nsVPSToUnicodeConstructor },
+ { &kNS_UTF7TOUNICODE_CID, false, NULL, nsUTF7ToUnicodeConstructor },
+ { &kNS_MUTF7TOUNICODE_CID, false, NULL, nsMUTF7ToUnicodeConstructor },
+ { &kNS_UTF16TOUNICODE_CID, false, NULL, nsUTF16ToUnicodeConstructor },
+ { &kNS_UTF16BETOUNICODE_CID, false, NULL, nsUTF16BEToUnicodeConstructor },
+ { &kNS_UTF16LETOUNICODE_CID, false, NULL, nsUTF16LEToUnicodeConstructor },
+ { &kNS_UTF32TOUNICODE_CID, false, NULL, nsUTF32ToUnicodeConstructor },
+ { &kNS_UTF32BETOUNICODE_CID, false, NULL, nsUTF32BEToUnicodeConstructor },
+ { &kNS_UTF32LETOUNICODE_CID, false, NULL, nsUTF32LEToUnicodeConstructor },
+ { &kNS_T61TOUNICODE_CID, false, NULL, nsT61ToUnicodeConstructor },
+ { &kNS_USERDEFINEDTOUNICODE_CID, false, NULL, nsUserDefinedToUnicodeConstructor },
+ { &kNS_MACARABICTOUNICODE_CID, false, NULL, nsMacArabicToUnicodeConstructor },
+ { &kNS_MACDEVANAGARITOUNICODE_CID, false, NULL, nsMacDevanagariToUnicodeConstructor },
+ { &kNS_MACFARSITOUNICODE_CID, false, NULL, nsMacFarsiToUnicodeConstructor },
+ { &kNS_MACGURMUKHITOUNICODE_CID, false, NULL, nsMacGurmukhiToUnicodeConstructor },
+ { &kNS_MACGUJARATITOUNICODE_CID, false, NULL, nsMacGujaratiToUnicodeConstructor },
+ { &kNS_MACHEBREWTOUNICODE_CID, false, NULL, nsMacHebrewToUnicodeConstructor },
+ { &kNS_UNICODETOASCII_CID, false, NULL, nsUnicodeToAsciiConstructor },
+ { &kNS_UNICODETOISO88592_CID, false, NULL, nsUnicodeToISO88592Constructor },
+ { &kNS_UNICODETOISO88593_CID, false, NULL, nsUnicodeToISO88593Constructor },
+ { &kNS_UNICODETOISO88594_CID, false, NULL, nsUnicodeToISO88594Constructor },
+ { &kNS_UNICODETOISO88595_CID, false, NULL, nsUnicodeToISO88595Constructor },
+ { &kNS_UNICODETOISO88596_CID, false, NULL, nsUnicodeToISO88596Constructor },
+ { &kNS_UNICODETOISO88596I_CID, false, NULL, nsUnicodeToISO88596IConstructor },
+ { &kNS_UNICODETOISO88596E_CID, false, NULL, nsUnicodeToISO88596EConstructor },
+ { &kNS_UNICODETOISO88597_CID, false, NULL, nsUnicodeToISO88597Constructor },
+ { &kNS_UNICODETOISO88598_CID, false, NULL, nsUnicodeToISO88598Constructor },
+ { &kNS_UNICODETOISO88598I_CID, false, NULL, nsUnicodeToISO88598IConstructor },
+ { &kNS_UNICODETOISO88598E_CID, false, NULL, nsUnicodeToISO88598EConstructor },
+ { &kNS_UNICODETOISO88599_CID, false, NULL, nsUnicodeToISO88599Constructor },
+ { &kNS_UNICODETOISO885910_CID, false, NULL, nsUnicodeToISO885910Constructor },
+ { &kNS_UNICODETOISO885913_CID, false, NULL, nsUnicodeToISO885913Constructor },
+ { &kNS_UNICODETOISO885914_CID, false, NULL, nsUnicodeToISO885914Constructor },
+ { &kNS_UNICODETOISO885915_CID, false, NULL, nsUnicodeToISO885915Constructor },
+ { &kNS_UNICODETOISO885916_CID, false, NULL, nsUnicodeToISO885916Constructor },
+ { &kNS_UNICODETOISOIR111_CID, false, NULL, nsUnicodeToISOIR111Constructor },
+ { &kNS_UNICODETOCP1250_CID, false, NULL, nsUnicodeToCP1250Constructor },
+ { &kNS_UNICODETOCP1251_CID, false, NULL, nsUnicodeToCP1251Constructor },
+ { &kNS_UNICODETOCP1253_CID, false, NULL, nsUnicodeToCP1253Constructor },
+ { &kNS_UNICODETOCP1254_CID, false, NULL, nsUnicodeToCP1254Constructor },
+ { &kNS_UNICODETOCP1255_CID, false, NULL, nsUnicodeToCP1255Constructor },
+ { &kNS_UNICODETOCP1256_CID, false, NULL, nsUnicodeToCP1256Constructor },
+ { &kNS_UNICODETOCP1257_CID, false, NULL, nsUnicodeToCP1257Constructor },
+ { &kNS_UNICODETOCP1258_CID, false, NULL, nsUnicodeToCP1258Constructor },
+ { &kNS_UNICODETOTIS620_CID, false, NULL, nsUnicodeToTIS620Constructor },
+ { &kNS_UNICODETOISO885911_CID, false, NULL, nsUnicodeToISO885911Constructor },
+ { &kNS_UNICODETOCP874_CID, false, NULL, nsUnicodeToCP874Constructor },
+ { &kNS_UNICODETOCP866_CID, false, NULL, nsUnicodeToCP866Constructor },
+ { &kNS_UNICODETOKOI8R_CID, false, NULL, nsUnicodeToKOI8RConstructor },
+ { &kNS_UNICODETOKOI8U_CID, false, NULL, nsUnicodeToKOI8UConstructor },
+ { &kNS_UNICODETOMACCE_CID, false, NULL, nsUnicodeToMacCEConstructor },
+ { &kNS_UNICODETOMACGREEK_CID, false, NULL, nsUnicodeToMacGreekConstructor },
+ { &kNS_UNICODETOMACTURKISH_CID, false, NULL, nsUnicodeToMacTurkishConstructor },
+ { &kNS_UNICODETOMACCROATIAN_CID, false, NULL, nsUnicodeToMacCroatianConstructor },
+ { &kNS_UNICODETOMACROMANIAN_CID, false, NULL, nsUnicodeToMacRomanianConstructor },
+ { &kNS_UNICODETOMACCYRILLIC_CID, false, NULL, nsUnicodeToMacCyrillicConstructor },
+ { &kNS_UNICODETOMACICELANDIC_CID, false, NULL, nsUnicodeToMacIcelandicConstructor },
+ { &kNS_UNICODETOGEOSTD8_CID, false, NULL, nsUnicodeToGEOSTD8Constructor },
+ { &kNS_UNICODETOARMSCII8_CID, false, NULL, nsUnicodeToARMSCII8Constructor },
+ { &kNS_UNICODETOTCVN5712_CID, false, NULL, nsUnicodeToTCVN5712Constructor },
+ { &kNS_UNICODETOVISCII_CID, false, NULL, nsUnicodeToVISCIIConstructor },
+ { &kNS_UNICODETOVPS_CID, false, NULL, nsUnicodeToVPSConstructor },
+ { &kNS_UNICODETOUTF7_CID, false, NULL, nsUnicodeToUTF7Constructor },
+ { &kNS_UNICODETOMUTF7_CID, false, NULL, nsUnicodeToMUTF7Constructor },
+ { &kNS_UNICODETOUTF16BE_CID, false, NULL, nsUnicodeToUTF16BEConstructor },
+ { &kNS_UNICODETOUTF16LE_CID, false, NULL, nsUnicodeToUTF16LEConstructor },
+ { &kNS_UNICODETOUTF16_CID, false, NULL, nsUnicodeToUTF16Constructor },
+ { &kNS_UNICODETOUTF32BE_CID, false, NULL, nsUnicodeToUTF32BEConstructor },
+ { &kNS_UNICODETOUTF32LE_CID, false, NULL, nsUnicodeToUTF32LEConstructor },
+ { &kNS_UNICODETOUTF32_CID, false, NULL, nsUnicodeToUTF32Constructor },
+ { &kNS_UNICODETOT61_CID, false, NULL, nsUnicodeToT61Constructor },
+ { &kNS_UNICODETOUSERDEFINED_CID, false, NULL, nsUnicodeToUserDefinedConstructor },
+ { &kNS_UNICODETOSYMBOL_CID, false, NULL, nsUnicodeToSymbolConstructor },
+ { &kNS_UNICODETOZAPFDINGBATS_CID, false, NULL, nsUnicodeToZapfDingbatConstructor },
+ { &kNS_UNICODETOADOBEEURO_CID, false, NULL, nsUnicodeToAdobeEuroConstructor },
+ { &kNS_UNICODETOMACARABIC_CID, false, NULL, nsUnicodeToMacArabicConstructor },
+ { &kNS_UNICODETOMACDEVANAGARI_CID, false, NULL, nsUnicodeToMacDevanagariConstructor },
+ { &kNS_UNICODETOMACFARSI_CID, false, NULL, nsUnicodeToMacFarsiConstructor },
+ { &kNS_UNICODETOMACGURMUKHI_CID, false, NULL, nsUnicodeToMacGurmukhiConstructor },
+ { &kNS_UNICODETOMACGUJARATI_CID, false, NULL, nsUnicodeToMacGujaratiConstructor },
+ { &kNS_UNICODETOMACHEBREW_CID, false, NULL, nsUnicodeToMacHebrewConstructor },
+ { &kNS_UNICODETOTSCII_CID, false, NULL, nsUnicodeToTSCIIConstructor },
+ { &kNS_UNICODETOTAMILTTF_CID, false, NULL, nsUnicodeToTamilTTFConstructor },
+ { &kNS_CP850TOUNICODE_CID, false, NULL, nsCP850ToUnicodeConstructor },
+ { &kNS_CP852TOUNICODE_CID, false, NULL, nsCP852ToUnicodeConstructor },
+ { &kNS_CP855TOUNICODE_CID, false, NULL, nsCP855ToUnicodeConstructor },
+ { &kNS_CP857TOUNICODE_CID, false, NULL, nsCP857ToUnicodeConstructor },
+ { &kNS_CP862TOUNICODE_CID, false, NULL, nsCP862ToUnicodeConstructor },
+ { &kNS_CP864TOUNICODE_CID, false, NULL, nsCP864ToUnicodeConstructor },
+ { &kNS_CP864ITOUNICODE_CID, false, NULL, nsCP864iToUnicodeConstructor },
#ifdef XP_OS2
- {
- DECODER_NAME_BASE "IBM869" , NS_CP869TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "IBM869",
- nsCP869ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "IBM1125" , NS_CP1125TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "IBM1125",
- nsCP1125ToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "IBM1131" , NS_CP1131TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "IBM1131",
- nsCP1131ToUnicodeConstructor ,
- },
+ { &kNS_CP869TOUNICODE_CID, false, NULL, nsCP869ToUnicodeConstructor },
+ { &kNS_CP1125TOUNICODE_CID, false, NULL, nsCP1125ToUnicodeConstructor },
+ { &kNS_CP1131TOUNICODE_CID, false, NULL, nsCP1131ToUnicodeConstructor },
#endif
- {
- ENCODER_NAME_BASE "IBM850" , NS_UNICODETOCP850_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "IBM850",
- nsUnicodeToCP850Constructor,
- },
- {
- ENCODER_NAME_BASE "IBM852" , NS_UNICODETOCP852_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "IBM852",
- nsUnicodeToCP852Constructor,
- },
- {
- ENCODER_NAME_BASE "IBM855" , NS_UNICODETOCP855_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "IBM855",
- nsUnicodeToCP855Constructor,
- },
- {
- ENCODER_NAME_BASE "IBM857" , NS_UNICODETOCP857_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "IBM857",
- nsUnicodeToCP857Constructor,
- },
- {
- ENCODER_NAME_BASE "IBM862" , NS_UNICODETOCP862_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "IBM862",
- nsUnicodeToCP862Constructor,
- },
- {
- ENCODER_NAME_BASE "IBM864" , NS_UNICODETOCP864_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "IBM864",
- nsUnicodeToCP864Constructor,
- },
- {
- ENCODER_NAME_BASE "IBM864i" , NS_UNICODETOCP864I_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "IBM864i",
- nsUnicodeToCP864iConstructor,
- },
+ { &kNS_UNICODETOCP850_CID, false, NULL, nsUnicodeToCP850Constructor },
+ { &kNS_UNICODETOCP852_CID, false, NULL, nsUnicodeToCP852Constructor },
+ { &kNS_UNICODETOCP855_CID, false, NULL, nsUnicodeToCP855Constructor },
+ { &kNS_UNICODETOCP857_CID, false, NULL, nsUnicodeToCP857Constructor },
+ { &kNS_UNICODETOCP862_CID, false, NULL, nsUnicodeToCP862Constructor },
+ { &kNS_UNICODETOCP864_CID, false, NULL, nsUnicodeToCP864Constructor },
+ { &kNS_UNICODETOCP864I_CID, false, NULL, nsUnicodeToCP864iConstructor },
#ifdef XP_OS2
- {
- ENCODER_NAME_BASE "IBM869" , NS_UNICODETOCP869_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "IBM869",
- nsUnicodeToCP869Constructor,
- },
- {
- ENCODER_NAME_BASE "IBM1125" , NS_UNICODETOCP1125_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "IBM1125",
- nsUnicodeToCP1125Constructor,
- },
- {
- ENCODER_NAME_BASE "IBM1131" , NS_UNICODETOCP1131_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "IBM1131",
- nsUnicodeToCP1131Constructor,
- },
+ { &kNS_UNICODETOCP869_CID, false, NULL, nsUnicodeToCP869Constructor },
+ { &kNS_UNICODETOCP1125_CID, false, NULL, nsUnicodeToCP1125Constructor },
+ { &kNS_UNICODETOCP1131_CID, false, NULL, nsUnicodeToCP1131Constructor },
#endif
- // ucvja
- {
- DECODER_NAME_BASE "Shift_JIS" , NS_SJISTOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "Shift_JIS",
- nsShiftJISToUnicodeConstructor ,
- },
- {
- DECODER_NAME_BASE "EUC-JP" , NS_EUCJPTOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "EUC-JP",
- nsEUCJPToUnicodeV2Constructor ,
- },
- {
- DECODER_NAME_BASE "ISO-2022-JP" , NS_ISO2022JPTOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "ISO-2022-JP",
- nsISO2022JPToUnicodeV2Constructor ,
- },
- {
- ENCODER_NAME_BASE "Shift_JIS" , NS_UNICODETOSJIS_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "Shift_JIS",
- nsUnicodeToSJISConstructor,
- },
- {
- ENCODER_NAME_BASE "EUC-JP" , NS_UNICODETOEUCJP_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "EUC-JP",
- nsUnicodeToEUCJPConstructor,
- },
- {
- ENCODER_NAME_BASE "ISO-2022-JP" , NS_UNICODETOISO2022JP_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "ISO-2022-JP",
- nsUnicodeToISO2022JPConstructor,
- },
- {
- ENCODER_NAME_BASE "jis_0201" , NS_UNICODETOJISX0201_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "jis_0201",
- nsUnicodeToJISx0201Constructor,
- },
-
- // ucvtw2
- {
- DECODER_NAME_BASE "x-euc-tw" , NS_EUCTWTOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "x-euc-tw",
- nsEUCTWToUnicodeConstructor,
- },
- {
- ENCODER_NAME_BASE "x-euc-tw" , NS_UNICODETOEUCTW_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "x-euc-tw",
- nsUnicodeToEUCTWConstructor,
- },
-
- // ucvtw
- {
- ENCODER_NAME_BASE "Big5" , NS_UNICODETOBIG5_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "Big5",
- nsUnicodeToBIG5Constructor,
- },
- {
- DECODER_NAME_BASE "Big5" , NS_BIG5TOUNICODE_CID,
- NS_UNICODEDECODER_CONTRACTID_BASE "Big5",
- nsBIG5ToUnicodeConstructor ,
- },
- {
- ENCODER_NAME_BASE "Big5-HKSCS" , NS_UNICODETOBIG5HKSCS_CID,
- NS_UNICODEENCODER_CONTRACTID_BASE "Big5-HKSCS",
- nsUnicodeToBIG5HKSCSConstructor,