toolkit/system/gnome/nsGnomeModule.cpp

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial