michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: michael@0: #include "mozilla/ModuleUtils.h" michael@0: #include "mozHunspell.h" michael@0: #include "mozHunspellDirProvider.h" michael@0: #include "mozSpellChecker.h" michael@0: #include "mozInlineSpellChecker.h" michael@0: #include "nsTextServicesCID.h" michael@0: #include "mozPersonalDictionary.h" michael@0: #include "mozSpellI18NManager.h" michael@0: #include "nsIFile.h" michael@0: michael@0: #define NS_SPELLCHECKER_CID \ michael@0: { /* 8227f019-afc7-461e-b030-9f185d7a0e29 */ \ michael@0: 0x8227F019, 0xAFC7, 0x461e, \ michael@0: { 0xB0, 0x30, 0x9F, 0x18, 0x5D, 0x7A, 0x0E, 0x29} } michael@0: michael@0: #define MOZ_INLINESPELLCHECKER_CID \ michael@0: { /* 9FE5D975-09BD-44aa-A01A-66402EA28657 */ \ michael@0: 0x9fe5d975, 0x9bd, 0x44aa, \ michael@0: { 0xa0, 0x1a, 0x66, 0x40, 0x2e, 0xa2, 0x86, 0x57} } michael@0: michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(mozHunspell, Init) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(mozHunspellDirProvider) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(mozSpellChecker, Init) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(mozPersonalDictionary, Init) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(mozSpellI18NManager) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(mozInlineSpellChecker) michael@0: michael@0: NS_DEFINE_NAMED_CID(MOZ_HUNSPELL_CID); michael@0: NS_DEFINE_NAMED_CID(HUNSPELLDIRPROVIDER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_SPELLCHECKER_CID); michael@0: NS_DEFINE_NAMED_CID(MOZ_PERSONALDICTIONARY_CID); michael@0: NS_DEFINE_NAMED_CID(MOZ_SPELLI18NMANAGER_CID); michael@0: NS_DEFINE_NAMED_CID(MOZ_INLINESPELLCHECKER_CID); michael@0: michael@0: static const mozilla::Module::CIDEntry kSpellcheckCIDs[] = { michael@0: { &kMOZ_HUNSPELL_CID, false, nullptr, mozHunspellConstructor }, michael@0: { &kHUNSPELLDIRPROVIDER_CID, false, nullptr, mozHunspellDirProviderConstructor }, michael@0: { &kNS_SPELLCHECKER_CID, false, nullptr, mozSpellCheckerConstructor }, michael@0: { &kMOZ_PERSONALDICTIONARY_CID, false, nullptr, mozPersonalDictionaryConstructor }, michael@0: { &kMOZ_SPELLI18NMANAGER_CID, false, nullptr, mozSpellI18NManagerConstructor }, michael@0: { &kMOZ_INLINESPELLCHECKER_CID, false, nullptr, mozInlineSpellCheckerConstructor }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module::ContractIDEntry kSpellcheckContracts[] = { michael@0: { MOZ_HUNSPELL_CONTRACTID, &kMOZ_HUNSPELL_CID }, michael@0: { mozHunspellDirProvider::kContractID, &kHUNSPELLDIRPROVIDER_CID }, michael@0: { NS_SPELLCHECKER_CONTRACTID, &kNS_SPELLCHECKER_CID }, michael@0: { MOZ_PERSONALDICTIONARY_CONTRACTID, &kMOZ_PERSONALDICTIONARY_CID }, michael@0: { MOZ_SPELLI18NMANAGER_CONTRACTID, &kMOZ_SPELLI18NMANAGER_CID }, michael@0: { MOZ_INLINESPELLCHECKER_CONTRACTID, &kMOZ_INLINESPELLCHECKER_CID }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module::CategoryEntry kSpellcheckCategories[] = { michael@0: { XPCOM_DIRECTORY_PROVIDER_CATEGORY, "spellcheck-directory-provider", mozHunspellDirProvider::kContractID }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: const mozilla::Module kSpellcheckModule = { michael@0: mozilla::Module::kVersion, michael@0: kSpellcheckCIDs, michael@0: kSpellcheckContracts, michael@0: kSpellcheckCategories michael@0: }; michael@0: michael@0: NSMODULE_DEFN(mozSpellCheckerModule) = &kSpellcheckModule;