/work/obj-fuzz/dist/include/mozilla/dom/RTCConfigurationBinding.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM RTCConfiguration.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #ifndef mozilla_dom_RTCConfigurationBinding_h |
4 | | #define mozilla_dom_RTCConfigurationBinding_h |
5 | | |
6 | | #include "GeckoProfiler.h" |
7 | | #include "js/RootingAPI.h" |
8 | | #include "jspubtd.h" |
9 | | #include "mozilla/ErrorResult.h" |
10 | | #include "mozilla/dom/BindingDeclarations.h" |
11 | | #include "mozilla/dom/Nullable.h" |
12 | | #include "mozilla/dom/RTCCertificate.h" |
13 | | #include "mozilla/dom/UnionTypes.h" |
14 | | |
15 | | namespace mozilla { |
16 | | namespace dom { |
17 | | |
18 | | struct NativePropertyHooks; |
19 | | class OwningStringOrStringSequence; |
20 | | class ProtoAndIfaceCache; |
21 | | class RTCCertificate; |
22 | | struct RTCConfigurationAtoms; |
23 | | struct RTCIceServer; |
24 | | struct RTCIceServerAtoms; |
25 | | class StringOrStringSequence; |
26 | | |
27 | | } // namespace dom |
28 | | } // namespace mozilla |
29 | | |
30 | | namespace mozilla { |
31 | | namespace dom { |
32 | | |
33 | | enum class RTCIceCredentialType : uint8_t { |
34 | | Password, |
35 | | Token, |
36 | | EndGuard_ |
37 | | }; |
38 | | |
39 | | namespace RTCIceCredentialTypeValues { |
40 | | extern const EnumEntry strings[3]; |
41 | | } // namespace RTCIceCredentialTypeValues |
42 | | |
43 | | bool |
44 | | ToJSValue(JSContext* aCx, RTCIceCredentialType aArgument, JS::MutableHandle<JS::Value> aValue); |
45 | | |
46 | | |
47 | | enum class RTCIceTransportPolicy : uint8_t { |
48 | | Relay, |
49 | | All, |
50 | | EndGuard_ |
51 | | }; |
52 | | |
53 | | namespace RTCIceTransportPolicyValues { |
54 | | extern const EnumEntry strings[3]; |
55 | | } // namespace RTCIceTransportPolicyValues |
56 | | |
57 | | bool |
58 | | ToJSValue(JSContext* aCx, RTCIceTransportPolicy aArgument, JS::MutableHandle<JS::Value> aValue); |
59 | | |
60 | | |
61 | | enum class RTCBundlePolicy : uint8_t { |
62 | | Balanced, |
63 | | Max_compat, |
64 | | Max_bundle, |
65 | | EndGuard_ |
66 | | }; |
67 | | |
68 | | namespace RTCBundlePolicyValues { |
69 | | extern const EnumEntry strings[4]; |
70 | | } // namespace RTCBundlePolicyValues |
71 | | |
72 | | bool |
73 | | ToJSValue(JSContext* aCx, RTCBundlePolicy aArgument, JS::MutableHandle<JS::Value> aValue); |
74 | | |
75 | | |
76 | | struct RTCIceServer : public DictionaryBase |
77 | | { |
78 | | MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mCredential; |
79 | | MOZ_INIT_OUTSIDE_CTOR RTCIceCredentialType mCredentialType; |
80 | | MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mUrl; |
81 | | MOZ_INIT_OUTSIDE_CTOR Optional<OwningStringOrStringSequence> mUrls; |
82 | | MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mUsername; |
83 | | |
84 | | RTCIceServer(); |
85 | | |
86 | | explicit inline RTCIceServer(const FastDictionaryInitializer& ) |
87 | 0 | { |
88 | 0 | // Do nothing here; this is used by our "Fast" subclass |
89 | 0 | } |
90 | | |
91 | | explicit inline RTCIceServer(const RTCIceServer& aOther) |
92 | 0 | { |
93 | 0 | *this = aOther; |
94 | 0 | } |
95 | | |
96 | | bool |
97 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
98 | | |
99 | | bool |
100 | | Init(const nsAString& aJSON); |
101 | | |
102 | | bool |
103 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
104 | | |
105 | | bool |
106 | | ToJSON(nsAString& aJSON) const; |
107 | | |
108 | | void |
109 | | TraceDictionary(JSTracer* trc); |
110 | | |
111 | | RTCIceServer& |
112 | | operator=(const RTCIceServer& aOther); |
113 | | |
114 | | private: |
115 | | static bool |
116 | | InitIds(JSContext* cx, RTCIceServerAtoms* atomsCache); |
117 | | }; |
118 | | |
119 | | namespace binding_detail { |
120 | | struct FastRTCIceServer : public RTCIceServer |
121 | | { |
122 | | inline FastRTCIceServer() |
123 | | : RTCIceServer(FastDictionaryInitializer()) |
124 | 0 | { |
125 | 0 | // Doesn't matter what int we pass to the parent constructor |
126 | 0 | } |
127 | | }; |
128 | | } // namespace binding_detail |
129 | | |
130 | | |
131 | | struct RTCConfiguration : public DictionaryBase |
132 | | { |
133 | | MOZ_INIT_OUTSIDE_CTOR RTCBundlePolicy mBundlePolicy; |
134 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<OwningNonNull<mozilla::dom::RTCCertificate>>> mCertificates; |
135 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<RTCIceServer>> mIceServers; |
136 | | MOZ_INIT_OUTSIDE_CTOR RTCIceTransportPolicy mIceTransportPolicy; |
137 | | MOZ_INIT_OUTSIDE_CTOR nsString mPeerIdentity; |
138 | | |
139 | | RTCConfiguration(); |
140 | | |
141 | | explicit inline RTCConfiguration(const FastDictionaryInitializer& ) |
142 | 0 | { |
143 | 0 | // Do nothing here; this is used by our "Fast" subclass |
144 | 0 | } |
145 | | |
146 | | explicit inline RTCConfiguration(const RTCConfiguration& aOther) |
147 | 0 | { |
148 | 0 | *this = aOther; |
149 | 0 | } |
150 | | |
151 | | bool |
152 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
153 | | |
154 | | bool |
155 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
156 | | |
157 | | void |
158 | | TraceDictionary(JSTracer* trc); |
159 | | |
160 | | inline void |
161 | | TraverseForCC(nsCycleCollectionTraversalCallback& aCallback, uint32_t aFlags) |
162 | 0 | { |
163 | 0 | ImplCycleCollectionTraverse(aCallback, mCertificates, "mCertificates", aFlags); |
164 | 0 | } |
165 | | |
166 | | inline void |
167 | | UnlinkForCC() |
168 | 0 | { |
169 | 0 | ImplCycleCollectionUnlink(mCertificates); |
170 | 0 | } |
171 | | |
172 | | RTCConfiguration& |
173 | | operator=(const RTCConfiguration& aOther); |
174 | | |
175 | | private: |
176 | | static bool |
177 | | InitIds(JSContext* cx, RTCConfigurationAtoms* atomsCache); |
178 | | }; |
179 | | |
180 | | namespace binding_detail { |
181 | | struct FastRTCConfiguration : public RTCConfiguration |
182 | | { |
183 | | inline FastRTCConfiguration() |
184 | | : RTCConfiguration(FastDictionaryInitializer()) |
185 | 0 | { |
186 | 0 | // Doesn't matter what int we pass to the parent constructor |
187 | 0 | } |
188 | | }; |
189 | | } // namespace binding_detail |
190 | | |
191 | | |
192 | | } // namespace dom |
193 | | } // namespace mozilla |
194 | | |
195 | | #endif // mozilla_dom_RTCConfigurationBinding_h |