Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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/. */
6 #include "nsToolkitCompsCID.h"
7 #include "mozilla/ModuleUtils.h"
9 #include <glib-object.h>
11 #ifdef MOZ_ENABLE_GCONF
12 #include "nsGConfService.h"
13 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGConfService, Init)
14 #endif
15 #ifdef MOZ_ENABLE_GNOMEVFS
16 #include "nsGnomeVFSService.h"
17 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGnomeVFSService, Init)
18 #endif
19 #ifdef MOZ_ENABLE_GIO
20 #include "nsGIOService.h"
21 #include "nsGSettingsService.h"
22 NS_GENERIC_FACTORY_CONSTRUCTOR(nsGIOService)
23 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGSettingsService, Init)
24 #endif
26 #ifdef MOZ_ENABLE_GCONF
27 NS_DEFINE_NAMED_CID(NS_GCONFSERVICE_CID);
28 #endif
29 #ifdef MOZ_ENABLE_GNOMEVFS
30 NS_DEFINE_NAMED_CID(NS_GNOMEVFSSERVICE_CID);
31 #endif
32 #ifdef MOZ_ENABLE_GIO
33 NS_DEFINE_NAMED_CID(NS_GIOSERVICE_CID);
34 NS_DEFINE_NAMED_CID(NS_GSETTINGSSERVICE_CID);
35 #endif
37 static const mozilla::Module::CIDEntry kGnomeCIDs[] = {
38 #ifdef MOZ_ENABLE_GCONF
39 { &kNS_GCONFSERVICE_CID, false, nullptr, nsGConfServiceConstructor },
40 #endif
41 #ifdef MOZ_ENABLE_GNOMEVFS
42 { &kNS_GNOMEVFSSERVICE_CID, false, nullptr, nsGnomeVFSServiceConstructor },
43 #endif
44 #ifdef MOZ_ENABLE_GIO
45 { &kNS_GIOSERVICE_CID, false, nullptr, nsGIOServiceConstructor },
46 { &kNS_GSETTINGSSERVICE_CID, false, nullptr, nsGSettingsServiceConstructor },
47 #endif
48 { nullptr }
49 };
51 static const mozilla::Module::ContractIDEntry kGnomeContracts[] = {
52 #ifdef MOZ_ENABLE_GCONF
53 { NS_GCONFSERVICE_CONTRACTID, &kNS_GCONFSERVICE_CID },
54 #endif
55 #ifdef MOZ_ENABLE_GNOMEVFS
56 { NS_GNOMEVFSSERVICE_CONTRACTID, &kNS_GNOMEVFSSERVICE_CID },
57 #endif
58 #ifdef MOZ_ENABLE_GIO
59 { NS_GIOSERVICE_CONTRACTID, &kNS_GIOSERVICE_CID },
60 { NS_GSETTINGSSERVICE_CONTRACTID, &kNS_GSETTINGSSERVICE_CID },
61 #endif
62 { nullptr }
63 };
65 static nsresult
66 InitGType ()
67 {
68 g_type_init();
69 return NS_OK;
70 }
72 static const mozilla::Module kGnomeModule = {
73 mozilla::Module::kVersion,
74 kGnomeCIDs,
75 kGnomeContracts,
76 nullptr,
77 nullptr,
78 InitGType
79 };
81 NSMODULE_DEFN(mozgnome) = &kGnomeModule;