Line data Source code
1 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* This Source Code Form is subject to the terms of the Mozilla Public
3 : * License, v. 2.0. If a copy of the MPL was not distributed with this
4 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 :
6 : #include "nsToolkitCompsCID.h"
7 : #include "mozilla/ModuleUtils.h"
8 :
9 : #include <glib-object.h>
10 :
11 : #ifdef MOZ_ENABLE_GCONF
12 : #include "nsGConfService.h"
13 0 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGConfService, Init)
14 : #endif
15 : #include "nsGIOService.h"
16 : #include "nsGSettingsService.h"
17 : #include "nsPackageKitService.h"
18 2 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsGIOService)
19 0 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGSettingsService, Init)
20 0 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPackageKitService, Init)
21 : #include "nsSystemAlertsService.h"
22 0 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSystemAlertsService, Init)
23 :
24 : #ifdef MOZ_ENABLE_GCONF
25 : NS_DEFINE_NAMED_CID(NS_GCONFSERVICE_CID);
26 : #endif
27 : NS_DEFINE_NAMED_CID(NS_GIOSERVICE_CID);
28 : NS_DEFINE_NAMED_CID(NS_GSETTINGSSERVICE_CID);
29 : NS_DEFINE_NAMED_CID(NS_PACKAGEKITSERVICE_CID);
30 : NS_DEFINE_NAMED_CID(NS_SYSTEMALERTSSERVICE_CID);
31 :
32 : static const mozilla::Module::CIDEntry kGnomeCIDs[] = {
33 : #ifdef MOZ_ENABLE_GCONF
34 : { &kNS_GCONFSERVICE_CID, false, nullptr, nsGConfServiceConstructor },
35 : #endif
36 : { &kNS_GIOSERVICE_CID, false, nullptr, nsGIOServiceConstructor },
37 : { &kNS_GSETTINGSSERVICE_CID, false, nullptr, nsGSettingsServiceConstructor },
38 : { &kNS_PACKAGEKITSERVICE_CID, false, nullptr, nsPackageKitServiceConstructor },
39 : { &kNS_SYSTEMALERTSSERVICE_CID, false, nullptr, nsSystemAlertsServiceConstructor },
40 : { nullptr }
41 : };
42 :
43 : static const mozilla::Module::ContractIDEntry kGnomeContracts[] = {
44 : #ifdef MOZ_ENABLE_GCONF
45 : { NS_GCONFSERVICE_CONTRACTID, &kNS_GCONFSERVICE_CID },
46 : #endif
47 : { NS_GIOSERVICE_CONTRACTID, &kNS_GIOSERVICE_CID },
48 : { NS_GSETTINGSSERVICE_CONTRACTID, &kNS_GSETTINGSSERVICE_CID },
49 : { NS_PACKAGEKITSERVICE_CONTRACTID, &kNS_PACKAGEKITSERVICE_CID },
50 : { NS_SYSTEMALERTSERVICE_CONTRACTID, &kNS_SYSTEMALERTSSERVICE_CID },
51 : { nullptr }
52 : };
53 :
54 : static nsresult
55 1 : InitGType ()
56 : {
57 1 : g_type_init();
58 1 : return NS_OK;
59 : }
60 :
61 : static const mozilla::Module kGnomeModule = {
62 : mozilla::Module::kVersion,
63 : kGnomeCIDs,
64 : kGnomeContracts,
65 : nullptr,
66 : nullptr,
67 : InitGType
68 : };
69 :
70 : NSMODULE_DEFN(mozgnome) = &kGnomeModule;
|