|
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 |
|
6 #include "mozilla/ModuleUtils.h" |
|
7 #include "nsAutoConfig.h" |
|
8 #include "nsReadConfig.h" |
|
9 #include "nsIAppStartupNotifier.h" |
|
10 |
|
11 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAutoConfig, Init) |
|
12 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsReadConfig, Init) |
|
13 |
|
14 NS_DEFINE_NAMED_CID(NS_AUTOCONFIG_CID); |
|
15 NS_DEFINE_NAMED_CID(NS_READCONFIG_CID); |
|
16 |
|
17 static const mozilla::Module::CIDEntry kAutoConfigCIDs[] = { |
|
18 { &kNS_AUTOCONFIG_CID, false, nullptr, nsAutoConfigConstructor }, |
|
19 { &kNS_READCONFIG_CID, false, nullptr, nsReadConfigConstructor }, |
|
20 { nullptr } |
|
21 }; |
|
22 |
|
23 static const mozilla::Module::ContractIDEntry kAutoConfigContracts[] = { |
|
24 { NS_AUTOCONFIG_CONTRACTID, &kNS_AUTOCONFIG_CID }, |
|
25 { NS_READCONFIG_CONTRACTID, &kNS_READCONFIG_CID }, |
|
26 { nullptr } |
|
27 }; |
|
28 |
|
29 static const mozilla::Module::CategoryEntry kAutoConfigCategories[] = { |
|
30 { "pref-config-startup", "ReadConfig Module", NS_READCONFIG_CONTRACTID }, |
|
31 { nullptr } |
|
32 }; |
|
33 |
|
34 static const mozilla::Module kAutoConfigModule = { |
|
35 mozilla::Module::kVersion, |
|
36 kAutoConfigCIDs, |
|
37 kAutoConfigContracts, |
|
38 kAutoConfigCategories |
|
39 }; |
|
40 |
|
41 NSMODULE_DEFN(nsAutoConfigModule) = &kAutoConfigModule; |