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: #include "mozilla/ModuleUtils.h" michael@0: #include "nsIClassInfoImpl.h" michael@0: michael@0: #ifdef MOZ_WEBRTC michael@0: michael@0: #include "nsPicoService.h" michael@0: michael@0: using namespace mozilla::dom; michael@0: michael@0: #define PICOSERVICE_CID \ michael@0: {0x346c4fc8, 0x12fe, 0x459c, {0x81, 0x19, 0x9a, 0xa7, 0x73, 0x37, 0x7f, 0xf4}} michael@0: michael@0: #define PICOSERVICE_CONTRACTID "@mozilla.org/synthpico;1" michael@0: michael@0: // Defines nsPicoServiceConstructor michael@0: NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsPicoService, michael@0: nsPicoService::GetInstanceForService) michael@0: michael@0: // Defines kPICOSERVICE_CID michael@0: NS_DEFINE_NAMED_CID(PICOSERVICE_CID); michael@0: michael@0: static const mozilla::Module::CIDEntry kCIDs[] = { michael@0: { &kPICOSERVICE_CID, true, nullptr, nsPicoServiceConstructor }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module::ContractIDEntry kContracts[] = { michael@0: { PICOSERVICE_CONTRACTID, &kPICOSERVICE_CID }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module::CategoryEntry kCategories[] = { michael@0: { "profile-after-change", "Pico Speech Synth", PICOSERVICE_CONTRACTID }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static void michael@0: UnloadPicoModule() michael@0: { michael@0: nsPicoService::Shutdown(); michael@0: } michael@0: michael@0: static const mozilla::Module kModule = { michael@0: mozilla::Module::kVersion, michael@0: kCIDs, michael@0: kContracts, michael@0: kCategories, michael@0: nullptr, michael@0: nullptr, michael@0: UnloadPicoModule michael@0: }; michael@0: michael@0: NSMODULE_DEFN(synthpico) = &kModule; michael@0: #endif