Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 : /* This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #include "mozilla/ModuleUtils.h"
8 : #include "nsIClassInfoImpl.h"
9 : #include "SpeechDispatcherService.h"
10 :
11 : using namespace mozilla::dom;
12 :
13 : #define SPEECHDISPATCHERSERVICE_CID \
14 : {0x8817b1cf, 0x5ada, 0x43bf, {0xbd, 0x73, 0x60, 0x76, 0x57, 0x70, 0x3d, 0x0d}}
15 :
16 : #define SPEECHDISPATCHERSERVICE_CONTRACTID "@mozilla.org/synthspeechdispatcher;1"
17 :
18 : // Defines SpeechDispatcherServiceConstructor
19 0 : NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(SpeechDispatcherService,
20 : SpeechDispatcherService::GetInstanceForService)
21 :
22 : // Defines kSPEECHDISPATCHERSERVICE_CID
23 : NS_DEFINE_NAMED_CID(SPEECHDISPATCHERSERVICE_CID);
24 :
25 : static const mozilla::Module::CIDEntry kCIDs[] = {
26 : { &kSPEECHDISPATCHERSERVICE_CID, true, nullptr, SpeechDispatcherServiceConstructor },
27 : { nullptr }
28 : };
29 :
30 : static const mozilla::Module::ContractIDEntry kContracts[] = {
31 : { SPEECHDISPATCHERSERVICE_CONTRACTID, &kSPEECHDISPATCHERSERVICE_CID },
32 : { nullptr }
33 : };
34 :
35 : static const mozilla::Module::CategoryEntry kCategories[] = {
36 : { "speech-synth-started", "SpeechDispatcher Speech Synth", SPEECHDISPATCHERSERVICE_CONTRACTID },
37 : { nullptr }
38 : };
39 :
40 : static void
41 0 : UnloadSpeechDispatcherModule()
42 : {
43 0 : SpeechDispatcherService::Shutdown();
44 0 : }
45 :
46 : static const mozilla::Module kModule = {
47 : mozilla::Module::kVersion,
48 : kCIDs,
49 : kContracts,
50 : kCategories,
51 : nullptr,
52 : nullptr,
53 : UnloadSpeechDispatcherModule
54 : };
55 :
56 : NSMODULE_DEFN(synthspeechdispatcher) = &kModule;
|