1/*
2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY!
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#pragma once
22
23#if ENABLE(WEB_RTC)
24
25#include "JSDOMConvertDictionary.h"
26#include "JSDOMConvertEnumeration.h"
27#include "JSDOMWrapper.h"
28#include "RTCStatsReport.h"
29#include <wtf/NeverDestroyed.h>
30
31namespace WebCore {
32
33class JSRTCStatsReport : public JSDOMWrapper<RTCStatsReport> {
34public:
35 using Base = JSDOMWrapper<RTCStatsReport>;
36 static JSRTCStatsReport* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<RTCStatsReport>&& impl)
37 {
38 JSRTCStatsReport* ptr = new (NotNull, JSC::allocateCell<JSRTCStatsReport>(globalObject->vm().heap)) JSRTCStatsReport(structure, *globalObject, WTFMove(impl));
39 ptr->finishCreation(globalObject->vm());
40 return ptr;
41 }
42
43 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
44 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
45 static RTCStatsReport* toWrapped(JSC::VM&, JSC::JSValue);
46 static void destroy(JSC::JSCell*);
47
48 DECLARE_INFO;
49
50 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
51 {
52 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
53 }
54
55 static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
56 static void heapSnapshot(JSCell*, JSC::HeapSnapshotBuilder&);
57protected:
58 JSRTCStatsReport(JSC::Structure*, JSDOMGlobalObject&, Ref<RTCStatsReport>&&);
59
60 void finishCreation(JSC::VM&);
61};
62
63class JSRTCStatsReportOwner : public JSC::WeakHandleOwner {
64public:
65 virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&, const char**);
66 virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
67};
68
69inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, RTCStatsReport*)
70{
71 static NeverDestroyed<JSRTCStatsReportOwner> owner;
72 return &owner.get();
73}
74
75inline void* wrapperKey(RTCStatsReport* wrappableObject)
76{
77 return wrappableObject;
78}
79
80JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, RTCStatsReport&);
81inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, RTCStatsReport* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
82JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, Ref<RTCStatsReport>&&);
83inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, RefPtr<RTCStatsReport>&& impl) { return impl ? toJSNewlyCreated(state, globalObject, impl.releaseNonNull()) : JSC::jsNull(); }
84
85template<> struct JSDOMWrapperConverterTraits<RTCStatsReport> {
86 using WrapperClass = JSRTCStatsReport;
87 using ToWrappedReturnType = RTCStatsReport*;
88};
89String convertEnumerationToString(RTCStatsReport::Type);
90template<> JSC::JSString* convertEnumerationToJS(JSC::ExecState&, RTCStatsReport::Type);
91
92template<> Optional<RTCStatsReport::Type> parseEnumeration<RTCStatsReport::Type>(JSC::ExecState&, JSC::JSValue);
93template<> const char* expectedEnumerationValues<RTCStatsReport::Type>();
94
95String convertEnumerationToString(RTCStatsReport::IceCandidatePairState);
96template<> JSC::JSString* convertEnumerationToJS(JSC::ExecState&, RTCStatsReport::IceCandidatePairState);
97
98template<> Optional<RTCStatsReport::IceCandidatePairState> parseEnumeration<RTCStatsReport::IceCandidatePairState>(JSC::ExecState&, JSC::JSValue);
99template<> const char* expectedEnumerationValues<RTCStatsReport::IceCandidatePairState>();
100
101String convertEnumerationToString(RTCStatsReport::IceCandidateType);
102template<> JSC::JSString* convertEnumerationToJS(JSC::ExecState&, RTCStatsReport::IceCandidateType);
103
104template<> Optional<RTCStatsReport::IceCandidateType> parseEnumeration<RTCStatsReport::IceCandidateType>(JSC::ExecState&, JSC::JSValue);
105template<> const char* expectedEnumerationValues<RTCStatsReport::IceCandidateType>();
106
107String convertEnumerationToString(RTCStatsReport::CodecType);
108template<> JSC::JSString* convertEnumerationToJS(JSC::ExecState&, RTCStatsReport::CodecType);
109
110template<> Optional<RTCStatsReport::CodecType> parseEnumeration<RTCStatsReport::CodecType>(JSC::ExecState&, JSC::JSValue);
111template<> const char* expectedEnumerationValues<RTCStatsReport::CodecType>();
112
113template<> RTCStatsReport::Stats convertDictionary<RTCStatsReport::Stats>(JSC::ExecState&, JSC::JSValue);
114
115template<> RTCStatsReport::RTCRTPStreamStats convertDictionary<RTCStatsReport::RTCRTPStreamStats>(JSC::ExecState&, JSC::JSValue);
116
117template<> RTCStatsReport::InboundRTPStreamStats convertDictionary<RTCStatsReport::InboundRTPStreamStats>(JSC::ExecState&, JSC::JSValue);
118
119JSC::JSObject* convertDictionaryToJS(JSC::ExecState&, JSDOMGlobalObject&, const RTCStatsReport::InboundRTPStreamStats&);
120
121template<> RTCStatsReport::OutboundRTPStreamStats convertDictionary<RTCStatsReport::OutboundRTPStreamStats>(JSC::ExecState&, JSC::JSValue);
122
123JSC::JSObject* convertDictionaryToJS(JSC::ExecState&, JSDOMGlobalObject&, const RTCStatsReport::OutboundRTPStreamStats&);
124
125template<> RTCStatsReport::MediaStreamTrackStats convertDictionary<RTCStatsReport::MediaStreamTrackStats>(JSC::ExecState&, JSC::JSValue);
126
127JSC::JSObject* convertDictionaryToJS(JSC::ExecState&, JSDOMGlobalObject&, const RTCStatsReport::MediaStreamTrackStats&);
128
129template<> RTCStatsReport::DataChannelStats convertDictionary<RTCStatsReport::DataChannelStats>(JSC::ExecState&, JSC::JSValue);
130
131JSC::JSObject* convertDictionaryToJS(JSC::ExecState&, JSDOMGlobalObject&, const RTCStatsReport::DataChannelStats&);
132
133template<> RTCStatsReport::IceCandidatePairStats convertDictionary<RTCStatsReport::IceCandidatePairStats>(JSC::ExecState&, JSC::JSValue);
134
135JSC::JSObject* convertDictionaryToJS(JSC::ExecState&, JSDOMGlobalObject&, const RTCStatsReport::IceCandidatePairStats&);
136
137template<> RTCStatsReport::IceCandidateStats convertDictionary<RTCStatsReport::IceCandidateStats>(JSC::ExecState&, JSC::JSValue);
138
139JSC::JSObject* convertDictionaryToJS(JSC::ExecState&, JSDOMGlobalObject&, const RTCStatsReport::IceCandidateStats&);
140
141template<> RTCStatsReport::CertificateStats convertDictionary<RTCStatsReport::CertificateStats>(JSC::ExecState&, JSC::JSValue);
142
143JSC::JSObject* convertDictionaryToJS(JSC::ExecState&, JSDOMGlobalObject&, const RTCStatsReport::CertificateStats&);
144
145template<> RTCStatsReport::CodecStats convertDictionary<RTCStatsReport::CodecStats>(JSC::ExecState&, JSC::JSValue);
146
147JSC::JSObject* convertDictionaryToJS(JSC::ExecState&, JSDOMGlobalObject&, const RTCStatsReport::CodecStats&);
148
149template<> RTCStatsReport::TransportStats convertDictionary<RTCStatsReport::TransportStats>(JSC::ExecState&, JSC::JSValue);
150
151JSC::JSObject* convertDictionaryToJS(JSC::ExecState&, JSDOMGlobalObject&, const RTCStatsReport::TransportStats&);
152
153template<> RTCStatsReport::PeerConnectionStats convertDictionary<RTCStatsReport::PeerConnectionStats>(JSC::ExecState&, JSC::JSValue);
154
155JSC::JSObject* convertDictionaryToJS(JSC::ExecState&, JSDOMGlobalObject&, const RTCStatsReport::PeerConnectionStats&);
156
157
158} // namespace WebCore
159
160#endif // ENABLE(WEB_RTC)
161