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 "base/linked_ptr.h" michael@0: michael@0: #include "mozilla/ModuleUtils.h" michael@0: #include "nsIClassInfoImpl.h" michael@0: michael@0: #ifdef MOZ_WEBRTC michael@0: michael@0: #include "PeerConnectionImpl.h" michael@0: michael@0: #define PEERCONNECTION_CID \ michael@0: {0xb93af7a1, 0x3411, 0x44a8, {0xbd, 0x0a, 0x8a, 0xf3, 0xdd, 0xe4, 0xd8, 0xd8}} michael@0: michael@0: #define PEERCONNECTION_CONTRACTID "@mozilla.org/peerconnection;1" michael@0: michael@0: #include "stun_udp_socket_filter.h" michael@0: michael@0: NS_DEFINE_NAMED_CID(NS_STUN_UDP_SOCKET_FILTER_HANDLER_CID) michael@0: michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsStunUDPSocketFilterHandler) michael@0: michael@0: michael@0: namespace sipcc michael@0: { michael@0: // Factory defined in sipcc::, defines sipcc::PeerConnectionImplConstructor michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(PeerConnectionImpl) michael@0: } michael@0: michael@0: // Defines kPEERCONNECTION_CID michael@0: NS_DEFINE_NAMED_CID(PEERCONNECTION_CID); michael@0: michael@0: static const mozilla::Module::CIDEntry kCIDs[] = { michael@0: { &kPEERCONNECTION_CID, false, nullptr, sipcc::PeerConnectionImplConstructor }, michael@0: { &kNS_STUN_UDP_SOCKET_FILTER_HANDLER_CID, false, nullptr, nsStunUDPSocketFilterHandlerConstructor }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module::ContractIDEntry kContracts[] = { michael@0: { PEERCONNECTION_CONTRACTID, &kPEERCONNECTION_CID }, michael@0: { NS_STUN_UDP_SOCKET_FILTER_HANDLER_CONTRACTID, &kNS_STUN_UDP_SOCKET_FILTER_HANDLER_CID }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module kModule = { michael@0: mozilla::Module::kVersion, michael@0: kCIDs, michael@0: kContracts michael@0: }; michael@0: michael@0: NSMODULE_DEFN(peerconnection) = &kModule; michael@0: michael@0: #endif