diff options
Diffstat (limited to 'comm/suite/components/build')
-rw-r--r-- | comm/suite/components/build/Makefile.in | 8 | ||||
-rw-r--r-- | comm/suite/components/build/moz.build | 23 | ||||
-rw-r--r-- | comm/suite/components/build/nsSuiteCID.h | 24 | ||||
-rw-r--r-- | comm/suite/components/build/nsSuiteModule.cpp | 87 |
4 files changed, 142 insertions, 0 deletions
diff --git a/comm/suite/components/build/Makefile.in b/comm/suite/components/build/Makefile.in new file mode 100644 index 0000000000..2387227ab4 --- /dev/null +++ b/comm/suite/components/build/Makefile.in @@ -0,0 +1,8 @@ +# 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/. + +include $(topsrcdir)/config/rules.mk + +# Ensure that we don't embed a manifest referencing the CRT. +EMBED_MANIFEST_AT = diff --git a/comm/suite/components/build/moz.build b/comm/suite/components/build/moz.build new file mode 100644 index 0000000000..4778cb3404 --- /dev/null +++ b/comm/suite/components/build/moz.build @@ -0,0 +1,23 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# 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/. + +EXPORTS += [ + "nsSuiteCID.h", +] + +SOURCES += [ + "nsSuiteModule.cpp", +] + +Library("suite") +FINAL_LIBRARY = "xul" + +LOCAL_INCLUDES += [ + "../feeds", + "../migration/src", + "../profile", + "../shell", +] diff --git a/comm/suite/components/build/nsSuiteCID.h b/comm/suite/components/build/nsSuiteCID.h new file mode 100644 index 0000000000..0ee2802151 --- /dev/null +++ b/comm/suite/components/build/nsSuiteCID.h @@ -0,0 +1,24 @@ +/* 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/. */ + +// {e5eeef51-05ce-4885-9434-7287616d9547} +#define NS_FEEDSNIFFER_CID \ + { 0xe5eeef51, 0x5ce, 0x4885, { 0x94, 0x34, 0x72, 0x87, 0x61, 0x6d, 0x95, 0x47 } } + +#define NS_FEEDSNIFFER_CONTRACTID \ + "@mozilla.org/browser/feeds/sniffer;1" + +// {39b688ec-e308-49e5-be6b-28dc7fcd6154} +#define NS_SHELLSERVICE_CID \ + { 0x39b688ec, 0xe308, 0x49e5, { 0xbe, 0x6b, 0x28, 0xdc, 0x7f, 0xcd, 0x61, 0x54 } } + +#define NS_SHELLSERVICE_CONTRACTID \ + "@mozilla.org/suite/shell-service;1" + +// {9aa21826-9d1d-433d-8c10-f313b26fa9dd} +#define NS_SUITEDIRECTORYPROVIDER_CID \ + { 0x9aa21826, 0x9d1d, 0x433d, { 0x8c, 0x10, 0xf3, 0x13, 0xb2, 0x6f, 0xa9, 0xdd } } + +#define NS_SUITEDIRECTORYPROVIDER_CONTRACTID \ + "@mozilla.org/suite/directory-provider;1" diff --git a/comm/suite/components/build/nsSuiteModule.cpp b/comm/suite/components/build/nsSuiteModule.cpp new file mode 100644 index 0000000000..c9d2b4503c --- /dev/null +++ b/comm/suite/components/build/nsSuiteModule.cpp @@ -0,0 +1,87 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* 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/. */ + +#include "mozilla/ModuleUtils.h" +#include "nsSuiteDirectoryProvider.h" +#include "nsThunderbirdProfileMigrator.h" +#include "nsSuiteMigrationCID.h" +#include "nsNetCID.h" +#include "nsFeedSniffer.h" + +#if defined(XP_WIN) +#include "nsWindowsShellService.h" +#elif defined(XP_MACOSX) +#include "nsMacShellService.h" +#elif defined(MOZ_WIDGET_GTK) +#include "nsGNOMEShellService.h" +#endif + +using namespace mozilla; +///////////////////////////////////////////////////////////////////////////// + +#if defined(XP_WIN) +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsWindowsShellService, Init) +#elif defined(XP_MACOSX) +NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService) +#elif defined(MOZ_WIDGET_GTK) +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init) +#endif +NS_GENERIC_FACTORY_CONSTRUCTOR(nsSuiteDirectoryProvider) +NS_GENERIC_FACTORY_CONSTRUCTOR(nsThunderbirdProfileMigrator) +NS_GENERIC_FACTORY_CONSTRUCTOR(nsFeedSniffer) + +#if defined(XP_WIN) +NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID); +#elif defined(XP_MACOSX) +NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID); +#elif defined(MOZ_WIDGET_GTK) +NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID); +#endif +NS_DEFINE_NAMED_CID(NS_SUITEDIRECTORYPROVIDER_CID); +NS_DEFINE_NAMED_CID(NS_THUNDERBIRDPROFILEMIGRATOR_CID); +NS_DEFINE_NAMED_CID(NS_FEEDSNIFFER_CID); + +///////////////////////////////////////////////////////////////////////////// + +static const mozilla::Module::CIDEntry kSuiteCIDs[] = { +#if defined(XP_WIN) + { &kNS_SHELLSERVICE_CID, false, NULL, nsWindowsShellServiceConstructor }, +#elif defined(XP_MACOSX) + { &kNS_SHELLSERVICE_CID, false, NULL, nsMacShellServiceConstructor }, +#elif defined(MOZ_WIDGET_GTK) + { &kNS_SHELLSERVICE_CID, false, NULL, nsGNOMEShellServiceConstructor }, +#endif + { &kNS_SUITEDIRECTORYPROVIDER_CID, false, NULL, nsSuiteDirectoryProviderConstructor }, + { &kNS_THUNDERBIRDPROFILEMIGRATOR_CID, false, NULL, nsThunderbirdProfileMigratorConstructor }, + { &kNS_FEEDSNIFFER_CID, false, NULL, nsFeedSnifferConstructor }, + { NULL } +}; + +static const mozilla::Module::ContractIDEntry kSuiteContracts[] = { +#if defined(XP_WIN) + { NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID }, +#elif defined(XP_MACOSX) + { NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID }, +#elif defined(MOZ_WIDGET_GTK) + { NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID }, +#endif + { NS_SUITEDIRECTORYPROVIDER_CONTRACTID, &kNS_SUITEDIRECTORYPROVIDER_CID }, + { NS_SUITEPROFILEMIGRATOR_CONTRACTID_PREFIX "thunderbird", &kNS_THUNDERBIRDPROFILEMIGRATOR_CID }, + { NS_FEEDSNIFFER_CONTRACTID, &kNS_FEEDSNIFFER_CID }, + { NULL } +}; + +static const mozilla::Module::CategoryEntry kSuiteCategories[] = { + { XPCOM_DIRECTORY_PROVIDER_CATEGORY, "suite-directory-provider", NS_SUITEDIRECTORYPROVIDER_CONTRACTID }, + { NS_CONTENT_SNIFFER_CATEGORY, "Feed Sniffer", NS_FEEDSNIFFER_CONTRACTID }, + { NULL } +}; + +extern const mozilla::Module kSuiteModule = { + mozilla::Module::kVersion, + kSuiteCIDs, + kSuiteContracts, + kSuiteCategories +}; |