modules/libjar/zipwriter/src/ZipWriterModule.cpp

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
     4  */
     6 #include "mozilla/ModuleUtils.h"
     7 #include "nsDeflateConverter.h"
     8 #include "nsZipWriter.h"
    10 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeflateConverter)
    11 NS_GENERIC_FACTORY_CONSTRUCTOR(nsZipWriter)
    13 NS_DEFINE_NAMED_CID(DEFLATECONVERTER_CID);
    14 NS_DEFINE_NAMED_CID(ZIPWRITER_CID);
    16 static const mozilla::Module::CIDEntry kZipWriterCIDs[] = {
    17   { &kDEFLATECONVERTER_CID, false, nullptr, nsDeflateConverterConstructor },
    18   { &kZIPWRITER_CID, false, nullptr, nsZipWriterConstructor },
    19   { nullptr }
    20 };
    22 static const mozilla::Module::ContractIDEntry kZipWriterContracts[] = {
    23   { "@mozilla.org/streamconv;1?from=uncompressed&to=deflate", &kDEFLATECONVERTER_CID },
    24   { "@mozilla.org/streamconv;1?from=uncompressed&to=gzip", &kDEFLATECONVERTER_CID },
    25   { "@mozilla.org/streamconv;1?from=uncompressed&to=x-gzip", &kDEFLATECONVERTER_CID },
    26   { "@mozilla.org/streamconv;1?from=uncompressed&to=rawdeflate", &kDEFLATECONVERTER_CID },
    27   { ZIPWRITER_CONTRACTID, &kZIPWRITER_CID },
    28   { nullptr }
    29 };
    31 static const mozilla::Module kZipWriterModule = {
    32   mozilla::Module::kVersion,
    33   kZipWriterCIDs,
    34   kZipWriterContracts
    35 };
    37 NSMODULE_DEFN(ZipWriterModule) = &kZipWriterModule;

mercurial