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