michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "mozilla/ModuleUtils.h" michael@0: #include "nsServiceManagerUtils.h" michael@0: michael@0: #include "nsIconProtocolHandler.h" michael@0: #include "nsIconURI.h" michael@0: #include "nsIconChannel.h" michael@0: michael@0: // objects that just require generic constructors michael@0: /****************************************************************************** michael@0: * Protocol CIDs michael@0: */ michael@0: #define NS_ICONPROTOCOL_CID { 0xd0f9db12, 0x249c, 0x11d5, { 0x99, 0x5, 0x0, 0x10, 0x83, 0x1, 0xe, 0x9b } } michael@0: michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsIconProtocolHandler) michael@0: michael@0: NS_DEFINE_NAMED_CID(NS_ICONPROTOCOL_CID); michael@0: michael@0: static const mozilla::Module::CIDEntry kIconCIDs[] = { michael@0: { &kNS_ICONPROTOCOL_CID, false, nullptr, nsIconProtocolHandlerConstructor }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module::ContractIDEntry kIconContracts[] = { michael@0: { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "moz-icon", &kNS_ICONPROTOCOL_CID }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module::CategoryEntry kIconCategories[] = { michael@0: { nullptr } michael@0: }; michael@0: michael@0: static void michael@0: IconDecoderModuleDtor() michael@0: { michael@0: #if (MOZ_WIDGET_GTK == 2) michael@0: nsIconChannel::Shutdown(); michael@0: #endif michael@0: } michael@0: michael@0: static const mozilla::Module kIconModule = { michael@0: mozilla::Module::kVersion, michael@0: kIconCIDs, michael@0: kIconContracts, michael@0: kIconCategories, michael@0: nullptr, michael@0: nullptr, michael@0: IconDecoderModuleDtor michael@0: }; michael@0: michael@0: NSMODULE_DEFN(nsIconDecoderModule) = &kIconModule;