Line data Source code
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/. */
5 :
6 : #include "MulticastDNSDeviceProvider.h"
7 : #include "mozilla/ModuleUtils.h"
8 :
9 : #define MULTICAST_DNS_PROVIDER_CID \
10 : {0x814f947a, 0x52f7, 0x41c9, \
11 : { 0x94, 0xa1, 0x36, 0x84, 0x79, 0x72, 0x84, 0xac }}
12 :
13 : #define MULTICAST_DNS_PROVIDER_CONTRACT_ID "@mozilla.org/presentation-device/multicastdns-provider;1"
14 :
15 : using mozilla::dom::presentation::MulticastDNSDeviceProvider;
16 :
17 0 : NS_GENERIC_FACTORY_CONSTRUCTOR(MulticastDNSDeviceProvider)
18 : NS_DEFINE_NAMED_CID(MULTICAST_DNS_PROVIDER_CID);
19 :
20 : static const mozilla::Module::CIDEntry kPresentationDeviceProviderCIDs[] = {
21 : { &kMULTICAST_DNS_PROVIDER_CID, false, nullptr, MulticastDNSDeviceProviderConstructor },
22 : { nullptr }
23 : };
24 :
25 : static const mozilla::Module::ContractIDEntry kPresentationDeviceProviderContracts[] = {
26 : { MULTICAST_DNS_PROVIDER_CONTRACT_ID, &kMULTICAST_DNS_PROVIDER_CID },
27 : { nullptr }
28 : };
29 :
30 : static const mozilla::Module::CategoryEntry kPresentationDeviceProviderCategories[] = {
31 : #if defined(MOZ_WIDGET_COCOA) || defined(MOZ_WIDGET_ANDROID) || (defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 16)
32 : { PRESENTATION_DEVICE_PROVIDER_CATEGORY, "MulticastDNSDeviceProvider", MULTICAST_DNS_PROVIDER_CONTRACT_ID },
33 : #endif
34 : { nullptr }
35 : };
36 :
37 : static const mozilla::Module kPresentationDeviceProviderModule = {
38 : mozilla::Module::kVersion,
39 : kPresentationDeviceProviderCIDs,
40 : kPresentationDeviceProviderContracts,
41 : kPresentationDeviceProviderCategories
42 : };
43 :
44 : NSMODULE_DEFN(PresentationDeviceProviderModule) = &kPresentationDeviceProviderModule;
|