michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 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 "nsNetUtil.h" michael@0: #include "nsDirectoryViewer.h" michael@0: #include "rdf.h" michael@0: #include "nsRDFCID.h" michael@0: #include "nsCURILoader.h" michael@0: michael@0: // Factory constructors michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHTTPIndex, Init) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsDirectoryViewerFactory) michael@0: michael@0: NS_DEFINE_NAMED_CID(NS_DIRECTORYVIEWERFACTORY_CID); michael@0: NS_DEFINE_NAMED_CID(NS_HTTPINDEX_SERVICE_CID); michael@0: michael@0: static const mozilla::Module::CIDEntry kXPFECIDs[] = { michael@0: { &kNS_DIRECTORYVIEWERFACTORY_CID, false, nullptr, nsDirectoryViewerFactoryConstructor }, michael@0: { &kNS_HTTPINDEX_SERVICE_CID, false, nullptr, nsHTTPIndexConstructor }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module::ContractIDEntry kXPFEContracts[] = { michael@0: { "@mozilla.org/xpfe/http-index-format-factory-constructor", &kNS_DIRECTORYVIEWERFACTORY_CID }, michael@0: { NS_HTTPINDEX_SERVICE_CONTRACTID, &kNS_HTTPINDEX_SERVICE_CID }, michael@0: { NS_HTTPINDEX_DATASOURCE_CONTRACTID, &kNS_HTTPINDEX_SERVICE_CID }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module::CategoryEntry kXPFECategories[] = { michael@0: { "Gecko-Content-Viewers", "application/http-index-format", "@mozilla.org/xpfe/http-index-format-factory-constructor" }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module kXPFEModule = { michael@0: mozilla::Module::kVersion, michael@0: kXPFECIDs, michael@0: kXPFEContracts, michael@0: kXPFECategories michael@0: }; michael@0: michael@0: NSMODULE_DEFN(application) = &kXPFEModule;