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