2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* 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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2009-01-08 00:12:16 -08:00
|
|
|
#include "nsToolkitCompsCID.h"
|
2010-06-12 17:50:56 -07:00
|
|
|
#include "mozilla/ModuleUtils.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2011-06-03 08:45:38 -07:00
|
|
|
#include <glib-object.h>
|
|
|
|
|
2009-12-22 23:35:27 -08:00
|
|
|
#ifdef MOZ_ENABLE_GCONF
|
2010-01-12 02:23:53 -08:00
|
|
|
#include "nsGConfService.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGConfService, Init)
|
2009-12-22 23:35:27 -08:00
|
|
|
#endif
|
2009-08-25 11:58:11 -07:00
|
|
|
#ifdef MOZ_ENABLE_GNOMEVFS
|
2010-01-12 02:23:53 -08:00
|
|
|
#include "nsGnomeVFSService.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGnomeVFSService, Init)
|
2009-08-25 11:58:11 -07:00
|
|
|
#endif
|
|
|
|
#ifdef MOZ_ENABLE_GIO
|
2010-01-12 02:23:53 -08:00
|
|
|
#include "nsGIOService.h"
|
2011-05-12 01:14:55 -07:00
|
|
|
#include "nsGSettingsService.h"
|
2011-06-01 10:19:16 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsGIOService)
|
2011-05-12 01:14:55 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGSettingsService, Init)
|
2009-08-25 11:58:11 -07:00
|
|
|
#endif
|
2009-01-08 00:12:16 -08:00
|
|
|
|
2009-12-22 23:35:27 -08:00
|
|
|
#ifdef MOZ_ENABLE_GCONF
|
2010-06-12 17:50:56 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_GCONFSERVICE_CID);
|
2009-12-22 23:35:27 -08:00
|
|
|
#endif
|
2009-08-25 11:58:11 -07:00
|
|
|
#ifdef MOZ_ENABLE_GNOMEVFS
|
2010-06-12 17:50:56 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_GNOMEVFSSERVICE_CID);
|
2009-08-25 11:58:11 -07:00
|
|
|
#endif
|
|
|
|
#ifdef MOZ_ENABLE_GIO
|
2010-06-12 17:50:56 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_GIOSERVICE_CID);
|
2011-05-12 01:14:55 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_GSETTINGSSERVICE_CID);
|
2009-08-25 11:58:11 -07:00
|
|
|
#endif
|
2010-06-12 17:50:56 -07:00
|
|
|
|
|
|
|
static const mozilla::Module::CIDEntry kGnomeCIDs[] = {
|
|
|
|
#ifdef MOZ_ENABLE_GCONF
|
2013-10-10 13:36:42 -07:00
|
|
|
{ &kNS_GCONFSERVICE_CID, false, nullptr, nsGConfServiceConstructor },
|
2010-06-12 17:50:56 -07:00
|
|
|
#endif
|
|
|
|
#ifdef MOZ_ENABLE_GNOMEVFS
|
2013-10-10 13:36:42 -07:00
|
|
|
{ &kNS_GNOMEVFSSERVICE_CID, false, nullptr, nsGnomeVFSServiceConstructor },
|
2010-06-12 17:50:56 -07:00
|
|
|
#endif
|
|
|
|
#ifdef MOZ_ENABLE_GIO
|
2013-10-10 13:36:42 -07:00
|
|
|
{ &kNS_GIOSERVICE_CID, false, nullptr, nsGIOServiceConstructor },
|
|
|
|
{ &kNS_GSETTINGSSERVICE_CID, false, nullptr, nsGSettingsServiceConstructor },
|
2010-06-12 17:50:56 -07:00
|
|
|
#endif
|
2013-10-10 13:36:42 -07:00
|
|
|
{ nullptr }
|
2010-06-12 17:50:56 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
static const mozilla::Module::ContractIDEntry kGnomeContracts[] = {
|
|
|
|
#ifdef MOZ_ENABLE_GCONF
|
|
|
|
{ NS_GCONFSERVICE_CONTRACTID, &kNS_GCONFSERVICE_CID },
|
|
|
|
#endif
|
|
|
|
#ifdef MOZ_ENABLE_GNOMEVFS
|
|
|
|
{ NS_GNOMEVFSSERVICE_CONTRACTID, &kNS_GNOMEVFSSERVICE_CID },
|
|
|
|
#endif
|
|
|
|
#ifdef MOZ_ENABLE_GIO
|
|
|
|
{ NS_GIOSERVICE_CONTRACTID, &kNS_GIOSERVICE_CID },
|
2011-05-12 01:14:55 -07:00
|
|
|
{ NS_GSETTINGSSERVICE_CONTRACTID, &kNS_GSETTINGSSERVICE_CID },
|
2010-06-12 17:50:56 -07:00
|
|
|
#endif
|
2013-10-10 13:36:42 -07:00
|
|
|
{ nullptr }
|
2010-06-12 17:50:56 -07:00
|
|
|
};
|
|
|
|
|
2011-06-01 10:19:16 -07:00
|
|
|
static nsresult
|
|
|
|
InitGType ()
|
|
|
|
{
|
|
|
|
g_type_init();
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2010-06-12 17:50:56 -07:00
|
|
|
static const mozilla::Module kGnomeModule = {
|
|
|
|
mozilla::Module::kVersion,
|
|
|
|
kGnomeCIDs,
|
2011-06-01 10:19:16 -07:00
|
|
|
kGnomeContracts,
|
2013-10-10 13:36:42 -07:00
|
|
|
nullptr,
|
|
|
|
nullptr,
|
2011-06-01 10:19:16 -07:00
|
|
|
InitGType
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
2010-06-12 17:50:56 -07:00
|
|
|
NSMODULE_DEFN(mozgnome) = &kGnomeModule;
|