diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /toolkit/system/gnome/nsGnomeModule.cpp | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'toolkit/system/gnome/nsGnomeModule.cpp')
-rw-r--r-- | toolkit/system/gnome/nsGnomeModule.cpp | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/toolkit/system/gnome/nsGnomeModule.cpp b/toolkit/system/gnome/nsGnomeModule.cpp new file mode 100644 index 000000000..6ecebcc1f --- /dev/null +++ b/toolkit/system/gnome/nsGnomeModule.cpp @@ -0,0 +1,78 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "nsToolkitCompsCID.h" +#include "mozilla/ModuleUtils.h" + +#include <glib-object.h> + +#ifdef MOZ_ENABLE_GCONF +#include "nsGConfService.h" +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGConfService, Init) +#endif +#ifdef MOZ_ENABLE_GIO +#include "nsGIOService.h" +#include "nsGSettingsService.h" +#include "nsPackageKitService.h" +NS_GENERIC_FACTORY_CONSTRUCTOR(nsGIOService) +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGSettingsService, Init) +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPackageKitService, Init) +#endif +#include "nsSystemAlertsService.h" +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSystemAlertsService, Init) + +#ifdef MOZ_ENABLE_GCONF +NS_DEFINE_NAMED_CID(NS_GCONFSERVICE_CID); +#endif +#ifdef MOZ_ENABLE_GIO +NS_DEFINE_NAMED_CID(NS_GIOSERVICE_CID); +NS_DEFINE_NAMED_CID(NS_GSETTINGSSERVICE_CID); +NS_DEFINE_NAMED_CID(NS_PACKAGEKITSERVICE_CID); +#endif +NS_DEFINE_NAMED_CID(NS_SYSTEMALERTSSERVICE_CID); + +static const mozilla::Module::CIDEntry kGnomeCIDs[] = { +#ifdef MOZ_ENABLE_GCONF + { &kNS_GCONFSERVICE_CID, false, nullptr, nsGConfServiceConstructor }, +#endif +#ifdef MOZ_ENABLE_GIO + { &kNS_GIOSERVICE_CID, false, nullptr, nsGIOServiceConstructor }, + { &kNS_GSETTINGSSERVICE_CID, false, nullptr, nsGSettingsServiceConstructor }, + { &kNS_PACKAGEKITSERVICE_CID, false, nullptr, nsPackageKitServiceConstructor }, +#endif + { &kNS_SYSTEMALERTSSERVICE_CID, false, nullptr, nsSystemAlertsServiceConstructor }, + { nullptr } +}; + +static const mozilla::Module::ContractIDEntry kGnomeContracts[] = { +#ifdef MOZ_ENABLE_GCONF + { NS_GCONFSERVICE_CONTRACTID, &kNS_GCONFSERVICE_CID }, +#endif +#ifdef MOZ_ENABLE_GIO + { NS_GIOSERVICE_CONTRACTID, &kNS_GIOSERVICE_CID }, + { NS_GSETTINGSSERVICE_CONTRACTID, &kNS_GSETTINGSSERVICE_CID }, + { NS_PACKAGEKITSERVICE_CONTRACTID, &kNS_PACKAGEKITSERVICE_CID }, +#endif + { NS_SYSTEMALERTSERVICE_CONTRACTID, &kNS_SYSTEMALERTSSERVICE_CID }, + { nullptr } +}; + +static nsresult +InitGType () +{ + g_type_init(); + return NS_OK; +} + +static const mozilla::Module kGnomeModule = { + mozilla::Module::kVersion, + kGnomeCIDs, + kGnomeContracts, + nullptr, + nullptr, + InitGType +}; + +NSMODULE_DEFN(mozgnome) = &kGnomeModule; |