michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 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 "nsToolkitCompsCID.h" michael@0: #include "mozilla/ModuleUtils.h" michael@0: michael@0: #include michael@0: michael@0: #ifdef MOZ_ENABLE_GCONF michael@0: #include "nsGConfService.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGConfService, Init) michael@0: #endif michael@0: #ifdef MOZ_ENABLE_GNOMEVFS michael@0: #include "nsGnomeVFSService.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGnomeVFSService, Init) michael@0: #endif michael@0: #ifdef MOZ_ENABLE_GIO michael@0: #include "nsGIOService.h" michael@0: #include "nsGSettingsService.h" michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsGIOService) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGSettingsService, Init) michael@0: #endif michael@0: michael@0: #ifdef MOZ_ENABLE_GCONF michael@0: NS_DEFINE_NAMED_CID(NS_GCONFSERVICE_CID); michael@0: #endif michael@0: #ifdef MOZ_ENABLE_GNOMEVFS michael@0: NS_DEFINE_NAMED_CID(NS_GNOMEVFSSERVICE_CID); michael@0: #endif michael@0: #ifdef MOZ_ENABLE_GIO michael@0: NS_DEFINE_NAMED_CID(NS_GIOSERVICE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_GSETTINGSSERVICE_CID); michael@0: #endif michael@0: michael@0: static const mozilla::Module::CIDEntry kGnomeCIDs[] = { michael@0: #ifdef MOZ_ENABLE_GCONF michael@0: { &kNS_GCONFSERVICE_CID, false, nullptr, nsGConfServiceConstructor }, michael@0: #endif michael@0: #ifdef MOZ_ENABLE_GNOMEVFS michael@0: { &kNS_GNOMEVFSSERVICE_CID, false, nullptr, nsGnomeVFSServiceConstructor }, michael@0: #endif michael@0: #ifdef MOZ_ENABLE_GIO michael@0: { &kNS_GIOSERVICE_CID, false, nullptr, nsGIOServiceConstructor }, michael@0: { &kNS_GSETTINGSSERVICE_CID, false, nullptr, nsGSettingsServiceConstructor }, michael@0: #endif michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module::ContractIDEntry kGnomeContracts[] = { michael@0: #ifdef MOZ_ENABLE_GCONF michael@0: { NS_GCONFSERVICE_CONTRACTID, &kNS_GCONFSERVICE_CID }, michael@0: #endif michael@0: #ifdef MOZ_ENABLE_GNOMEVFS michael@0: { NS_GNOMEVFSSERVICE_CONTRACTID, &kNS_GNOMEVFSSERVICE_CID }, michael@0: #endif michael@0: #ifdef MOZ_ENABLE_GIO michael@0: { NS_GIOSERVICE_CONTRACTID, &kNS_GIOSERVICE_CID }, michael@0: { NS_GSETTINGSSERVICE_CONTRACTID, &kNS_GSETTINGSSERVICE_CID }, michael@0: #endif michael@0: { nullptr } michael@0: }; michael@0: michael@0: static nsresult michael@0: InitGType () michael@0: { michael@0: g_type_init(); michael@0: return NS_OK; michael@0: } michael@0: michael@0: static const mozilla::Module kGnomeModule = { michael@0: mozilla::Module::kVersion, michael@0: kGnomeCIDs, michael@0: kGnomeContracts, michael@0: nullptr, michael@0: nullptr, michael@0: InitGType michael@0: }; michael@0: michael@0: NSMODULE_DEFN(mozgnome) = &kGnomeModule;