|
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 file, |
|
4 * You can obtain one at http://mozilla.org/MPL/2.0/. |
|
5 */ |
|
6 |
|
7 #ifndef TestBindingHeader_h |
|
8 #define TestBindingHeader_h |
|
9 |
|
10 #include "mozilla/dom/BindingUtils.h" |
|
11 #include "mozilla/dom/Date.h" |
|
12 #include "mozilla/dom/MozMap.h" |
|
13 #include "mozilla/dom/TypedArray.h" |
|
14 #include "mozilla/dom/UnionTypes.h" |
|
15 #include "mozilla/ErrorResult.h" |
|
16 #include "nsCOMPtr.h" |
|
17 #include "nsGenericHTMLElement.h" |
|
18 #include "nsWrapperCache.h" |
|
19 |
|
20 // Forward declare this before we include TestCodeGenBinding.h, because that header relies on including |
|
21 // this one for it, for ParentDict. Hopefully it won't begin to rely on it in more fundamental ways. |
|
22 namespace mozilla { |
|
23 namespace dom { |
|
24 class TestExternalInterface; |
|
25 } // namespace dom |
|
26 } // namespace mozilla |
|
27 |
|
28 // We don't export TestCodeGenBinding.h, but it's right in our parent dir. |
|
29 #include "../TestCodeGenBinding.h" |
|
30 |
|
31 extern bool TestFuncControlledMember(JSContext*, JSObject*); |
|
32 |
|
33 namespace mozilla { |
|
34 namespace dom { |
|
35 |
|
36 // IID for nsRenamedInterface |
|
37 #define NS_RENAMED_INTERFACE_IID \ |
|
38 { 0xd4b19ef3, 0xe68b, 0x4e3f, \ |
|
39 { 0x94, 0xbc, 0xc9, 0xde, 0x3a, 0x69, 0xb0, 0xe8 } } |
|
40 |
|
41 class nsRenamedInterface : public nsISupports, |
|
42 public nsWrapperCache |
|
43 { |
|
44 public: |
|
45 NS_DECLARE_STATIC_IID_ACCESSOR(NS_RENAMED_INTERFACE_IID) |
|
46 NS_DECL_ISUPPORTS |
|
47 |
|
48 // We need a GetParentObject to make binding codegen happy |
|
49 virtual nsISupports* GetParentObject(); |
|
50 }; |
|
51 |
|
52 NS_DEFINE_STATIC_IID_ACCESSOR(nsRenamedInterface, NS_RENAMED_INTERFACE_IID) |
|
53 |
|
54 // IID for the IndirectlyImplementedInterface |
|
55 #define NS_INDIRECTLY_IMPLEMENTED_INTERFACE_IID \ |
|
56 { 0xfed55b69, 0x7012, 0x4849, \ |
|
57 { 0xaf, 0x56, 0x4b, 0xa9, 0xee, 0x41, 0x30, 0x89 } } |
|
58 |
|
59 class IndirectlyImplementedInterface : public nsISupports, |
|
60 public nsWrapperCache |
|
61 { |
|
62 public: |
|
63 NS_DECLARE_STATIC_IID_ACCESSOR(NS_INDIRECTLY_IMPLEMENTED_INTERFACE_IID) |
|
64 NS_DECL_ISUPPORTS |
|
65 |
|
66 // We need a GetParentObject to make binding codegen happy |
|
67 virtual nsISupports* GetParentObject(); |
|
68 |
|
69 bool IndirectlyImplementedProperty(); |
|
70 void IndirectlyImplementedProperty(bool); |
|
71 void IndirectlyImplementedMethod(); |
|
72 }; |
|
73 |
|
74 NS_DEFINE_STATIC_IID_ACCESSOR(IndirectlyImplementedInterface, NS_INDIRECTLY_IMPLEMENTED_INTERFACE_IID) |
|
75 |
|
76 // IID for the TestExternalInterface |
|
77 #define NS_TEST_EXTERNAL_INTERFACE_IID \ |
|
78 { 0xd5ba0c99, 0x9b1d, 0x4e71, \ |
|
79 { 0x8a, 0x94, 0x56, 0x38, 0x6c, 0xa3, 0xda, 0x3d } } |
|
80 class TestExternalInterface : public nsISupports |
|
81 { |
|
82 public: |
|
83 NS_DECLARE_STATIC_IID_ACCESSOR(NS_TEST_EXTERNAL_INTERFACE_IID) |
|
84 NS_DECL_ISUPPORTS |
|
85 }; |
|
86 |
|
87 NS_DEFINE_STATIC_IID_ACCESSOR(TestExternalInterface, NS_TEST_EXTERNAL_INTERFACE_IID) |
|
88 |
|
89 class TestNonWrapperCacheInterface : public nsISupports |
|
90 { |
|
91 public: |
|
92 NS_DECL_ISUPPORTS |
|
93 |
|
94 virtual JSObject* WrapObject(JSContext* cx); |
|
95 }; |
|
96 |
|
97 class OnlyForUseInConstructor : public nsISupports, |
|
98 public nsWrapperCache |
|
99 { |
|
100 public: |
|
101 NS_DECL_ISUPPORTS |
|
102 // We need a GetParentObject to make binding codegen happy |
|
103 virtual nsISupports* GetParentObject(); |
|
104 }; |
|
105 |
|
106 class TestInterface : public nsISupports, |
|
107 public nsWrapperCache |
|
108 { |
|
109 public: |
|
110 NS_DECL_ISUPPORTS |
|
111 |
|
112 // We need a GetParentObject to make binding codegen happy |
|
113 virtual nsISupports* GetParentObject(); |
|
114 |
|
115 // And now our actual WebIDL API |
|
116 // Constructors |
|
117 static |
|
118 already_AddRefed<TestInterface> |
|
119 Constructor(const GlobalObject&, ErrorResult&); |
|
120 static |
|
121 already_AddRefed<TestInterface> |
|
122 Constructor(const GlobalObject&, const nsAString&, ErrorResult&); |
|
123 static |
|
124 already_AddRefed<TestInterface> |
|
125 Constructor(const GlobalObject&, uint32_t, const Nullable<bool>&, |
|
126 ErrorResult&); |
|
127 static |
|
128 already_AddRefed<TestInterface> |
|
129 Constructor(const GlobalObject&, TestInterface*, ErrorResult&); |
|
130 static |
|
131 already_AddRefed<TestInterface> |
|
132 Constructor(const GlobalObject&, uint32_t, IndirectlyImplementedInterface&, ErrorResult&); |
|
133 |
|
134 static |
|
135 already_AddRefed<TestInterface> |
|
136 Constructor(const GlobalObject&, Date&, ErrorResult&); |
|
137 /* static |
|
138 already_AddRefed<TestInterface> |
|
139 Constructor(const GlobalObject&, uint32_t, uint32_t, |
|
140 const TestInterfaceOrOnlyForUseInConstructor&, ErrorResult&); |
|
141 */ |
|
142 |
|
143 static |
|
144 already_AddRefed<TestInterface> Test(const GlobalObject&, ErrorResult&); |
|
145 static |
|
146 already_AddRefed<TestInterface> Test(const GlobalObject&, const nsAString&, |
|
147 ErrorResult&); |
|
148 static |
|
149 already_AddRefed<TestInterface> Test(const GlobalObject&, const nsACString&, |
|
150 ErrorResult&); |
|
151 |
|
152 static |
|
153 already_AddRefed<TestInterface> Test2(const GlobalObject&, |
|
154 JSContext*, |
|
155 const DictForConstructor&, |
|
156 JS::Handle<JS::Value>, |
|
157 JS::Handle<JSObject*>, |
|
158 JS::Handle<JSObject*>, |
|
159 const Sequence<Dict>&, |
|
160 JS::Handle<JS::Value>, |
|
161 const Optional<JS::Handle<JSObject*> >&, |
|
162 const Optional<JS::Handle<JSObject*> >&, |
|
163 ErrorResult&); |
|
164 |
|
165 // Integer types |
|
166 int8_t ReadonlyByte(); |
|
167 int8_t WritableByte(); |
|
168 void SetWritableByte(int8_t); |
|
169 void PassByte(int8_t); |
|
170 int8_t ReceiveByte(); |
|
171 void PassOptionalByte(const Optional<int8_t>&); |
|
172 void PassOptionalByteBeforeRequired(const Optional<int8_t>&, int8_t); |
|
173 void PassOptionalByteWithDefault(int8_t); |
|
174 void PassOptionalByteWithDefaultBeforeRequired(int8_t, int8_t); |
|
175 void PassNullableByte(const Nullable<int8_t>&); |
|
176 void PassOptionalNullableByte(const Optional< Nullable<int8_t> >&); |
|
177 void PassVariadicByte(const Sequence<int8_t>&); |
|
178 int8_t CachedByte(); |
|
179 int8_t CachedConstantByte(); |
|
180 int8_t CachedWritableByte(); |
|
181 void SetCachedWritableByte(int8_t); |
|
182 |
|
183 int16_t ReadonlyShort(); |
|
184 int16_t WritableShort(); |
|
185 void SetWritableShort(int16_t); |
|
186 void PassShort(int16_t); |
|
187 int16_t ReceiveShort(); |
|
188 void PassOptionalShort(const Optional<int16_t>&); |
|
189 void PassOptionalShortWithDefault(int16_t); |
|
190 |
|
191 int32_t ReadonlyLong(); |
|
192 int32_t WritableLong(); |
|
193 void SetWritableLong(int32_t); |
|
194 void PassLong(int32_t); |
|
195 int16_t ReceiveLong(); |
|
196 void PassOptionalLong(const Optional<int32_t>&); |
|
197 void PassOptionalLongWithDefault(int32_t); |
|
198 |
|
199 int64_t ReadonlyLongLong(); |
|
200 int64_t WritableLongLong(); |
|
201 void SetWritableLongLong(int64_t); |
|
202 void PassLongLong(int64_t); |
|
203 int64_t ReceiveLongLong(); |
|
204 void PassOptionalLongLong(const Optional<int64_t>&); |
|
205 void PassOptionalLongLongWithDefault(int64_t); |
|
206 |
|
207 uint8_t ReadonlyOctet(); |
|
208 uint8_t WritableOctet(); |
|
209 void SetWritableOctet(uint8_t); |
|
210 void PassOctet(uint8_t); |
|
211 uint8_t ReceiveOctet(); |
|
212 void PassOptionalOctet(const Optional<uint8_t>&); |
|
213 void PassOptionalOctetWithDefault(uint8_t); |
|
214 |
|
215 uint16_t ReadonlyUnsignedShort(); |
|
216 uint16_t WritableUnsignedShort(); |
|
217 void SetWritableUnsignedShort(uint16_t); |
|
218 void PassUnsignedShort(uint16_t); |
|
219 uint16_t ReceiveUnsignedShort(); |
|
220 void PassOptionalUnsignedShort(const Optional<uint16_t>&); |
|
221 void PassOptionalUnsignedShortWithDefault(uint16_t); |
|
222 |
|
223 uint32_t ReadonlyUnsignedLong(); |
|
224 uint32_t WritableUnsignedLong(); |
|
225 void SetWritableUnsignedLong(uint32_t); |
|
226 void PassUnsignedLong(uint32_t); |
|
227 uint32_t ReceiveUnsignedLong(); |
|
228 void PassOptionalUnsignedLong(const Optional<uint32_t>&); |
|
229 void PassOptionalUnsignedLongWithDefault(uint32_t); |
|
230 |
|
231 uint64_t ReadonlyUnsignedLongLong(); |
|
232 uint64_t WritableUnsignedLongLong(); |
|
233 void SetWritableUnsignedLongLong(uint64_t); |
|
234 void PassUnsignedLongLong(uint64_t); |
|
235 uint64_t ReceiveUnsignedLongLong(); |
|
236 void PassOptionalUnsignedLongLong(const Optional<uint64_t>&); |
|
237 void PassOptionalUnsignedLongLongWithDefault(uint64_t); |
|
238 |
|
239 float WritableFloat() const; |
|
240 void SetWritableFloat(float); |
|
241 float WritableUnrestrictedFloat() const; |
|
242 void SetWritableUnrestrictedFloat(float); |
|
243 Nullable<float> GetWritableNullableFloat() const; |
|
244 void SetWritableNullableFloat(Nullable<float>); |
|
245 Nullable<float> GetWritableNullableUnrestrictedFloat() const; |
|
246 void SetWritableNullableUnrestrictedFloat(Nullable<float>); |
|
247 double WritableDouble() const; |
|
248 void SetWritableDouble(double); |
|
249 double WritableUnrestrictedDouble() const; |
|
250 void SetWritableUnrestrictedDouble(double); |
|
251 Nullable<double> GetWritableNullableDouble() const; |
|
252 void SetWritableNullableDouble(Nullable<double>); |
|
253 Nullable<double> GetWritableNullableUnrestrictedDouble() const; |
|
254 void SetWritableNullableUnrestrictedDouble(Nullable<double>); |
|
255 void PassFloat(float, float, Nullable<float>, Nullable<float>, |
|
256 double, double, Nullable<double>, Nullable<double>, |
|
257 const Sequence<float>&, const Sequence<float>&, |
|
258 const Sequence<Nullable<float> >&, |
|
259 const Sequence<Nullable<float> >&, |
|
260 const Sequence<double>&, const Sequence<double>&, |
|
261 const Sequence<Nullable<double> >&, |
|
262 const Sequence<Nullable<double> >&); |
|
263 void PassLenientFloat(float, float, Nullable<float>, Nullable<float>, |
|
264 double, double, Nullable<double>, Nullable<double>, |
|
265 const Sequence<float>&, const Sequence<float>&, |
|
266 const Sequence<Nullable<float> >&, |
|
267 const Sequence<Nullable<float> >&, |
|
268 const Sequence<double>&, const Sequence<double>&, |
|
269 const Sequence<Nullable<double> >&, |
|
270 const Sequence<Nullable<double> >&); |
|
271 float LenientFloatAttr() const; |
|
272 void SetLenientFloatAttr(float); |
|
273 double LenientDoubleAttr() const; |
|
274 void SetLenientDoubleAttr(double); |
|
275 |
|
276 void PassUnrestricted(float arg1, |
|
277 float arg2, |
|
278 float arg3, |
|
279 float arg4, |
|
280 double arg5, |
|
281 double arg6, |
|
282 double arg7, |
|
283 double arg8); |
|
284 |
|
285 // Interface types |
|
286 already_AddRefed<TestInterface> ReceiveSelf(); |
|
287 already_AddRefed<TestInterface> ReceiveNullableSelf(); |
|
288 TestInterface* ReceiveWeakSelf(); |
|
289 TestInterface* ReceiveWeakNullableSelf(); |
|
290 void PassSelf(TestInterface&); |
|
291 void PassNullableSelf(TestInterface*); |
|
292 already_AddRefed<TestInterface> NonNullSelf(); |
|
293 void SetNonNullSelf(TestInterface&); |
|
294 already_AddRefed<TestInterface> GetNullableSelf(); |
|
295 already_AddRefed<TestInterface> CachedSelf(); |
|
296 void SetNullableSelf(TestInterface*); |
|
297 void PassOptionalSelf(const Optional<TestInterface*> &); |
|
298 void PassOptionalNonNullSelf(const Optional<NonNull<TestInterface> >&); |
|
299 void PassOptionalSelfWithDefault(TestInterface*); |
|
300 |
|
301 already_AddRefed<TestNonWrapperCacheInterface> ReceiveNonWrapperCacheInterface(); |
|
302 already_AddRefed<TestNonWrapperCacheInterface> ReceiveNullableNonWrapperCacheInterface(); |
|
303 void ReceiveNonWrapperCacheInterfaceSequence(nsTArray<nsRefPtr<TestNonWrapperCacheInterface> >&); |
|
304 void ReceiveNullableNonWrapperCacheInterfaceSequence(nsTArray<nsRefPtr<TestNonWrapperCacheInterface> >&); |
|
305 void ReceiveNonWrapperCacheInterfaceNullableSequence(Nullable<nsTArray<nsRefPtr<TestNonWrapperCacheInterface> > >&); |
|
306 void ReceiveNullableNonWrapperCacheInterfaceNullableSequence(Nullable<nsTArray<nsRefPtr<TestNonWrapperCacheInterface> > >&); |
|
307 |
|
308 already_AddRefed<IndirectlyImplementedInterface> ReceiveOther(); |
|
309 already_AddRefed<IndirectlyImplementedInterface> ReceiveNullableOther(); |
|
310 IndirectlyImplementedInterface* ReceiveWeakOther(); |
|
311 IndirectlyImplementedInterface* ReceiveWeakNullableOther(); |
|
312 void PassOther(IndirectlyImplementedInterface&); |
|
313 void PassNullableOther(IndirectlyImplementedInterface*); |
|
314 already_AddRefed<IndirectlyImplementedInterface> NonNullOther(); |
|
315 void SetNonNullOther(IndirectlyImplementedInterface&); |
|
316 already_AddRefed<IndirectlyImplementedInterface> GetNullableOther(); |
|
317 void SetNullableOther(IndirectlyImplementedInterface*); |
|
318 void PassOptionalOther(const Optional<IndirectlyImplementedInterface*>&); |
|
319 void PassOptionalNonNullOther(const Optional<NonNull<IndirectlyImplementedInterface> >&); |
|
320 void PassOptionalOtherWithDefault(IndirectlyImplementedInterface*); |
|
321 |
|
322 already_AddRefed<TestExternalInterface> ReceiveExternal(); |
|
323 already_AddRefed<TestExternalInterface> ReceiveNullableExternal(); |
|
324 TestExternalInterface* ReceiveWeakExternal(); |
|
325 TestExternalInterface* ReceiveWeakNullableExternal(); |
|
326 void PassExternal(TestExternalInterface*); |
|
327 void PassNullableExternal(TestExternalInterface*); |
|
328 already_AddRefed<TestExternalInterface> NonNullExternal(); |
|
329 void SetNonNullExternal(TestExternalInterface*); |
|
330 already_AddRefed<TestExternalInterface> GetNullableExternal(); |
|
331 void SetNullableExternal(TestExternalInterface*); |
|
332 void PassOptionalExternal(const Optional<TestExternalInterface*>&); |
|
333 void PassOptionalNonNullExternal(const Optional<TestExternalInterface*>&); |
|
334 void PassOptionalExternalWithDefault(TestExternalInterface*); |
|
335 |
|
336 already_AddRefed<TestCallbackInterface> ReceiveCallbackInterface(); |
|
337 already_AddRefed<TestCallbackInterface> ReceiveNullableCallbackInterface(); |
|
338 TestCallbackInterface* ReceiveWeakCallbackInterface(); |
|
339 TestCallbackInterface* ReceiveWeakNullableCallbackInterface(); |
|
340 void PassCallbackInterface(TestCallbackInterface&); |
|
341 void PassNullableCallbackInterface(TestCallbackInterface*); |
|
342 already_AddRefed<TestCallbackInterface> NonNullCallbackInterface(); |
|
343 void SetNonNullCallbackInterface(TestCallbackInterface&); |
|
344 already_AddRefed<TestCallbackInterface> GetNullableCallbackInterface(); |
|
345 void SetNullableCallbackInterface(TestCallbackInterface*); |
|
346 void PassOptionalCallbackInterface(const Optional<nsRefPtr<TestCallbackInterface> >&); |
|
347 void PassOptionalNonNullCallbackInterface(const Optional<OwningNonNull<TestCallbackInterface> >&); |
|
348 void PassOptionalCallbackInterfaceWithDefault(TestCallbackInterface*); |
|
349 |
|
350 already_AddRefed<IndirectlyImplementedInterface> ReceiveConsequentialInterface(); |
|
351 void PassConsequentialInterface(IndirectlyImplementedInterface&); |
|
352 |
|
353 // Sequence types |
|
354 void GetReadonlySequence(nsTArray<int32_t>&); |
|
355 void GetReadonlySequenceOfDictionaries(JSContext*, nsTArray<Dict>&); |
|
356 void GetReadonlyNullableSequenceOfDictionaries(JSContext*, Nullable<nsTArray<Dict> >&); |
|
357 void GetReadonlyFrozenSequence(JSContext*, nsTArray<Dict>&); |
|
358 void GetReadonlyFrozenNullableSequence(JSContext*, Nullable<nsTArray<Dict>>&); |
|
359 void ReceiveSequence(nsTArray<int32_t>&); |
|
360 void ReceiveNullableSequence(Nullable< nsTArray<int32_t> >&); |
|
361 void ReceiveSequenceOfNullableInts(nsTArray< Nullable<int32_t> >&); |
|
362 void ReceiveNullableSequenceOfNullableInts(Nullable< nsTArray< Nullable<int32_t> > >&); |
|
363 void PassSequence(const Sequence<int32_t> &); |
|
364 void PassNullableSequence(const Nullable< Sequence<int32_t> >&); |
|
365 void PassSequenceOfNullableInts(const Sequence<Nullable<int32_t> >&); |
|
366 void PassOptionalSequenceOfNullableInts(const Optional<Sequence<Nullable<int32_t> > > &); |
|
367 void PassOptionalNullableSequenceOfNullableInts(const Optional<Nullable<Sequence<Nullable<int32_t> > > > &); |
|
368 void ReceiveCastableObjectSequence(nsTArray< nsRefPtr<TestInterface> > &); |
|
369 void ReceiveCallbackObjectSequence(nsTArray< nsRefPtr<TestCallbackInterface> > &); |
|
370 void ReceiveNullableCastableObjectSequence(nsTArray< nsRefPtr<TestInterface> > &); |
|
371 void ReceiveNullableCallbackObjectSequence(nsTArray< nsRefPtr<TestCallbackInterface> > &); |
|
372 void ReceiveCastableObjectNullableSequence(Nullable< nsTArray< nsRefPtr<TestInterface> > >&); |
|
373 void ReceiveNullableCastableObjectNullableSequence(Nullable< nsTArray< nsRefPtr<TestInterface> > >&); |
|
374 void ReceiveWeakCastableObjectSequence(nsTArray<TestInterface*> &); |
|
375 void ReceiveWeakNullableCastableObjectSequence(nsTArray<TestInterface*> &); |
|
376 void ReceiveWeakCastableObjectNullableSequence(Nullable< nsTArray<TestInterface*> >&); |
|
377 void ReceiveWeakNullableCastableObjectNullableSequence(Nullable< nsTArray<TestInterface*> >&); |
|
378 void PassCastableObjectSequence(const Sequence< OwningNonNull<TestInterface> >&); |
|
379 void PassNullableCastableObjectSequence(const Sequence< nsRefPtr<TestInterface> > &); |
|
380 void PassCastableObjectNullableSequence(const Nullable< Sequence< OwningNonNull<TestInterface> > >&); |
|
381 void PassNullableCastableObjectNullableSequence(const Nullable< Sequence< nsRefPtr<TestInterface> > >&); |
|
382 void PassOptionalSequence(const Optional<Sequence<int32_t> >&); |
|
383 void PassOptionalNullableSequence(const Optional<Nullable<Sequence<int32_t> > >&); |
|
384 void PassOptionalNullableSequenceWithDefaultValue(const Nullable< Sequence<int32_t> >&); |
|
385 void PassOptionalObjectSequence(const Optional<Sequence<OwningNonNull<TestInterface> > >&); |
|
386 void PassExternalInterfaceSequence(const Sequence<nsRefPtr<TestExternalInterface> >&); |
|
387 void PassNullableExternalInterfaceSequence(const Sequence<nsRefPtr<TestExternalInterface> >&); |
|
388 |
|
389 void ReceiveStringSequence(nsTArray<nsString>&); |
|
390 void PassStringSequence(const Sequence<nsString>&); |
|
391 |
|
392 void ReceiveByteStringSequence(nsTArray<nsCString>&); |
|
393 void PassByteStringSequence(const Sequence<nsCString>&); |
|
394 |
|
395 void ReceiveAnySequence(JSContext*, nsTArray<JS::Value>&); |
|
396 void ReceiveNullableAnySequence(JSContext*, Nullable<nsTArray<JS::Value> >&); |
|
397 void ReceiveAnySequenceSequence(JSContext*, nsTArray<nsTArray<JS::Value> >&); |
|
398 |
|
399 void ReceiveObjectSequence(JSContext*, nsTArray<JSObject*>&); |
|
400 void ReceiveNullableObjectSequence(JSContext*, nsTArray<JSObject*>&); |
|
401 |
|
402 void PassSequenceOfSequences(const Sequence< Sequence<int32_t> >&); |
|
403 void ReceiveSequenceOfSequences(nsTArray< nsTArray<int32_t> >&); |
|
404 |
|
405 // MozMap types |
|
406 void PassMozMap(const MozMap<int32_t> &); |
|
407 void PassNullableMozMap(const Nullable< MozMap<int32_t> >&); |
|
408 void PassMozMapOfNullableInts(const MozMap<Nullable<int32_t> >&); |
|
409 void PassOptionalMozMapOfNullableInts(const Optional<MozMap<Nullable<int32_t> > > &); |
|
410 void PassOptionalNullableMozMapOfNullableInts(const Optional<Nullable<MozMap<Nullable<int32_t> > > > &); |
|
411 void PassCastableObjectMozMap(const MozMap< OwningNonNull<TestInterface> >&); |
|
412 void PassNullableCastableObjectMozMap(const MozMap< nsRefPtr<TestInterface> > &); |
|
413 void PassCastableObjectNullableMozMap(const Nullable< MozMap< OwningNonNull<TestInterface> > >&); |
|
414 void PassNullableCastableObjectNullableMozMap(const Nullable< MozMap< nsRefPtr<TestInterface> > >&); |
|
415 void PassOptionalMozMap(const Optional<MozMap<int32_t> >&); |
|
416 void PassOptionalNullableMozMap(const Optional<Nullable<MozMap<int32_t> > >&); |
|
417 void PassOptionalNullableMozMapWithDefaultValue(const Nullable< MozMap<int32_t> >&); |
|
418 void PassOptionalObjectMozMap(const Optional<MozMap<OwningNonNull<TestInterface> > >&); |
|
419 void PassExternalInterfaceMozMap(const MozMap<nsRefPtr<TestExternalInterface> >&); |
|
420 void PassNullableExternalInterfaceMozMap(const MozMap<nsRefPtr<TestExternalInterface> >&); |
|
421 void PassStringMozMap(const MozMap<nsString>&); |
|
422 void PassByteStringMozMap(const MozMap<nsCString>&); |
|
423 void PassMozMapOfMozMaps(const MozMap< MozMap<int32_t> >&); |
|
424 void ReceiveMozMap(MozMap<int32_t>&); |
|
425 void ReceiveNullableMozMap(Nullable<MozMap<int32_t>>&); |
|
426 void ReceiveMozMapOfNullableInts(MozMap<Nullable<int32_t>>&); |
|
427 void ReceiveNullableMozMapOfNullableInts(Nullable<MozMap<Nullable<int32_t>>>&); |
|
428 void ReceiveMozMapOfMozMaps(MozMap<MozMap<int32_t>>&); |
|
429 void ReceiveAnyMozMap(JSContext*, MozMap<JS::Value>&); |
|
430 |
|
431 // Typed array types |
|
432 void PassArrayBuffer(const ArrayBuffer&); |
|
433 void PassNullableArrayBuffer(const Nullable<ArrayBuffer>&); |
|
434 void PassOptionalArrayBuffer(const Optional<ArrayBuffer>&); |
|
435 void PassOptionalNullableArrayBuffer(const Optional<Nullable<ArrayBuffer> >&); |
|
436 void PassOptionalNullableArrayBufferWithDefaultValue(const Nullable<ArrayBuffer>&); |
|
437 void PassArrayBufferView(const ArrayBufferView&); |
|
438 void PassInt8Array(const Int8Array&); |
|
439 void PassInt16Array(const Int16Array&); |
|
440 void PassInt32Array(const Int32Array&); |
|
441 void PassUint8Array(const Uint8Array&); |
|
442 void PassUint16Array(const Uint16Array&); |
|
443 void PassUint32Array(const Uint32Array&); |
|
444 void PassUint8ClampedArray(const Uint8ClampedArray&); |
|
445 void PassFloat32Array(const Float32Array&); |
|
446 void PassFloat64Array(const Float64Array&); |
|
447 void PassSequenceOfArrayBuffers(const Sequence<ArrayBuffer>&); |
|
448 void PassSequenceOfNullableArrayBuffers(const Sequence<Nullable<ArrayBuffer> >&); |
|
449 void PassMozMapOfArrayBuffers(const MozMap<ArrayBuffer>&); |
|
450 void PassMozMapOfNullableArrayBuffers(const MozMap<Nullable<ArrayBuffer> >&); |
|
451 void PassVariadicTypedArray(const Sequence<Float32Array>&); |
|
452 void PassVariadicNullableTypedArray(const Sequence<Nullable<Float32Array> >&); |
|
453 void ReceiveUint8Array(JSContext*, JS::MutableHandle<JSObject*>); |
|
454 |
|
455 // DOMString types |
|
456 void PassString(const nsAString&); |
|
457 void PassNullableString(const nsAString&); |
|
458 void PassOptionalString(const Optional<nsAString>&); |
|
459 void PassOptionalStringWithDefaultValue(const nsAString&); |
|
460 void PassOptionalNullableString(const Optional<nsAString>&); |
|
461 void PassOptionalNullableStringWithDefaultValue(const nsAString&); |
|
462 void PassVariadicString(const Sequence<nsString>&); |
|
463 |
|
464 // ByteString types |
|
465 void PassByteString(const nsCString&); |
|
466 void PassNullableByteString(const nsCString&); |
|
467 void PassOptionalByteString(const Optional<nsCString>&); |
|
468 void PassOptionalNullableByteString(const Optional<nsCString>&); |
|
469 void PassVariadicByteString(const Sequence<nsCString>&); |
|
470 |
|
471 // Enumerated types |
|
472 void PassEnum(TestEnum); |
|
473 void PassNullableEnum(const Nullable<TestEnum>&); |
|
474 void PassOptionalEnum(const Optional<TestEnum>&); |
|
475 void PassEnumWithDefault(TestEnum); |
|
476 void PassOptionalNullableEnum(const Optional<Nullable<TestEnum> >&); |
|
477 void PassOptionalNullableEnumWithDefaultValue(const Nullable<TestEnum>&); |
|
478 void PassOptionalNullableEnumWithDefaultValue2(const Nullable<TestEnum>&); |
|
479 TestEnum ReceiveEnum(); |
|
480 Nullable<TestEnum> ReceiveNullableEnum(); |
|
481 TestEnum EnumAttribute(); |
|
482 TestEnum ReadonlyEnumAttribute(); |
|
483 void SetEnumAttribute(TestEnum); |
|
484 |
|
485 // Callback types |
|
486 void PassCallback(TestCallback&); |
|
487 void PassNullableCallback(TestCallback*); |
|
488 void PassOptionalCallback(const Optional<OwningNonNull<TestCallback> >&); |
|
489 void PassOptionalNullableCallback(const Optional<nsRefPtr<TestCallback> >&); |
|
490 void PassOptionalNullableCallbackWithDefaultValue(TestCallback*); |
|
491 already_AddRefed<TestCallback> ReceiveCallback(); |
|
492 already_AddRefed<TestCallback> ReceiveNullableCallback(); |
|
493 void PassNullableTreatAsNullCallback(TestTreatAsNullCallback*); |
|
494 void PassOptionalNullableTreatAsNullCallback(const Optional<nsRefPtr<TestTreatAsNullCallback> >&); |
|
495 void PassOptionalNullableTreatAsNullCallbackWithDefaultValue(TestTreatAsNullCallback*); |
|
496 void SetTreatAsNullCallback(TestTreatAsNullCallback&); |
|
497 already_AddRefed<TestTreatAsNullCallback> TreatAsNullCallback(); |
|
498 void SetNullableTreatAsNullCallback(TestTreatAsNullCallback*); |
|
499 already_AddRefed<TestTreatAsNullCallback> GetNullableTreatAsNullCallback(); |
|
500 |
|
501 // Any types |
|
502 void PassAny(JSContext*, JS::Handle<JS::Value>); |
|
503 void PassVariadicAny(JSContext*, const Sequence<JS::Value>&); |
|
504 void PassOptionalAny(JSContext*, JS::Handle<JS::Value>); |
|
505 void PassAnyDefaultNull(JSContext*, JS::Handle<JS::Value>); |
|
506 void PassSequenceOfAny(JSContext*, const Sequence<JS::Value>&); |
|
507 void PassNullableSequenceOfAny(JSContext*, const Nullable<Sequence<JS::Value> >&); |
|
508 void PassOptionalSequenceOfAny(JSContext*, const Optional<Sequence<JS::Value> >&); |
|
509 void PassOptionalNullableSequenceOfAny(JSContext*, const Optional<Nullable<Sequence<JS::Value> > >&); |
|
510 void PassOptionalSequenceOfAnyWithDefaultValue(JSContext*, const Nullable<Sequence<JS::Value> >&); |
|
511 void PassSequenceOfSequenceOfAny(JSContext*, const Sequence<Sequence<JS::Value> >&); |
|
512 void PassSequenceOfNullableSequenceOfAny(JSContext*, const Sequence<Nullable<Sequence<JS::Value> > >&); |
|
513 void PassNullableSequenceOfNullableSequenceOfAny(JSContext*, const Nullable<Sequence<Nullable<Sequence<JS::Value> > > >&); |
|
514 void PassOptionalNullableSequenceOfNullableSequenceOfAny(JSContext*, const Optional<Nullable<Sequence<Nullable<Sequence<JS::Value> > > > >&); |
|
515 void PassMozMapOfAny(JSContext*, const MozMap<JS::Value>&); |
|
516 void PassNullableMozMapOfAny(JSContext*, const Nullable<MozMap<JS::Value> >&); |
|
517 void PassOptionalMozMapOfAny(JSContext*, const Optional<MozMap<JS::Value> >&); |
|
518 void PassOptionalNullableMozMapOfAny(JSContext*, const Optional<Nullable<MozMap<JS::Value> > >&); |
|
519 void PassOptionalMozMapOfAnyWithDefaultValue(JSContext*, const Nullable<MozMap<JS::Value> >&); |
|
520 void PassMozMapOfMozMapOfAny(JSContext*, const MozMap<MozMap<JS::Value> >&); |
|
521 void PassMozMapOfNullableMozMapOfAny(JSContext*, const MozMap<Nullable<MozMap<JS::Value> > >&); |
|
522 void PassNullableMozMapOfNullableMozMapOfAny(JSContext*, const Nullable<MozMap<Nullable<MozMap<JS::Value> > > >&); |
|
523 void PassOptionalNullableMozMapOfNullableMozMapOfAny(JSContext*, const Optional<Nullable<MozMap<Nullable<MozMap<JS::Value>>>>>&); |
|
524 void PassOptionalNullableMozMapOfNullableSequenceOfAny(JSContext*, const Optional<Nullable<MozMap<Nullable<Sequence<JS::Value>>>>>&); |
|
525 void PassOptionalNullableSequenceOfNullableMozMapOfAny(JSContext*, const Optional<Nullable<Sequence<Nullable<MozMap<JS::Value>>>>>&); |
|
526 void ReceiveAny(JSContext*, JS::MutableHandle<JS::Value>); |
|
527 |
|
528 // object types |
|
529 void PassObject(JSContext*, JS::Handle<JSObject*>); |
|
530 void PassVariadicObject(JSContext*, const Sequence<JSObject*>&); |
|
531 void PassNullableObject(JSContext*, JS::Handle<JSObject*>); |
|
532 void PassVariadicNullableObject(JSContext*, const Sequence<JSObject*>&); |
|
533 void PassOptionalObject(JSContext*, const Optional<JS::Handle<JSObject*> >&); |
|
534 void PassOptionalNullableObject(JSContext*, const Optional<JS::Handle<JSObject*> >&); |
|
535 void PassOptionalNullableObjectWithDefaultValue(JSContext*, JS::Handle<JSObject*>); |
|
536 void PassSequenceOfObject(JSContext*, const Sequence<JSObject*>&); |
|
537 void PassSequenceOfNullableObject(JSContext*, const Sequence<JSObject*>&); |
|
538 void PassNullableSequenceOfObject(JSContext*, const Nullable<Sequence<JSObject*> >&); |
|
539 void PassOptionalNullableSequenceOfNullableSequenceOfObject(JSContext*, const Optional<Nullable<Sequence<Nullable<Sequence<JSObject*> > > > >&); |
|
540 void PassOptionalNullableSequenceOfNullableSequenceOfNullableObject(JSContext*, const Optional<Nullable<Sequence<Nullable<Sequence<JSObject*> > > > >&); |
|
541 void PassMozMapOfObject(JSContext*, const MozMap<JSObject*>&); |
|
542 void ReceiveObject(JSContext*, JS::MutableHandle<JSObject*>); |
|
543 void ReceiveNullableObject(JSContext*, JS::MutableHandle<JSObject*>); |
|
544 |
|
545 // Union types |
|
546 void PassUnion(JSContext*, const ObjectOrLong& arg); |
|
547 void PassUnionWithNullable(JSContext* cx, const ObjectOrNullOrLong& arg) |
|
548 { |
|
549 OwningObjectOrLong returnValue; |
|
550 if (arg.IsNull()) { |
|
551 } else if (arg.IsObject()) { |
|
552 JS::Rooted<JSObject*> obj(cx, arg.GetAsObject()); |
|
553 JS_GetClass(obj); |
|
554 returnValue.SetAsObject() = obj; |
|
555 } else { |
|
556 int32_t i = arg.GetAsLong(); |
|
557 i += 1; |
|
558 returnValue.SetAsLong() = i; |
|
559 } |
|
560 } |
|
561 #ifdef DEBUG |
|
562 void PassUnion2(const LongOrBoolean& arg); |
|
563 void PassUnion3(JSContext*, const ObjectOrLongOrBoolean& arg); |
|
564 void PassUnion4(const NodeOrLongOrBoolean& arg); |
|
565 void PassUnion5(JSContext*, const ObjectOrBoolean& arg); |
|
566 void PassUnion6(JSContext*, const ObjectOrString& arg); |
|
567 void PassUnion7(JSContext*, const ObjectOrStringOrLong& arg); |
|
568 void PassUnion8(JSContext*, const ObjectOrStringOrBoolean& arg); |
|
569 void PassUnion9(JSContext*, const ObjectOrStringOrLongOrBoolean& arg); |
|
570 void PassUnion10(const EventInitOrLong& arg); |
|
571 void PassUnion11(JSContext*, const CustomEventInitOrLong& arg); |
|
572 void PassUnion12(const EventInitOrLong& arg); |
|
573 void PassUnion13(JSContext*, const ObjectOrLongOrNull& arg); |
|
574 void PassUnion14(JSContext*, const ObjectOrLongOrNull& arg); |
|
575 void PassUnionWithCallback(const EventHandlerNonNullOrNullOrLong& arg); |
|
576 #endif |
|
577 void PassNullableUnion(JSContext*, const Nullable<ObjectOrLong>&); |
|
578 void PassOptionalUnion(JSContext*, const Optional<ObjectOrLong>&); |
|
579 void PassOptionalNullableUnion(JSContext*, const Optional<Nullable<ObjectOrLong> >&); |
|
580 void PassOptionalNullableUnionWithDefaultValue(JSContext*, const Nullable<ObjectOrLong>&); |
|
581 //void PassUnionWithInterfaces(const TestInterfaceOrTestExternalInterface& arg); |
|
582 //void PassUnionWithInterfacesAndNullable(const TestInterfaceOrNullOrTestExternalInterface& arg); |
|
583 void PassUnionWithArrayBuffer(const ArrayBufferOrLong&); |
|
584 void PassUnionWithString(JSContext*, const StringOrObject&); |
|
585 //void PassUnionWithEnum(JSContext*, const TestEnumOrObject&); |
|
586 //void PassUnionWithCallback(JSContext*, const TestCallbackOrLong&); |
|
587 void PassUnionWithObject(JSContext*, const ObjectOrLong&); |
|
588 |
|
589 void PassUnionWithDefaultValue1(const DoubleOrString& arg); |
|
590 void PassUnionWithDefaultValue2(const DoubleOrString& arg); |
|
591 void PassUnionWithDefaultValue3(const DoubleOrString& arg); |
|
592 void PassUnionWithDefaultValue4(const FloatOrString& arg); |
|
593 void PassUnionWithDefaultValue5(const FloatOrString& arg); |
|
594 void PassUnionWithDefaultValue6(const FloatOrString& arg); |
|
595 void PassUnionWithDefaultValue7(const UnrestrictedDoubleOrString& arg); |
|
596 void PassUnionWithDefaultValue8(const UnrestrictedDoubleOrString& arg); |
|
597 void PassUnionWithDefaultValue9(const UnrestrictedDoubleOrString& arg); |
|
598 void PassUnionWithDefaultValue10(const UnrestrictedDoubleOrString& arg); |
|
599 void PassUnionWithDefaultValue11(const UnrestrictedFloatOrString& arg); |
|
600 void PassUnionWithDefaultValue12(const UnrestrictedFloatOrString& arg); |
|
601 void PassUnionWithDefaultValue13(const UnrestrictedFloatOrString& arg); |
|
602 void PassUnionWithDefaultValue14(const UnrestrictedFloatOrString& arg); |
|
603 |
|
604 void PassNullableUnionWithDefaultValue1(const Nullable<DoubleOrString>& arg); |
|
605 void PassNullableUnionWithDefaultValue2(const Nullable<DoubleOrString>& arg); |
|
606 void PassNullableUnionWithDefaultValue3(const Nullable<DoubleOrString>& arg); |
|
607 void PassNullableUnionWithDefaultValue4(const Nullable<FloatOrString>& arg); |
|
608 void PassNullableUnionWithDefaultValue5(const Nullable<FloatOrString>& arg); |
|
609 void PassNullableUnionWithDefaultValue6(const Nullable<FloatOrString>& arg); |
|
610 void PassNullableUnionWithDefaultValue7(const Nullable<UnrestrictedDoubleOrString>& arg); |
|
611 void PassNullableUnionWithDefaultValue8(const Nullable<UnrestrictedDoubleOrString>& arg); |
|
612 void PassNullableUnionWithDefaultValue9(const Nullable<UnrestrictedDoubleOrString>& arg); |
|
613 void PassNullableUnionWithDefaultValue10(const Nullable<UnrestrictedFloatOrString>& arg); |
|
614 void PassNullableUnionWithDefaultValue11(const Nullable<UnrestrictedFloatOrString>& arg); |
|
615 void PassNullableUnionWithDefaultValue12(const Nullable<UnrestrictedFloatOrString>& arg); |
|
616 |
|
617 void PassSequenceOfUnions(const Sequence<OwningCanvasPatternOrCanvasGradient>&); |
|
618 void PassSequenceOfUnions2(JSContext*, const Sequence<OwningObjectOrLong>&); |
|
619 void PassVariadicUnion(const Sequence<OwningCanvasPatternOrCanvasGradient>&); |
|
620 |
|
621 void PassSequenceOfNullableUnions(const Sequence<Nullable<OwningCanvasPatternOrCanvasGradient>>&); |
|
622 void PassVariadicNullableUnion(const Sequence<Nullable<OwningCanvasPatternOrCanvasGradient>>&); |
|
623 void PassMozMapOfUnions(const MozMap<OwningCanvasPatternOrCanvasGradient>&); |
|
624 void PassMozMapOfUnions2(JSContext*, const MozMap<OwningObjectOrLong>&); |
|
625 |
|
626 void ReceiveUnion(OwningCanvasPatternOrCanvasGradient&); |
|
627 void ReceiveUnion2(JSContext*, OwningObjectOrLong&); |
|
628 void ReceiveUnionContainingNull(OwningCanvasPatternOrNullOrCanvasGradient&); |
|
629 void ReceiveNullableUnion(Nullable<OwningCanvasPatternOrCanvasGradient>&); |
|
630 void ReceiveNullableUnion2(JSContext*, Nullable<OwningObjectOrLong>&); |
|
631 void GetWritableUnion(OwningCanvasPatternOrCanvasGradient&); |
|
632 void SetWritableUnion(const CanvasPatternOrCanvasGradient&); |
|
633 void GetWritableUnionContainingNull(OwningCanvasPatternOrNullOrCanvasGradient&); |
|
634 void SetWritableUnionContainingNull(const CanvasPatternOrNullOrCanvasGradient&); |
|
635 void GetWritableNullableUnion(Nullable<OwningCanvasPatternOrCanvasGradient>&); |
|
636 void SetWritableNullableUnion(const Nullable<CanvasPatternOrCanvasGradient>&); |
|
637 |
|
638 // Date types |
|
639 void PassDate(Date); |
|
640 void PassNullableDate(const Nullable<Date>&); |
|
641 void PassOptionalDate(const Optional<Date>&); |
|
642 void PassOptionalNullableDate(const Optional<Nullable<Date> >&); |
|
643 void PassOptionalNullableDateWithDefaultValue(const Nullable<Date>&); |
|
644 void PassDateSequence(const Sequence<Date>&); |
|
645 void PassDateMozMap(const MozMap<Date>&); |
|
646 void PassNullableDateSequence(const Sequence<Nullable<Date> >&); |
|
647 Date ReceiveDate(); |
|
648 Nullable<Date> ReceiveNullableDate(); |
|
649 |
|
650 // binaryNames tests |
|
651 void MethodRenamedTo(); |
|
652 void MethodRenamedTo(int8_t); |
|
653 int8_t AttributeGetterRenamedTo(); |
|
654 int8_t AttributeRenamedTo(); |
|
655 void SetAttributeRenamedTo(int8_t); |
|
656 |
|
657 // Dictionary tests |
|
658 void PassDictionary(JSContext*, const Dict&); |
|
659 void GetReadonlyDictionary(JSContext*, Dict&); |
|
660 void GetReadonlyNullableDictionary(JSContext*, Nullable<Dict>&); |
|
661 void GetWritableDictionary(JSContext*, Dict&); |
|
662 void SetWritableDictionary(JSContext*, const Dict&); |
|
663 void GetReadonlyFrozenDictionary(JSContext*, Dict&); |
|
664 void GetReadonlyFrozenNullableDictionary(JSContext*, Nullable<Dict>&); |
|
665 void GetWritableFrozenDictionary(JSContext*, Dict&); |
|
666 void SetWritableFrozenDictionary(JSContext*, const Dict&); |
|
667 void ReceiveDictionary(JSContext*, Dict&); |
|
668 void ReceiveNullableDictionary(JSContext*, Nullable<Dict>&); |
|
669 void PassOtherDictionary(const GrandparentDict&); |
|
670 void PassSequenceOfDictionaries(JSContext*, const Sequence<Dict>&); |
|
671 void PassMozMapOfDictionaries(const MozMap<GrandparentDict>&); |
|
672 void PassDictionaryOrLong(JSContext*, const Dict&); |
|
673 void PassDictionaryOrLong(int32_t); |
|
674 void PassDictContainingDict(JSContext*, const DictContainingDict&); |
|
675 void PassDictContainingSequence(JSContext*, const DictContainingSequence&); |
|
676 void ReceiveDictContainingSequence(JSContext*, DictContainingSequence&); |
|
677 |
|
678 // Typedefs |
|
679 void ExerciseTypedefInterfaces1(TestInterface&); |
|
680 already_AddRefed<TestInterface> ExerciseTypedefInterfaces2(TestInterface*); |
|
681 void ExerciseTypedefInterfaces3(TestInterface&); |
|
682 |
|
683 // Static methods and attributes |
|
684 static void StaticMethod(const GlobalObject&, bool); |
|
685 static void StaticMethodWithContext(const GlobalObject&, JSContext*, |
|
686 JS::Value); |
|
687 static bool StaticAttribute(const GlobalObject&); |
|
688 static void SetStaticAttribute(const GlobalObject&, bool); |
|
689 |
|
690 // Overload resolution tests |
|
691 bool Overload1(TestInterface&); |
|
692 TestInterface* Overload1(const nsAString&, TestInterface&); |
|
693 void Overload2(TestInterface&); |
|
694 void Overload2(JSContext*, const Dict&); |
|
695 void Overload2(bool); |
|
696 void Overload2(const nsAString&); |
|
697 void Overload2(Date); |
|
698 void Overload3(TestInterface&); |
|
699 void Overload3(const TestCallback&); |
|
700 void Overload3(bool); |
|
701 void Overload4(TestInterface&); |
|
702 void Overload4(TestCallbackInterface&); |
|
703 void Overload4(const nsAString&); |
|
704 void Overload5(int32_t); |
|
705 void Overload5(TestEnum); |
|
706 void Overload6(int32_t); |
|
707 void Overload6(bool); |
|
708 void Overload7(int32_t); |
|
709 void Overload7(bool); |
|
710 void Overload7(const nsCString&); |
|
711 void Overload8(int32_t); |
|
712 void Overload8(TestInterface&); |
|
713 void Overload9(const Nullable<int32_t>&); |
|
714 void Overload9(const nsAString&); |
|
715 void Overload10(const Nullable<int32_t>&); |
|
716 void Overload10(JSContext*, JS::Handle<JSObject*>); |
|
717 void Overload11(int32_t); |
|
718 void Overload11(const nsAString&); |
|
719 void Overload12(int32_t); |
|
720 void Overload12(const Nullable<bool>&); |
|
721 void Overload13(const Nullable<int32_t>&); |
|
722 void Overload13(bool); |
|
723 void Overload14(const Optional<int32_t>&); |
|
724 void Overload14(TestInterface&); |
|
725 void Overload15(int32_t); |
|
726 void Overload15(const Optional<NonNull<TestInterface> >&); |
|
727 void Overload16(int32_t); |
|
728 void Overload16(const Optional<TestInterface*>&); |
|
729 |
|
730 // Variadic handling |
|
731 void PassVariadicThirdArg(const nsAString&, int32_t, |
|
732 const Sequence<OwningNonNull<TestInterface> >&); |
|
733 |
|
734 // Conditionally exposed methods/attributes |
|
735 bool Prefable1(); |
|
736 bool Prefable2(); |
|
737 bool Prefable3(); |
|
738 bool Prefable4(); |
|
739 bool Prefable5(); |
|
740 bool Prefable6(); |
|
741 bool Prefable7(); |
|
742 bool Prefable8(); |
|
743 bool Prefable9(); |
|
744 void Prefable10(); |
|
745 void Prefable11(); |
|
746 bool Prefable12(); |
|
747 void Prefable13(); |
|
748 bool Prefable14(); |
|
749 bool Prefable15(); |
|
750 bool Prefable16(); |
|
751 void Prefable17(); |
|
752 void Prefable18(); |
|
753 void Prefable19(); |
|
754 void Prefable20(); |
|
755 void Prefable21(); |
|
756 void Prefable22(); |
|
757 void Prefable23(); |
|
758 void Prefable24(); |
|
759 |
|
760 // Miscellania |
|
761 int32_t AttrWithLenientThis(); |
|
762 void SetAttrWithLenientThis(int32_t); |
|
763 uint32_t UnforgeableAttr(); |
|
764 uint32_t UnforgeableAttr2(); |
|
765 void Stringify(nsString&); |
|
766 void PassRenamedInterface(nsRenamedInterface&); |
|
767 TestInterface* PutForwardsAttr(); |
|
768 TestInterface* PutForwardsAttr2(); |
|
769 TestInterface* PutForwardsAttr3(); |
|
770 void GetJsonifierShouldSkipThis(JSContext*, JS::MutableHandle<JS::Value>); |
|
771 void SetJsonifierShouldSkipThis(JSContext*, JS::Rooted<JS::Value>&); |
|
772 TestParentInterface* JsonifierShouldSkipThis2(); |
|
773 void SetJsonifierShouldSkipThis2(TestParentInterface&); |
|
774 TestCallbackInterface* JsonifierShouldSkipThis3(); |
|
775 void SetJsonifierShouldSkipThis3(TestCallbackInterface&); |
|
776 void ThrowingMethod(ErrorResult& aRv); |
|
777 bool GetThrowingAttr(ErrorResult& aRv) const; |
|
778 void SetThrowingAttr(bool arg, ErrorResult& aRv); |
|
779 bool GetThrowingGetterAttr(ErrorResult& aRv) const; |
|
780 void SetThrowingGetterAttr(bool arg); |
|
781 bool ThrowingSetterAttr() const; |
|
782 void SetThrowingSetterAttr(bool arg, ErrorResult& aRv); |
|
783 int16_t LegacyCall(JS::Value, uint32_t, TestInterface&); |
|
784 void PassArgsWithDefaults(JSContext*, const Optional<int32_t>&, |
|
785 TestInterface*, const Dict&, double, |
|
786 const Optional<float>&); |
|
787 |
|
788 // Methods and properties imported via "implements" |
|
789 bool ImplementedProperty(); |
|
790 void SetImplementedProperty(bool); |
|
791 void ImplementedMethod(); |
|
792 bool ImplementedParentProperty(); |
|
793 void SetImplementedParentProperty(bool); |
|
794 void ImplementedParentMethod(); |
|
795 bool IndirectlyImplementedProperty(); |
|
796 void SetIndirectlyImplementedProperty(bool); |
|
797 void IndirectlyImplementedMethod(); |
|
798 uint32_t DiamondImplementedProperty(); |
|
799 |
|
800 // Test EnforceRange/Clamp |
|
801 void DontEnforceRangeOrClamp(int8_t); |
|
802 void DoEnforceRange(int8_t); |
|
803 void DoClamp(int8_t); |
|
804 void SetEnforcedByte(int8_t); |
|
805 int8_t EnforcedByte(); |
|
806 void SetClampedByte(int8_t); |
|
807 int8_t ClampedByte(); |
|
808 |
|
809 private: |
|
810 // We add signatures here that _could_ start matching if the codegen |
|
811 // got data types wrong. That way if it ever does we'll have a call |
|
812 // to these private deleted methods and compilation will fail. |
|
813 void SetReadonlyByte(int8_t) MOZ_DELETE; |
|
814 template<typename T> |
|
815 void SetWritableByte(T) MOZ_DELETE; |
|
816 template<typename T> |
|
817 void PassByte(T) MOZ_DELETE; |
|
818 void PassNullableByte(Nullable<int8_t>&) MOZ_DELETE; |
|
819 template<typename T> |
|
820 void PassOptionalByte(const Optional<T>&) MOZ_DELETE; |
|
821 template<typename T> |
|
822 void PassOptionalByteWithDefault(T) MOZ_DELETE; |
|
823 void PassVariadicByte(Sequence<int8_t>&) MOZ_DELETE; |
|
824 |
|
825 void SetReadonlyShort(int16_t) MOZ_DELETE; |
|
826 template<typename T> |
|
827 void SetWritableShort(T) MOZ_DELETE; |
|
828 template<typename T> |
|
829 void PassShort(T) MOZ_DELETE; |
|
830 template<typename T> |
|
831 void PassOptionalShort(const Optional<T>&) MOZ_DELETE; |
|
832 template<typename T> |
|
833 void PassOptionalShortWithDefault(T) MOZ_DELETE; |
|
834 |
|
835 void SetReadonlyLong(int32_t) MOZ_DELETE; |
|
836 template<typename T> |
|
837 void SetWritableLong(T) MOZ_DELETE; |
|
838 template<typename T> |
|
839 void PassLong(T) MOZ_DELETE; |
|
840 template<typename T> |
|
841 void PassOptionalLong(const Optional<T>&) MOZ_DELETE; |
|
842 template<typename T> |
|
843 void PassOptionalLongWithDefault(T) MOZ_DELETE; |
|
844 |
|
845 void SetReadonlyLongLong(int64_t) MOZ_DELETE; |
|
846 template<typename T> |
|
847 void SetWritableLongLong(T) MOZ_DELETE; |
|
848 template<typename T> |
|
849 void PassLongLong(T) MOZ_DELETE; |
|
850 template<typename T> |
|
851 void PassOptionalLongLong(const Optional<T>&) MOZ_DELETE; |
|
852 template<typename T> |
|
853 void PassOptionalLongLongWithDefault(T) MOZ_DELETE; |
|
854 |
|
855 void SetReadonlyOctet(uint8_t) MOZ_DELETE; |
|
856 template<typename T> |
|
857 void SetWritableOctet(T) MOZ_DELETE; |
|
858 template<typename T> |
|
859 void PassOctet(T) MOZ_DELETE; |
|
860 template<typename T> |
|
861 void PassOptionalOctet(const Optional<T>&) MOZ_DELETE; |
|
862 template<typename T> |
|
863 void PassOptionalOctetWithDefault(T) MOZ_DELETE; |
|
864 |
|
865 void SetReadonlyUnsignedShort(uint16_t) MOZ_DELETE; |
|
866 template<typename T> |
|
867 void SetWritableUnsignedShort(T) MOZ_DELETE; |
|
868 template<typename T> |
|
869 void PassUnsignedShort(T) MOZ_DELETE; |
|
870 template<typename T> |
|
871 void PassOptionalUnsignedShort(const Optional<T>&) MOZ_DELETE; |
|
872 template<typename T> |
|
873 void PassOptionalUnsignedShortWithDefault(T) MOZ_DELETE; |
|
874 |
|
875 void SetReadonlyUnsignedLong(uint32_t) MOZ_DELETE; |
|
876 template<typename T> |
|
877 void SetWritableUnsignedLong(T) MOZ_DELETE; |
|
878 template<typename T> |
|
879 void PassUnsignedLong(T) MOZ_DELETE; |
|
880 template<typename T> |
|
881 void PassOptionalUnsignedLong(const Optional<T>&) MOZ_DELETE; |
|
882 template<typename T> |
|
883 void PassOptionalUnsignedLongWithDefault(T) MOZ_DELETE; |
|
884 |
|
885 void SetReadonlyUnsignedLongLong(uint64_t) MOZ_DELETE; |
|
886 template<typename T> |
|
887 void SetWritableUnsignedLongLong(T) MOZ_DELETE; |
|
888 template<typename T> |
|
889 void PassUnsignedLongLong(T) MOZ_DELETE; |
|
890 template<typename T> |
|
891 void PassOptionalUnsignedLongLong(const Optional<T>&) MOZ_DELETE; |
|
892 template<typename T> |
|
893 void PassOptionalUnsignedLongLongWithDefault(T) MOZ_DELETE; |
|
894 |
|
895 // Enforce that only const things are passed for sequences |
|
896 void PassSequence(Sequence<int32_t> &) MOZ_DELETE; |
|
897 void PassNullableSequence(Nullable< Sequence<int32_t> >&) MOZ_DELETE; |
|
898 void PassOptionalNullableSequenceWithDefaultValue(Nullable< Sequence<int32_t> >&) MOZ_DELETE; |
|
899 void PassSequenceOfAny(JSContext*, Sequence<JS::Value>&) MOZ_DELETE; |
|
900 void PassNullableSequenceOfAny(JSContext*, Nullable<Sequence<JS::Value> >&) MOZ_DELETE; |
|
901 void PassOptionalSequenceOfAny(JSContext*, Optional<Sequence<JS::Value> >&) MOZ_DELETE; |
|
902 void PassOptionalNullableSequenceOfAny(JSContext*, Optional<Nullable<Sequence<JS::Value> > >&) MOZ_DELETE; |
|
903 void PassOptionalSequenceOfAnyWithDefaultValue(JSContext*, Nullable<Sequence<JS::Value> >&) MOZ_DELETE; |
|
904 void PassSequenceOfSequenceOfAny(JSContext*, Sequence<Sequence<JS::Value> >&) MOZ_DELETE; |
|
905 void PassSequenceOfNullableSequenceOfAny(JSContext*, Sequence<Nullable<Sequence<JS::Value> > >&) MOZ_DELETE; |
|
906 void PassNullableSequenceOfNullableSequenceOfAny(JSContext*, Nullable<Sequence<Nullable<Sequence<JS::Value> > > >&) MOZ_DELETE; |
|
907 void PassOptionalNullableSequenceOfNullableSequenceOfAny(JSContext*, Optional<Nullable<Sequence<Nullable<Sequence<JS::Value> > > > >&) MOZ_DELETE; |
|
908 void PassSequenceOfObject(JSContext*, Sequence<JSObject*>&) MOZ_DELETE; |
|
909 void PassSequenceOfNullableObject(JSContext*, Sequence<JSObject*>&) MOZ_DELETE; |
|
910 void PassOptionalNullableSequenceOfNullableSequenceOfObject(JSContext*, Optional<Nullable<Sequence<Nullable<Sequence<JSObject*> > > > >&) MOZ_DELETE; |
|
911 void PassOptionalNullableSequenceOfNullableSequenceOfNullableObject(JSContext*, Optional<Nullable<Sequence<Nullable<Sequence<JSObject*> > > > >&) MOZ_DELETE; |
|
912 |
|
913 // Enforce that only const things are passed for optional |
|
914 void PassOptionalByte(Optional<int8_t>&) MOZ_DELETE; |
|
915 void PassOptionalNullableByte(Optional<Nullable<int8_t> >&) MOZ_DELETE; |
|
916 void PassOptionalShort(Optional<int16_t>&) MOZ_DELETE; |
|
917 void PassOptionalLong(Optional<int32_t>&) MOZ_DELETE; |
|
918 void PassOptionalLongLong(Optional<int64_t>&) MOZ_DELETE; |
|
919 void PassOptionalOctet(Optional<uint8_t>&) MOZ_DELETE; |
|
920 void PassOptionalUnsignedShort(Optional<uint16_t>&) MOZ_DELETE; |
|
921 void PassOptionalUnsignedLong(Optional<uint32_t>&) MOZ_DELETE; |
|
922 void PassOptionalUnsignedLongLong(Optional<uint64_t>&) MOZ_DELETE; |
|
923 void PassOptionalSelf(Optional<TestInterface*> &) MOZ_DELETE; |
|
924 void PassOptionalNonNullSelf(Optional<NonNull<TestInterface> >&) MOZ_DELETE; |
|
925 void PassOptionalOther(Optional<IndirectlyImplementedInterface*>&); |
|
926 void PassOptionalNonNullOther(Optional<NonNull<IndirectlyImplementedInterface> >&); |
|
927 void PassOptionalExternal(Optional<TestExternalInterface*>&) MOZ_DELETE; |
|
928 void PassOptionalNonNullExternal(Optional<TestExternalInterface*>&) MOZ_DELETE; |
|
929 void PassOptionalSequence(Optional<Sequence<int32_t> >&) MOZ_DELETE; |
|
930 void PassOptionalNullableSequence(Optional<Nullable<Sequence<int32_t> > >&) MOZ_DELETE; |
|
931 void PassOptionalObjectSequence(Optional<Sequence<OwningNonNull<TestInterface> > >&) MOZ_DELETE; |
|
932 void PassOptionalArrayBuffer(Optional<ArrayBuffer>&) MOZ_DELETE; |
|
933 void PassOptionalNullableArrayBuffer(Optional<ArrayBuffer*>&) MOZ_DELETE; |
|
934 void PassOptionalEnum(Optional<TestEnum>&) MOZ_DELETE; |
|
935 void PassOptionalCallback(JSContext*, Optional<OwningNonNull<TestCallback> >&) MOZ_DELETE; |
|
936 void PassOptionalNullableCallback(JSContext*, Optional<nsRefPtr<TestCallback> >&) MOZ_DELETE; |
|
937 void PassOptionalAny(Optional<JS::Handle<JS::Value> >&) MOZ_DELETE; |
|
938 |
|
939 // And test that string stuff is always const |
|
940 void PassString(nsAString&) MOZ_DELETE; |
|
941 void PassNullableString(nsAString&) MOZ_DELETE; |
|
942 void PassOptionalString(Optional<nsAString>&) MOZ_DELETE; |
|
943 void PassOptionalStringWithDefaultValue(nsAString&) MOZ_DELETE; |
|
944 void PassOptionalNullableString(Optional<nsAString>&) MOZ_DELETE; |
|
945 void PassOptionalNullableStringWithDefaultValue(nsAString&) MOZ_DELETE; |
|
946 void PassVariadicString(Sequence<nsString>&) MOZ_DELETE; |
|
947 |
|
948 // cstrings should be const as well |
|
949 void PassByteString(nsCString&) MOZ_DELETE; |
|
950 void PassNullableByteString(nsCString&) MOZ_DELETE; |
|
951 void PassOptionalByteString(Optional<nsCString>&) MOZ_DELETE; |
|
952 void PassOptionalNullableByteString(Optional<nsCString>&) MOZ_DELETE; |
|
953 void PassVariadicByteString(Sequence<nsCString>&) MOZ_DELETE; |
|
954 |
|
955 // Make sure dictionary arguments are always const |
|
956 void PassDictionary(JSContext*, Dict&) MOZ_DELETE; |
|
957 void PassOtherDictionary(GrandparentDict&) MOZ_DELETE; |
|
958 void PassSequenceOfDictionaries(JSContext*, Sequence<Dict>&) MOZ_DELETE; |
|
959 void PassDictionaryOrLong(JSContext*, Dict&) MOZ_DELETE; |
|
960 void PassDictContainingDict(JSContext*, DictContainingDict&) MOZ_DELETE; |
|
961 void PassDictContainingSequence(DictContainingSequence&) MOZ_DELETE; |
|
962 |
|
963 // Make sure various nullable things are always const |
|
964 void PassNullableEnum(Nullable<TestEnum>&) MOZ_DELETE; |
|
965 |
|
966 // Make sure unions are always const |
|
967 void PassUnion(JSContext*, ObjectOrLong& arg) MOZ_DELETE; |
|
968 void PassUnionWithNullable(JSContext*, ObjectOrNullOrLong& arg) MOZ_DELETE; |
|
969 void PassNullableUnion(JSContext*, Nullable<ObjectOrLong>&) MOZ_DELETE; |
|
970 void PassOptionalUnion(JSContext*, Optional<ObjectOrLong>&) MOZ_DELETE; |
|
971 void PassOptionalNullableUnion(JSContext*, Optional<Nullable<ObjectOrLong> >&) MOZ_DELETE; |
|
972 void PassOptionalNullableUnionWithDefaultValue(JSContext*, Nullable<ObjectOrLong>&) MOZ_DELETE; |
|
973 |
|
974 // Make sure various date stuff is const as needed |
|
975 void PassNullableDate(Nullable<Date>&) MOZ_DELETE; |
|
976 void PassOptionalDate(Optional<Date>&) MOZ_DELETE; |
|
977 void PassOptionalNullableDate(Optional<Nullable<Date> >&) MOZ_DELETE; |
|
978 void PassOptionalNullableDateWithDefaultValue(Nullable<Date>&) MOZ_DELETE; |
|
979 void PassDateSequence(Sequence<Date>&) MOZ_DELETE; |
|
980 void PassNullableDateSequence(Sequence<Nullable<Date> >&) MOZ_DELETE; |
|
981 |
|
982 // Make sure variadics are const as needed |
|
983 void PassVariadicAny(JSContext*, Sequence<JS::Value>&) MOZ_DELETE; |
|
984 void PassVariadicObject(JSContext*, Sequence<JSObject*>&) MOZ_DELETE; |
|
985 void PassVariadicNullableObject(JSContext*, Sequence<JSObject*>&) MOZ_DELETE; |
|
986 |
|
987 // Ensure NonNull does not leak in |
|
988 void PassSelf(NonNull<TestInterface>&) MOZ_DELETE; |
|
989 void PassSelf(OwningNonNull<TestInterface>&) MOZ_DELETE; |
|
990 void PassSelf(const NonNull<TestInterface>&) MOZ_DELETE; |
|
991 void PassSelf(const OwningNonNull<TestInterface>&) MOZ_DELETE; |
|
992 void PassOther(NonNull<IndirectlyImplementedInterface>&) MOZ_DELETE; |
|
993 void PassOther(const NonNull<IndirectlyImplementedInterface>&) MOZ_DELETE; |
|
994 void PassOther(OwningNonNull<IndirectlyImplementedInterface>&) MOZ_DELETE; |
|
995 void PassOther(const OwningNonNull<IndirectlyImplementedInterface>&) MOZ_DELETE; |
|
996 void PassCallbackInterface(OwningNonNull<TestCallbackInterface>&) MOZ_DELETE; |
|
997 void PassCallbackInterface(const OwningNonNull<TestCallbackInterface>&) MOZ_DELETE; |
|
998 void PassCallbackInterface(NonNull<TestCallbackInterface>&) MOZ_DELETE; |
|
999 void PassCallbackInterface(const NonNull<TestCallbackInterface>&) MOZ_DELETE; |
|
1000 void PassCallback(OwningNonNull<TestCallback>&) MOZ_DELETE; |
|
1001 void PassCallback(const OwningNonNull<TestCallback>&) MOZ_DELETE; |
|
1002 void PassCallback(NonNull<TestCallback>&) MOZ_DELETE; |
|
1003 void PassCallback(const NonNull<TestCallback>&) MOZ_DELETE; |
|
1004 void PassString(const NonNull<nsAString>&) MOZ_DELETE; |
|
1005 void PassString(NonNull<nsAString>&) MOZ_DELETE; |
|
1006 void PassString(const OwningNonNull<nsAString>&) MOZ_DELETE; |
|
1007 void PassString(OwningNonNull<nsAString>&) MOZ_DELETE; |
|
1008 }; |
|
1009 |
|
1010 class TestIndexedGetterInterface : public nsISupports, |
|
1011 public nsWrapperCache |
|
1012 { |
|
1013 public: |
|
1014 NS_DECL_ISUPPORTS |
|
1015 |
|
1016 // We need a GetParentObject to make binding codegen happy |
|
1017 virtual nsISupports* GetParentObject(); |
|
1018 |
|
1019 uint32_t IndexedGetter(uint32_t, bool&); |
|
1020 uint32_t IndexedGetter(uint32_t&) MOZ_DELETE; |
|
1021 uint32_t Item(uint32_t&); |
|
1022 uint32_t Item(uint32_t, bool&) MOZ_DELETE; |
|
1023 uint32_t Length(); |
|
1024 void LegacyCall(JS::Handle<JS::Value>); |
|
1025 }; |
|
1026 |
|
1027 class TestNamedGetterInterface : public nsISupports, |
|
1028 public nsWrapperCache |
|
1029 { |
|
1030 public: |
|
1031 NS_DECL_ISUPPORTS |
|
1032 |
|
1033 // We need a GetParentObject to make binding codegen happy |
|
1034 virtual nsISupports* GetParentObject(); |
|
1035 |
|
1036 void NamedGetter(const nsAString&, bool&, nsAString&); |
|
1037 bool NameIsEnumerable(const nsAString&); |
|
1038 void GetSupportedNames(unsigned, nsTArray<nsString>&); |
|
1039 }; |
|
1040 |
|
1041 class TestIndexedGetterAndSetterAndNamedGetterInterface : public nsISupports, |
|
1042 public nsWrapperCache |
|
1043 { |
|
1044 public: |
|
1045 NS_DECL_ISUPPORTS |
|
1046 |
|
1047 // We need a GetParentObject to make binding codegen happy |
|
1048 virtual nsISupports* GetParentObject(); |
|
1049 |
|
1050 void NamedGetter(const nsAString&, bool&, nsAString&); |
|
1051 bool NameIsEnumerable(const nsAString&); |
|
1052 void GetSupportedNames(unsigned, nsTArray<nsString>&); |
|
1053 int32_t IndexedGetter(uint32_t, bool&); |
|
1054 void IndexedSetter(uint32_t, int32_t); |
|
1055 uint32_t Length(); |
|
1056 }; |
|
1057 |
|
1058 class TestIndexedAndNamedGetterInterface : public nsISupports, |
|
1059 public nsWrapperCache |
|
1060 { |
|
1061 public: |
|
1062 NS_DECL_ISUPPORTS |
|
1063 |
|
1064 // We need a GetParentObject to make binding codegen happy |
|
1065 virtual nsISupports* GetParentObject(); |
|
1066 |
|
1067 uint32_t IndexedGetter(uint32_t, bool&); |
|
1068 void NamedGetter(const nsAString&, bool&, nsAString&); |
|
1069 bool NameIsEnumerable(const nsAString&); |
|
1070 void NamedItem(const nsAString&, nsAString&); |
|
1071 uint32_t Length(); |
|
1072 void GetSupportedNames(unsigned, nsTArray<nsString>&); |
|
1073 }; |
|
1074 |
|
1075 class TestIndexedSetterInterface : public nsISupports, |
|
1076 public nsWrapperCache |
|
1077 { |
|
1078 public: |
|
1079 NS_DECL_ISUPPORTS |
|
1080 |
|
1081 // We need a GetParentObject to make binding codegen happy |
|
1082 virtual nsISupports* GetParentObject(); |
|
1083 |
|
1084 void IndexedSetter(uint32_t, const nsAString&); |
|
1085 void IndexedGetter(uint32_t, bool&, nsString&); |
|
1086 uint32_t Length(); |
|
1087 void SetItem(uint32_t, const nsAString&); |
|
1088 }; |
|
1089 |
|
1090 class TestNamedSetterInterface : public nsISupports, |
|
1091 public nsWrapperCache |
|
1092 { |
|
1093 public: |
|
1094 NS_DECL_ISUPPORTS |
|
1095 |
|
1096 // We need a GetParentObject to make binding codegen happy |
|
1097 virtual nsISupports* GetParentObject(); |
|
1098 |
|
1099 void NamedSetter(const nsAString&, TestIndexedSetterInterface&); |
|
1100 TestIndexedSetterInterface* NamedGetter(const nsAString&, bool&); |
|
1101 bool NameIsEnumerable(const nsAString&); |
|
1102 void GetSupportedNames(unsigned, nsTArray<nsString>&); |
|
1103 }; |
|
1104 |
|
1105 class TestIndexedAndNamedSetterInterface : public nsISupports, |
|
1106 public nsWrapperCache |
|
1107 { |
|
1108 public: |
|
1109 NS_DECL_ISUPPORTS |
|
1110 |
|
1111 // We need a GetParentObject to make binding codegen happy |
|
1112 virtual nsISupports* GetParentObject(); |
|
1113 |
|
1114 void IndexedSetter(uint32_t, TestIndexedSetterInterface&); |
|
1115 TestIndexedSetterInterface* IndexedGetter(uint32_t, bool&); |
|
1116 uint32_t Length(); |
|
1117 void NamedSetter(const nsAString&, TestIndexedSetterInterface&); |
|
1118 TestIndexedSetterInterface* NamedGetter(const nsAString&, bool&); |
|
1119 bool NameIsEnumerable(const nsAString&); |
|
1120 void SetNamedItem(const nsAString&, TestIndexedSetterInterface&); |
|
1121 void GetSupportedNames(unsigned, nsTArray<nsString>&); |
|
1122 }; |
|
1123 |
|
1124 class TestIndexedAndNamedGetterAndSetterInterface : public TestIndexedSetterInterface |
|
1125 { |
|
1126 public: |
|
1127 uint32_t IndexedGetter(uint32_t, bool&); |
|
1128 uint32_t Item(uint32_t); |
|
1129 void NamedGetter(const nsAString&, bool&, nsAString&); |
|
1130 bool NameIsEnumerable(const nsAString&); |
|
1131 void NamedItem(const nsAString&, nsAString&); |
|
1132 void IndexedSetter(uint32_t, int32_t&); |
|
1133 void IndexedSetter(uint32_t, const nsAString&) MOZ_DELETE; |
|
1134 void NamedSetter(const nsAString&, const nsAString&); |
|
1135 void Stringify(nsAString&); |
|
1136 uint32_t Length(); |
|
1137 void GetSupportedNames(unsigned, nsTArray<nsString>&); |
|
1138 }; |
|
1139 |
|
1140 class TestCppKeywordNamedMethodsInterface : public nsISupports, |
|
1141 public nsWrapperCache |
|
1142 { |
|
1143 public: |
|
1144 NS_DECL_ISUPPORTS |
|
1145 |
|
1146 // We need a GetParentObject to make binding codegen happy |
|
1147 virtual nsISupports* GetParentObject(); |
|
1148 |
|
1149 bool Continue(); |
|
1150 bool Delete(); |
|
1151 int32_t Volatile(); |
|
1152 }; |
|
1153 |
|
1154 class TestIndexedDeleterInterface : public nsISupports, |
|
1155 public nsWrapperCache |
|
1156 { |
|
1157 public: |
|
1158 NS_DECL_ISUPPORTS |
|
1159 |
|
1160 // We need a GetParentObject to make binding codegen happy |
|
1161 virtual nsISupports* GetParentObject(); |
|
1162 |
|
1163 void IndexedDeleter(uint32_t, bool&); |
|
1164 void IndexedDeleter(uint32_t) MOZ_DELETE; |
|
1165 long IndexedGetter(uint32_t, bool&); |
|
1166 uint32_t Length(); |
|
1167 void DelItem(uint32_t); |
|
1168 void DelItem(uint32_t, bool&) MOZ_DELETE; |
|
1169 }; |
|
1170 |
|
1171 class TestIndexedDeleterWithRetvalInterface : public nsISupports, |
|
1172 public nsWrapperCache |
|
1173 { |
|
1174 public: |
|
1175 NS_DECL_ISUPPORTS |
|
1176 |
|
1177 // We need a GetParentObject to make binding codegen happy |
|
1178 virtual nsISupports* GetParentObject(); |
|
1179 |
|
1180 bool IndexedDeleter(uint32_t, bool&); |
|
1181 bool IndexedDeleter(uint32_t) MOZ_DELETE; |
|
1182 long IndexedGetter(uint32_t, bool&); |
|
1183 uint32_t Length(); |
|
1184 bool DelItem(uint32_t); |
|
1185 bool DelItem(uint32_t, bool&) MOZ_DELETE; |
|
1186 }; |
|
1187 |
|
1188 class TestNamedDeleterInterface : public nsISupports, |
|
1189 public nsWrapperCache |
|
1190 { |
|
1191 public: |
|
1192 NS_DECL_ISUPPORTS |
|
1193 |
|
1194 // We need a GetParentObject to make binding codegen happy |
|
1195 virtual nsISupports* GetParentObject(); |
|
1196 |
|
1197 void NamedDeleter(const nsAString&, bool&); |
|
1198 long NamedGetter(const nsAString&, bool&); |
|
1199 bool NameIsEnumerable(const nsAString&); |
|
1200 void GetSupportedNames(unsigned, nsTArray<nsString>&); |
|
1201 }; |
|
1202 |
|
1203 class TestNamedDeleterWithRetvalInterface : public nsISupports, |
|
1204 public nsWrapperCache |
|
1205 { |
|
1206 public: |
|
1207 NS_DECL_ISUPPORTS |
|
1208 |
|
1209 // We need a GetParentObject to make binding codegen happy |
|
1210 virtual nsISupports* GetParentObject(); |
|
1211 |
|
1212 bool NamedDeleter(const nsAString&, bool&); |
|
1213 bool NamedDeleter(const nsAString&) MOZ_DELETE; |
|
1214 long NamedGetter(const nsAString&, bool&); |
|
1215 bool NameIsEnumerable(const nsAString&); |
|
1216 bool DelNamedItem(const nsAString&); |
|
1217 bool DelNamedItem(const nsAString&, bool&) MOZ_DELETE; |
|
1218 void GetSupportedNames(unsigned, nsTArray<nsString>&); |
|
1219 }; |
|
1220 |
|
1221 class TestIndexedAndNamedDeleterInterface : public nsISupports, |
|
1222 public nsWrapperCache |
|
1223 { |
|
1224 public: |
|
1225 NS_DECL_ISUPPORTS |
|
1226 |
|
1227 // We need a GetParentObject to make binding codegen happy |
|
1228 virtual nsISupports* GetParentObject(); |
|
1229 |
|
1230 void IndexedDeleter(uint32_t, bool&); |
|
1231 long IndexedGetter(uint32_t, bool&); |
|
1232 uint32_t Length(); |
|
1233 |
|
1234 void NamedDeleter(const nsAString&, bool&); |
|
1235 void NamedDeleter(const nsAString&) MOZ_DELETE; |
|
1236 long NamedGetter(const nsAString&, bool&); |
|
1237 bool NameIsEnumerable(const nsAString&); |
|
1238 void DelNamedItem(const nsAString&); |
|
1239 void DelNamedItem(const nsAString&, bool&) MOZ_DELETE; |
|
1240 void GetSupportedNames(unsigned, nsTArray<nsString>&); |
|
1241 }; |
|
1242 |
|
1243 class TestParentInterface : public nsISupports, |
|
1244 public nsWrapperCache |
|
1245 { |
|
1246 public: |
|
1247 NS_DECL_ISUPPORTS |
|
1248 |
|
1249 // We need a GetParentObject to make binding codegen happy |
|
1250 virtual nsISupports* GetParentObject(); |
|
1251 }; |
|
1252 |
|
1253 class TestChildInterface : public TestParentInterface |
|
1254 { |
|
1255 }; |
|
1256 |
|
1257 } // namespace dom |
|
1258 } // namespace mozilla |
|
1259 |
|
1260 #endif /* TestBindingHeader_h */ |