|
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
|
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 "nsNetUtil.h" |
|
8 #include "nsDirectoryViewer.h" |
|
9 #include "rdf.h" |
|
10 #include "nsRDFCID.h" |
|
11 #include "nsCURILoader.h" |
|
12 |
|
13 // Factory constructors |
|
14 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHTTPIndex, Init) |
|
15 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDirectoryViewerFactory) |
|
16 |
|
17 NS_DEFINE_NAMED_CID(NS_DIRECTORYVIEWERFACTORY_CID); |
|
18 NS_DEFINE_NAMED_CID(NS_HTTPINDEX_SERVICE_CID); |
|
19 |
|
20 static const mozilla::Module::CIDEntry kXPFECIDs[] = { |
|
21 { &kNS_DIRECTORYVIEWERFACTORY_CID, false, nullptr, nsDirectoryViewerFactoryConstructor }, |
|
22 { &kNS_HTTPINDEX_SERVICE_CID, false, nullptr, nsHTTPIndexConstructor }, |
|
23 { nullptr } |
|
24 }; |
|
25 |
|
26 static const mozilla::Module::ContractIDEntry kXPFEContracts[] = { |
|
27 { "@mozilla.org/xpfe/http-index-format-factory-constructor", &kNS_DIRECTORYVIEWERFACTORY_CID }, |
|
28 { NS_HTTPINDEX_SERVICE_CONTRACTID, &kNS_HTTPINDEX_SERVICE_CID }, |
|
29 { NS_HTTPINDEX_DATASOURCE_CONTRACTID, &kNS_HTTPINDEX_SERVICE_CID }, |
|
30 { nullptr } |
|
31 }; |
|
32 |
|
33 static const mozilla::Module::CategoryEntry kXPFECategories[] = { |
|
34 { "Gecko-Content-Viewers", "application/http-index-format", "@mozilla.org/xpfe/http-index-format-factory-constructor" }, |
|
35 { nullptr } |
|
36 }; |
|
37 |
|
38 static const mozilla::Module kXPFEModule = { |
|
39 mozilla::Module::kVersion, |
|
40 kXPFECIDs, |
|
41 kXPFEContracts, |
|
42 kXPFECategories |
|
43 }; |
|
44 |
|
45 NSMODULE_DEFN(application) = &kXPFEModule; |