Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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/. */
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"
13 // Factory constructors
14 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHTTPIndex, Init)
15 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDirectoryViewerFactory)
17 NS_DEFINE_NAMED_CID(NS_DIRECTORYVIEWERFACTORY_CID);
18 NS_DEFINE_NAMED_CID(NS_HTTPINDEX_SERVICE_CID);
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 };
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 };
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 };
38 static const mozilla::Module kXPFEModule = {
39 mozilla::Module::kVersion,
40 kXPFECIDs,
41 kXPFEContracts,
42 kXPFECategories
43 };
45 NSMODULE_DEFN(application) = &kXPFEModule;