extensions/pref/autoconfig/src/nsConfigFactory.cpp

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/extensions/pref/autoconfig/src/nsConfigFactory.cpp	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,41 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "mozilla/ModuleUtils.h"
    1.10 +#include "nsAutoConfig.h"
    1.11 +#include "nsReadConfig.h"
    1.12 +#include "nsIAppStartupNotifier.h"
    1.13 +
    1.14 +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAutoConfig, Init)
    1.15 +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsReadConfig, Init)
    1.16 +
    1.17 +NS_DEFINE_NAMED_CID(NS_AUTOCONFIG_CID);
    1.18 +NS_DEFINE_NAMED_CID(NS_READCONFIG_CID);
    1.19 +
    1.20 +static const mozilla::Module::CIDEntry kAutoConfigCIDs[] = {
    1.21 +  { &kNS_AUTOCONFIG_CID, false, nullptr, nsAutoConfigConstructor },
    1.22 +  { &kNS_READCONFIG_CID, false, nullptr, nsReadConfigConstructor },
    1.23 +  { nullptr }
    1.24 +};
    1.25 +
    1.26 +static const mozilla::Module::ContractIDEntry kAutoConfigContracts[] = {
    1.27 +  { NS_AUTOCONFIG_CONTRACTID, &kNS_AUTOCONFIG_CID },
    1.28 +  { NS_READCONFIG_CONTRACTID, &kNS_READCONFIG_CID },
    1.29 +  { nullptr }
    1.30 +};
    1.31 +
    1.32 +static const mozilla::Module::CategoryEntry kAutoConfigCategories[] = {
    1.33 +  { "pref-config-startup", "ReadConfig Module", NS_READCONFIG_CONTRACTID },
    1.34 +  { nullptr }
    1.35 +};
    1.36 +
    1.37 +static const mozilla::Module kAutoConfigModule = {
    1.38 +  mozilla::Module::kVersion,
    1.39 +  kAutoConfigCIDs,
    1.40 +  kAutoConfigContracts,
    1.41 +  kAutoConfigCategories
    1.42 +};
    1.43 +
    1.44 +NSMODULE_DEFN(nsAutoConfigModule) = &kAutoConfigModule;

mercurial