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: michael@0: #include "mozilla/ModuleUtils.h" michael@0: #include "nsDeflateConverter.h" michael@0: #include "nsZipWriter.h" michael@0: michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeflateConverter) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsZipWriter) michael@0: michael@0: NS_DEFINE_NAMED_CID(DEFLATECONVERTER_CID); michael@0: NS_DEFINE_NAMED_CID(ZIPWRITER_CID); michael@0: michael@0: static const mozilla::Module::CIDEntry kZipWriterCIDs[] = { michael@0: { &kDEFLATECONVERTER_CID, false, nullptr, nsDeflateConverterConstructor }, michael@0: { &kZIPWRITER_CID, false, nullptr, nsZipWriterConstructor }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module::ContractIDEntry kZipWriterContracts[] = { michael@0: { "@mozilla.org/streamconv;1?from=uncompressed&to=deflate", &kDEFLATECONVERTER_CID }, michael@0: { "@mozilla.org/streamconv;1?from=uncompressed&to=gzip", &kDEFLATECONVERTER_CID }, michael@0: { "@mozilla.org/streamconv;1?from=uncompressed&to=x-gzip", &kDEFLATECONVERTER_CID }, michael@0: { "@mozilla.org/streamconv;1?from=uncompressed&to=rawdeflate", &kDEFLATECONVERTER_CID }, michael@0: { ZIPWRITER_CONTRACTID, &kZIPWRITER_CID }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module kZipWriterModule = { michael@0: mozilla::Module::kVersion, michael@0: kZipWriterCIDs, michael@0: kZipWriterContracts michael@0: }; michael@0: michael@0: NSMODULE_DEFN(ZipWriterModule) = &kZipWriterModule;