| 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 | |
| 31 | namespace WebCore { |
| 32 | |
| 33 | class JSRTCStatsReport : public JSDOMWrapper<RTCStatsReport> { |
| 34 | public: |
| 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&); |
| 57 | protected: |
| 58 | JSRTCStatsReport(JSC::Structure*, JSDOMGlobalObject&, Ref<RTCStatsReport>&&); |
| 59 | |
| 60 | void finishCreation(JSC::VM&); |
| 61 | }; |
| 62 | |
| 63 | class JSRTCStatsReportOwner : public JSC::WeakHandleOwner { |
| 64 | public: |
| 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 | |
| 69 | inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, RTCStatsReport*) |
| 70 | { |
| 71 | static NeverDestroyed<JSRTCStatsReportOwner> owner; |
| 72 | return &owner.get(); |
| 73 | } |
| 74 | |
| 75 | inline void* wrapperKey(RTCStatsReport* wrappableObject) |
| 76 | { |
| 77 | return wrappableObject; |
| 78 | } |
| 79 | |
| 80 | JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, RTCStatsReport&); |
| 81 | inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, RTCStatsReport* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); } |
| 82 | JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, Ref<RTCStatsReport>&&); |
| 83 | inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, RefPtr<RTCStatsReport>&& impl) { return impl ? toJSNewlyCreated(state, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } |
| 84 | |
| 85 | template<> struct JSDOMWrapperConverterTraits<RTCStatsReport> { |
| 86 | using WrapperClass = JSRTCStatsReport; |
| 87 | using ToWrappedReturnType = RTCStatsReport*; |
| 88 | }; |
| 89 | String convertEnumerationToString(RTCStatsReport::Type); |
| 90 | template<> JSC::JSString* convertEnumerationToJS(JSC::ExecState&, RTCStatsReport::Type); |
| 91 | |
| 92 | template<> Optional<RTCStatsReport::Type> parseEnumeration<RTCStatsReport::Type>(JSC::ExecState&, JSC::JSValue); |
| 93 | template<> const char* expectedEnumerationValues<RTCStatsReport::Type>(); |
| 94 | |
| 95 | String convertEnumerationToString(RTCStatsReport::IceCandidatePairState); |
| 96 | template<> JSC::JSString* convertEnumerationToJS(JSC::ExecState&, RTCStatsReport::IceCandidatePairState); |
| 97 | |
| 98 | template<> Optional<RTCStatsReport::IceCandidatePairState> parseEnumeration<RTCStatsReport::IceCandidatePairState>(JSC::ExecState&, JSC::JSValue); |
| 99 | template<> const char* expectedEnumerationValues<RTCStatsReport::IceCandidatePairState>(); |
| 100 | |
| 101 | String convertEnumerationToString(RTCStatsReport::IceCandidateType); |
| 102 | template<> JSC::JSString* convertEnumerationToJS(JSC::ExecState&, RTCStatsReport::IceCandidateType); |
| 103 | |
| 104 | template<> Optional<RTCStatsReport::IceCandidateType> parseEnumeration<RTCStatsReport::IceCandidateType>(JSC::ExecState&, JSC::JSValue); |
| 105 | template<> const char* expectedEnumerationValues<RTCStatsReport::IceCandidateType>(); |
| 106 | |
| 107 | String convertEnumerationToString(RTCStatsReport::CodecType); |
| 108 | template<> JSC::JSString* convertEnumerationToJS(JSC::ExecState&, RTCStatsReport::CodecType); |
| 109 | |
| 110 | template<> Optional<RTCStatsReport::CodecType> parseEnumeration<RTCStatsReport::CodecType>(JSC::ExecState&, JSC::JSValue); |
| 111 | template<> const char* expectedEnumerationValues<RTCStatsReport::CodecType>(); |
| 112 | |
| 113 | template<> RTCStatsReport::Stats convertDictionary<RTCStatsReport::Stats>(JSC::ExecState&, JSC::JSValue); |
| 114 | |
| 115 | template<> RTCStatsReport::RTCRTPStreamStats convertDictionary<RTCStatsReport::RTCRTPStreamStats>(JSC::ExecState&, JSC::JSValue); |
| 116 | |
| 117 | template<> RTCStatsReport::InboundRTPStreamStats convertDictionary<RTCStatsReport::InboundRTPStreamStats>(JSC::ExecState&, JSC::JSValue); |
| 118 | |
| 119 | JSC::JSObject* convertDictionaryToJS(JSC::ExecState&, JSDOMGlobalObject&, const RTCStatsReport::InboundRTPStreamStats&); |
| 120 | |
| 121 | template<> RTCStatsReport::OutboundRTPStreamStats convertDictionary<RTCStatsReport::OutboundRTPStreamStats>(JSC::ExecState&, JSC::JSValue); |
| 122 | |
| 123 | JSC::JSObject* convertDictionaryToJS(JSC::ExecState&, JSDOMGlobalObject&, const RTCStatsReport::OutboundRTPStreamStats&); |
| 124 | |
| 125 | template<> RTCStatsReport::MediaStreamTrackStats convertDictionary<RTCStatsReport::MediaStreamTrackStats>(JSC::ExecState&, JSC::JSValue); |
| 126 | |
| 127 | JSC::JSObject* convertDictionaryToJS(JSC::ExecState&, JSDOMGlobalObject&, const RTCStatsReport::MediaStreamTrackStats&); |
| 128 | |
| 129 | template<> RTCStatsReport::DataChannelStats convertDictionary<RTCStatsReport::DataChannelStats>(JSC::ExecState&, JSC::JSValue); |
| 130 | |
| 131 | JSC::JSObject* convertDictionaryToJS(JSC::ExecState&, JSDOMGlobalObject&, const RTCStatsReport::DataChannelStats&); |
| 132 | |
| 133 | template<> RTCStatsReport::IceCandidatePairStats convertDictionary<RTCStatsReport::IceCandidatePairStats>(JSC::ExecState&, JSC::JSValue); |
| 134 | |
| 135 | JSC::JSObject* convertDictionaryToJS(JSC::ExecState&, JSDOMGlobalObject&, const RTCStatsReport::IceCandidatePairStats&); |
| 136 | |
| 137 | template<> RTCStatsReport::IceCandidateStats convertDictionary<RTCStatsReport::IceCandidateStats>(JSC::ExecState&, JSC::JSValue); |
| 138 | |
| 139 | JSC::JSObject* convertDictionaryToJS(JSC::ExecState&, JSDOMGlobalObject&, const RTCStatsReport::IceCandidateStats&); |
| 140 | |
| 141 | template<> RTCStatsReport::CertificateStats convertDictionary<RTCStatsReport::CertificateStats>(JSC::ExecState&, JSC::JSValue); |
| 142 | |
| 143 | JSC::JSObject* convertDictionaryToJS(JSC::ExecState&, JSDOMGlobalObject&, const RTCStatsReport::CertificateStats&); |
| 144 | |
| 145 | template<> RTCStatsReport::CodecStats convertDictionary<RTCStatsReport::CodecStats>(JSC::ExecState&, JSC::JSValue); |
| 146 | |
| 147 | JSC::JSObject* convertDictionaryToJS(JSC::ExecState&, JSDOMGlobalObject&, const RTCStatsReport::CodecStats&); |
| 148 | |
| 149 | template<> RTCStatsReport::TransportStats convertDictionary<RTCStatsReport::TransportStats>(JSC::ExecState&, JSC::JSValue); |
| 150 | |
| 151 | JSC::JSObject* convertDictionaryToJS(JSC::ExecState&, JSDOMGlobalObject&, const RTCStatsReport::TransportStats&); |
| 152 | |
| 153 | template<> RTCStatsReport::PeerConnectionStats convertDictionary<RTCStatsReport::PeerConnectionStats>(JSC::ExecState&, JSC::JSValue); |
| 154 | |
| 155 | JSC::JSObject* convertDictionaryToJS(JSC::ExecState&, JSDOMGlobalObject&, const RTCStatsReport::PeerConnectionStats&); |
| 156 | |
| 157 | |
| 158 | } // namespace WebCore |
| 159 | |
| 160 | #endif // ENABLE(WEB_RTC) |
| 161 | |