2012-05-23 09:44:48 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef TestBindingHeader_h
|
|
|
|
#define TestBindingHeader_h
|
|
|
|
|
2012-05-23 09:44:48 -07:00
|
|
|
#include "mozilla/dom/BindingUtils.h"
|
2013-08-21 23:30:38 -07:00
|
|
|
#include "mozilla/dom/Date.h"
|
2012-05-29 20:45:18 -07:00
|
|
|
#include "mozilla/dom/TypedArray.h"
|
2013-04-25 08:42:43 -07:00
|
|
|
#include "mozilla/dom/UnionTypes.h"
|
2013-08-21 23:30:38 -07:00
|
|
|
#include "mozilla/ErrorResult.h"
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsWrapperCache.h"
|
2013-04-25 08:42:43 -07:00
|
|
|
|
|
|
|
// Forward declare this before we include TestCodeGenBinding.h, because that header relies on including
|
|
|
|
// this one for it, for ParentDict. Hopefully it won't begin to rely on it in more fundamental ways.
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
class TestExternalInterface;
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2012-05-29 20:45:18 -07:00
|
|
|
// We don't export TestCodeGenBinding.h, but it's right in our parent dir.
|
|
|
|
#include "../TestCodeGenBinding.h"
|
2012-05-23 09:44:48 -07:00
|
|
|
|
2013-02-19 08:54:41 -08:00
|
|
|
extern bool TestFuncControlledMember(JSContext*, JSObject*);
|
|
|
|
|
2012-05-23 09:44:48 -07:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2012-10-24 13:10:49 -07:00
|
|
|
// IID for nsRenamedInterface
|
|
|
|
#define NS_RENAMED_INTERFACE_IID \
|
|
|
|
{ 0xd4b19ef3, 0xe68b, 0x4e3f, \
|
|
|
|
{ 0x94, 0xbc, 0xc9, 0xde, 0x3a, 0x69, 0xb0, 0xe8 } }
|
|
|
|
|
|
|
|
class nsRenamedInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECLARE_STATIC_IID_ACCESSOR(NS_RENAMED_INTERFACE_IID)
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
};
|
|
|
|
|
2012-07-19 11:48:58 -07:00
|
|
|
// IID for the IndirectlyImplementedInterface
|
|
|
|
#define NS_INDIRECTLY_IMPLEMENTED_INTERFACE_IID \
|
|
|
|
{ 0xfed55b69, 0x7012, 0x4849, \
|
|
|
|
{ 0xaf, 0x56, 0x4b, 0xa9, 0xee, 0x41, 0x30, 0x89 } }
|
|
|
|
|
|
|
|
class IndirectlyImplementedInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECLARE_STATIC_IID_ACCESSOR(NS_INDIRECTLY_IMPLEMENTED_INTERFACE_IID)
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
2012-09-11 12:08:24 -07:00
|
|
|
bool IndirectlyImplementedProperty();
|
|
|
|
void IndirectlyImplementedProperty(bool);
|
2012-09-05 06:21:33 -07:00
|
|
|
void IndirectlyImplementedMethod();
|
2012-07-19 11:48:58 -07:00
|
|
|
};
|
|
|
|
|
2012-05-29 20:45:18 -07:00
|
|
|
// IID for the TestExternalInterface
|
|
|
|
#define NS_TEST_EXTERNAL_INTERFACE_IID \
|
|
|
|
{ 0xd5ba0c99, 0x9b1d, 0x4e71, \
|
|
|
|
{ 0x8a, 0x94, 0x56, 0x38, 0x6c, 0xa3, 0xda, 0x3d } }
|
|
|
|
class TestExternalInterface : public nsISupports
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECLARE_STATIC_IID_ACCESSOR(NS_TEST_EXTERNAL_INTERFACE_IID)
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
};
|
|
|
|
|
2012-06-15 13:25:50 -07:00
|
|
|
class TestNonWrapperCacheInterface : public nsISupports
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
2013-04-25 09:29:54 -07:00
|
|
|
virtual JSObject* WrapObject(JSContext* cx, JS::Handle<JSObject*> scope);
|
2012-06-15 13:25:50 -07:00
|
|
|
};
|
|
|
|
|
2012-07-26 21:09:10 -07:00
|
|
|
class OnlyForUseInConstructor : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
};
|
|
|
|
|
2012-05-23 09:44:48 -07:00
|
|
|
class TestInterface : public nsISupports,
|
2012-05-29 20:45:18 -07:00
|
|
|
public nsWrapperCache
|
2012-05-23 09:44:48 -07:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
2012-05-23 09:44:48 -07:00
|
|
|
// We need a GetParentObject to make binding codegen happy
|
2012-05-23 09:44:48 -07:00
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
2012-05-23 09:44:48 -07:00
|
|
|
// And now our actual WebIDL API
|
2012-06-01 18:26:20 -07:00
|
|
|
// Constructors
|
|
|
|
static
|
2012-12-03 08:07:49 -08:00
|
|
|
already_AddRefed<TestInterface>
|
|
|
|
Constructor(const GlobalObject&, ErrorResult&);
|
2012-06-01 18:26:20 -07:00
|
|
|
static
|
2012-12-03 08:07:49 -08:00
|
|
|
already_AddRefed<TestInterface>
|
|
|
|
Constructor(const GlobalObject&, const nsAString&, ErrorResult&);
|
2012-06-01 18:26:20 -07:00
|
|
|
static
|
2012-12-03 08:07:49 -08:00
|
|
|
already_AddRefed<TestInterface>
|
|
|
|
Constructor(const GlobalObject&, uint32_t, const Nullable<bool>&,
|
|
|
|
ErrorResult&);
|
2012-06-04 18:30:00 -07:00
|
|
|
static
|
2012-12-03 08:07:49 -08:00
|
|
|
already_AddRefed<TestInterface>
|
|
|
|
Constructor(const GlobalObject&, TestInterface*, ErrorResult&);
|
2012-06-04 18:30:00 -07:00
|
|
|
static
|
2012-12-03 08:07:49 -08:00
|
|
|
already_AddRefed<TestInterface>
|
2013-01-08 10:05:36 -08:00
|
|
|
Constructor(const GlobalObject&, uint32_t, IndirectlyImplementedInterface&, ErrorResult&);
|
2013-05-17 13:52:32 -07:00
|
|
|
|
|
|
|
static
|
|
|
|
already_AddRefed<TestInterface>
|
|
|
|
Constructor(const GlobalObject&, Date&, ErrorResult&);
|
2012-07-26 21:09:10 -07:00
|
|
|
/* static
|
2012-12-03 08:07:49 -08:00
|
|
|
already_AddRefed<TestInterface>
|
|
|
|
Constructor(const GlobalObject&, uint32_t, uint32_t,
|
|
|
|
const TestInterfaceOrOnlyForUseInConstructor&, ErrorResult&);
|
2012-07-26 21:09:10 -07:00
|
|
|
*/
|
2013-01-22 02:51:15 -08:00
|
|
|
|
|
|
|
static
|
|
|
|
already_AddRefed<TestInterface> Test(const GlobalObject&, ErrorResult&);
|
|
|
|
static
|
|
|
|
already_AddRefed<TestInterface> Test(const GlobalObject&, const nsAString&,
|
|
|
|
ErrorResult&);
|
2013-04-25 16:03:05 -07:00
|
|
|
static
|
2013-06-12 22:18:35 -07:00
|
|
|
already_AddRefed<TestInterface> Test(const GlobalObject&, const nsACString&,
|
|
|
|
ErrorResult&);
|
|
|
|
|
|
|
|
static
|
2013-04-25 16:03:05 -07:00
|
|
|
already_AddRefed<TestInterface> Test2(const GlobalObject&,
|
|
|
|
JSContext*,
|
|
|
|
const DictForConstructor&,
|
|
|
|
JS::Value,
|
2013-05-16 09:36:55 -07:00
|
|
|
JS::Handle<JSObject*>,
|
|
|
|
JS::Handle<JSObject*>,
|
2013-04-25 16:03:05 -07:00
|
|
|
const Sequence<Dict>&,
|
2013-05-16 09:36:56 -07:00
|
|
|
const Optional<JS::Handle<JS::Value> >&,
|
|
|
|
const Optional<JS::Handle<JSObject*> >&,
|
|
|
|
const Optional<JS::Handle<JSObject*> >&,
|
2013-04-25 16:03:05 -07:00
|
|
|
ErrorResult&);
|
2013-01-22 02:51:15 -08:00
|
|
|
|
2012-05-29 20:45:18 -07:00
|
|
|
// Integer types
|
2012-09-11 12:08:24 -07:00
|
|
|
int8_t ReadonlyByte();
|
|
|
|
int8_t WritableByte();
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetWritableByte(int8_t);
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassByte(int8_t);
|
|
|
|
int8_t ReceiveByte();
|
|
|
|
void PassOptionalByte(const Optional<int8_t>&);
|
2013-06-05 17:51:21 -07:00
|
|
|
void PassOptionalUndefinedMissingByte(const Optional<int8_t>&);
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalByteWithDefault(int8_t);
|
2013-06-05 17:51:21 -07:00
|
|
|
void PassOptionalUndefinedMissingByteWithDefault(int8_t);
|
2012-10-17 14:01:55 -07:00
|
|
|
void PassNullableByte(const Nullable<int8_t>&);
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalNullableByte(const Optional< Nullable<int8_t> >&);
|
2012-12-11 14:50:56 -08:00
|
|
|
void PassVariadicByte(const Sequence<int8_t>&);
|
2012-05-23 09:44:48 -07:00
|
|
|
|
2012-09-11 12:08:24 -07:00
|
|
|
int16_t ReadonlyShort();
|
|
|
|
int16_t WritableShort();
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetWritableShort(int16_t);
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassShort(int16_t);
|
|
|
|
int16_t ReceiveShort();
|
|
|
|
void PassOptionalShort(const Optional<int16_t>&);
|
|
|
|
void PassOptionalShortWithDefault(int16_t);
|
2012-05-23 09:44:48 -07:00
|
|
|
|
2012-09-11 12:08:24 -07:00
|
|
|
int32_t ReadonlyLong();
|
|
|
|
int32_t WritableLong();
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetWritableLong(int32_t);
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassLong(int32_t);
|
|
|
|
int16_t ReceiveLong();
|
|
|
|
void PassOptionalLong(const Optional<int32_t>&);
|
|
|
|
void PassOptionalLongWithDefault(int32_t);
|
2012-05-23 09:44:48 -07:00
|
|
|
|
2012-09-11 12:08:24 -07:00
|
|
|
int64_t ReadonlyLongLong();
|
|
|
|
int64_t WritableLongLong();
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetWritableLongLong(int64_t);
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassLongLong(int64_t);
|
|
|
|
int64_t ReceiveLongLong();
|
|
|
|
void PassOptionalLongLong(const Optional<int64_t>&);
|
|
|
|
void PassOptionalLongLongWithDefault(int64_t);
|
2012-05-23 09:44:48 -07:00
|
|
|
|
2012-09-11 12:08:24 -07:00
|
|
|
uint8_t ReadonlyOctet();
|
|
|
|
uint8_t WritableOctet();
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetWritableOctet(uint8_t);
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOctet(uint8_t);
|
|
|
|
uint8_t ReceiveOctet();
|
|
|
|
void PassOptionalOctet(const Optional<uint8_t>&);
|
|
|
|
void PassOptionalOctetWithDefault(uint8_t);
|
2012-05-23 09:44:48 -07:00
|
|
|
|
2012-09-11 12:08:24 -07:00
|
|
|
uint16_t ReadonlyUnsignedShort();
|
|
|
|
uint16_t WritableUnsignedShort();
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetWritableUnsignedShort(uint16_t);
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassUnsignedShort(uint16_t);
|
|
|
|
uint16_t ReceiveUnsignedShort();
|
|
|
|
void PassOptionalUnsignedShort(const Optional<uint16_t>&);
|
|
|
|
void PassOptionalUnsignedShortWithDefault(uint16_t);
|
2012-05-23 09:44:48 -07:00
|
|
|
|
2012-09-11 12:08:24 -07:00
|
|
|
uint32_t ReadonlyUnsignedLong();
|
|
|
|
uint32_t WritableUnsignedLong();
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetWritableUnsignedLong(uint32_t);
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassUnsignedLong(uint32_t);
|
|
|
|
uint32_t ReceiveUnsignedLong();
|
|
|
|
void PassOptionalUnsignedLong(const Optional<uint32_t>&);
|
|
|
|
void PassOptionalUnsignedLongWithDefault(uint32_t);
|
2012-05-23 09:44:48 -07:00
|
|
|
|
2012-09-11 12:08:24 -07:00
|
|
|
uint64_t ReadonlyUnsignedLongLong();
|
|
|
|
uint64_t WritableUnsignedLongLong();
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetWritableUnsignedLongLong(uint64_t);
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassUnsignedLongLong(uint64_t);
|
|
|
|
uint64_t ReceiveUnsignedLongLong();
|
|
|
|
void PassOptionalUnsignedLongLong(const Optional<uint64_t>&);
|
|
|
|
void PassOptionalUnsignedLongLongWithDefault(uint64_t);
|
2012-05-23 09:44:48 -07:00
|
|
|
|
2012-11-27 12:32:05 -08:00
|
|
|
float WritableFloat() const;
|
|
|
|
void SetWritableFloat(float);
|
|
|
|
float WritableUnrestrictedFloat() const;
|
|
|
|
void SetWritableUnrestrictedFloat(float);
|
|
|
|
Nullable<float> GetWritableNullableFloat() const;
|
|
|
|
void SetWritableNullableFloat(Nullable<float>);
|
|
|
|
Nullable<float> GetWritableNullableUnrestrictedFloat() const;
|
|
|
|
void SetWritableNullableUnrestrictedFloat(Nullable<float>);
|
|
|
|
double WritableDouble() const;
|
|
|
|
void SetWritableDouble(double);
|
|
|
|
double WritableUnrestrictedDouble() const;
|
|
|
|
void SetWritableUnrestrictedDouble(double);
|
|
|
|
Nullable<double> GetWritableNullableDouble() const;
|
|
|
|
void SetWritableNullableDouble(Nullable<double>);
|
|
|
|
Nullable<double> GetWritableNullableUnrestrictedDouble() const;
|
|
|
|
void SetWritableNullableUnrestrictedDouble(Nullable<double>);
|
|
|
|
void PassFloat(float, float, Nullable<float>, Nullable<float>,
|
|
|
|
double, double, Nullable<double>, Nullable<double>,
|
|
|
|
const Sequence<float>&, const Sequence<float>&,
|
|
|
|
const Sequence<Nullable<float> >&,
|
|
|
|
const Sequence<Nullable<float> >&,
|
|
|
|
const Sequence<double>&, const Sequence<double>&,
|
|
|
|
const Sequence<Nullable<double> >&,
|
|
|
|
const Sequence<Nullable<double> >&);
|
|
|
|
void PassLenientFloat(float, float, Nullable<float>, Nullable<float>,
|
|
|
|
double, double, Nullable<double>, Nullable<double>,
|
|
|
|
const Sequence<float>&, const Sequence<float>&,
|
|
|
|
const Sequence<Nullable<float> >&,
|
|
|
|
const Sequence<Nullable<float> >&,
|
|
|
|
const Sequence<double>&, const Sequence<double>&,
|
|
|
|
const Sequence<Nullable<double> >&,
|
|
|
|
const Sequence<Nullable<double> >&);
|
|
|
|
float LenientFloatAttr() const;
|
|
|
|
void SetLenientFloatAttr(float);
|
|
|
|
double LenientDoubleAttr() const;
|
|
|
|
void SetLenientDoubleAttr(double);
|
|
|
|
|
2013-04-18 09:58:01 -07:00
|
|
|
void PassUnrestricted(float arg1,
|
|
|
|
float arg2,
|
|
|
|
float arg3,
|
|
|
|
float arg4,
|
|
|
|
double arg5,
|
|
|
|
double arg6,
|
|
|
|
double arg7,
|
|
|
|
double arg8);
|
|
|
|
|
2012-05-29 20:45:18 -07:00
|
|
|
// Interface types
|
2012-09-05 06:21:33 -07:00
|
|
|
already_AddRefed<TestInterface> ReceiveSelf();
|
|
|
|
already_AddRefed<TestInterface> ReceiveNullableSelf();
|
|
|
|
TestInterface* ReceiveWeakSelf();
|
|
|
|
TestInterface* ReceiveWeakNullableSelf();
|
|
|
|
void PassSelf(TestInterface&);
|
|
|
|
void PassNullableSelf(TestInterface*);
|
2012-09-11 12:08:24 -07:00
|
|
|
already_AddRefed<TestInterface> NonNullSelf();
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetNonNullSelf(TestInterface&);
|
|
|
|
already_AddRefed<TestInterface> GetNullableSelf();
|
|
|
|
void SetNullableSelf(TestInterface*);
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalSelf(const Optional<TestInterface*> &);
|
|
|
|
void PassOptionalNonNullSelf(const Optional<NonNull<TestInterface> >&);
|
|
|
|
void PassOptionalSelfWithDefault(TestInterface*);
|
|
|
|
|
|
|
|
already_AddRefed<TestNonWrapperCacheInterface> ReceiveNonWrapperCacheInterface();
|
|
|
|
already_AddRefed<TestNonWrapperCacheInterface> ReceiveNullableNonWrapperCacheInterface();
|
|
|
|
void ReceiveNonWrapperCacheInterfaceSequence(nsTArray<nsRefPtr<TestNonWrapperCacheInterface> >&);
|
|
|
|
void ReceiveNullableNonWrapperCacheInterfaceSequence(nsTArray<nsRefPtr<TestNonWrapperCacheInterface> >&);
|
|
|
|
void ReceiveNonWrapperCacheInterfaceNullableSequence(Nullable<nsTArray<nsRefPtr<TestNonWrapperCacheInterface> > >&);
|
|
|
|
void ReceiveNullableNonWrapperCacheInterfaceNullableSequence(Nullable<nsTArray<nsRefPtr<TestNonWrapperCacheInterface> > >&);
|
|
|
|
|
2013-01-08 10:05:36 -08:00
|
|
|
already_AddRefed<IndirectlyImplementedInterface> ReceiveOther();
|
|
|
|
already_AddRefed<IndirectlyImplementedInterface> ReceiveNullableOther();
|
|
|
|
IndirectlyImplementedInterface* ReceiveWeakOther();
|
|
|
|
IndirectlyImplementedInterface* ReceiveWeakNullableOther();
|
|
|
|
void PassOther(IndirectlyImplementedInterface&);
|
|
|
|
void PassNullableOther(IndirectlyImplementedInterface*);
|
|
|
|
already_AddRefed<IndirectlyImplementedInterface> NonNullOther();
|
|
|
|
void SetNonNullOther(IndirectlyImplementedInterface&);
|
|
|
|
already_AddRefed<IndirectlyImplementedInterface> GetNullableOther();
|
|
|
|
void SetNullableOther(IndirectlyImplementedInterface*);
|
|
|
|
void PassOptionalOther(const Optional<IndirectlyImplementedInterface*>&);
|
|
|
|
void PassOptionalNonNullOther(const Optional<NonNull<IndirectlyImplementedInterface> >&);
|
|
|
|
void PassOptionalOtherWithDefault(IndirectlyImplementedInterface*);
|
2012-09-05 06:21:33 -07:00
|
|
|
|
|
|
|
already_AddRefed<TestExternalInterface> ReceiveExternal();
|
|
|
|
already_AddRefed<TestExternalInterface> ReceiveNullableExternal();
|
|
|
|
TestExternalInterface* ReceiveWeakExternal();
|
|
|
|
TestExternalInterface* ReceiveWeakNullableExternal();
|
|
|
|
void PassExternal(TestExternalInterface*);
|
|
|
|
void PassNullableExternal(TestExternalInterface*);
|
2012-09-11 12:08:24 -07:00
|
|
|
already_AddRefed<TestExternalInterface> NonNullExternal();
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetNonNullExternal(TestExternalInterface*);
|
|
|
|
already_AddRefed<TestExternalInterface> GetNullableExternal();
|
|
|
|
void SetNullableExternal(TestExternalInterface*);
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalExternal(const Optional<TestExternalInterface*>&);
|
|
|
|
void PassOptionalNonNullExternal(const Optional<TestExternalInterface*>&);
|
|
|
|
void PassOptionalExternalWithDefault(TestExternalInterface*);
|
|
|
|
|
2013-01-28 05:34:31 -08:00
|
|
|
already_AddRefed<TestCallbackInterface> ReceiveCallbackInterface();
|
|
|
|
already_AddRefed<TestCallbackInterface> ReceiveNullableCallbackInterface();
|
|
|
|
TestCallbackInterface* ReceiveWeakCallbackInterface();
|
|
|
|
TestCallbackInterface* ReceiveWeakNullableCallbackInterface();
|
|
|
|
void PassCallbackInterface(TestCallbackInterface&);
|
|
|
|
void PassNullableCallbackInterface(TestCallbackInterface*);
|
|
|
|
already_AddRefed<TestCallbackInterface> NonNullCallbackInterface();
|
|
|
|
void SetNonNullCallbackInterface(TestCallbackInterface&);
|
|
|
|
already_AddRefed<TestCallbackInterface> GetNullableCallbackInterface();
|
|
|
|
void SetNullableCallbackInterface(TestCallbackInterface*);
|
|
|
|
void PassOptionalCallbackInterface(const Optional<nsRefPtr<TestCallbackInterface> >&);
|
|
|
|
void PassOptionalNonNullCallbackInterface(const Optional<OwningNonNull<TestCallbackInterface> >&);
|
|
|
|
void PassOptionalCallbackInterfaceWithDefault(TestCallbackInterface*);
|
2012-07-19 11:48:58 -07:00
|
|
|
|
2012-09-05 06:21:33 -07:00
|
|
|
already_AddRefed<IndirectlyImplementedInterface> ReceiveConsequentialInterface();
|
|
|
|
void PassConsequentialInterface(IndirectlyImplementedInterface&);
|
2012-07-19 11:48:58 -07:00
|
|
|
|
2012-05-29 20:45:18 -07:00
|
|
|
// Sequence types
|
2012-09-05 06:21:33 -07:00
|
|
|
void ReceiveSequence(nsTArray<int32_t>&);
|
|
|
|
void ReceiveNullableSequence(Nullable< nsTArray<int32_t> >&);
|
|
|
|
void ReceiveSequenceOfNullableInts(nsTArray< Nullable<int32_t> >&);
|
|
|
|
void ReceiveNullableSequenceOfNullableInts(Nullable< nsTArray< Nullable<int32_t> > >&);
|
|
|
|
void PassSequence(const Sequence<int32_t> &);
|
|
|
|
void PassNullableSequence(const Nullable< Sequence<int32_t> >&);
|
|
|
|
void PassSequenceOfNullableInts(const Sequence<Nullable<int32_t> >&);
|
|
|
|
void PassOptionalSequenceOfNullableInts(const Optional<Sequence<Nullable<int32_t> > > &);
|
|
|
|
void PassOptionalNullableSequenceOfNullableInts(const Optional<Nullable<Sequence<Nullable<int32_t> > > > &);
|
|
|
|
void ReceiveCastableObjectSequence(nsTArray< nsRefPtr<TestInterface> > &);
|
2013-01-28 05:34:31 -08:00
|
|
|
void ReceiveCallbackObjectSequence(nsTArray< nsRefPtr<TestCallbackInterface> > &);
|
2012-09-05 06:21:33 -07:00
|
|
|
void ReceiveNullableCastableObjectSequence(nsTArray< nsRefPtr<TestInterface> > &);
|
2013-01-28 05:34:31 -08:00
|
|
|
void ReceiveNullableCallbackObjectSequence(nsTArray< nsRefPtr<TestCallbackInterface> > &);
|
2012-09-05 06:21:33 -07:00
|
|
|
void ReceiveCastableObjectNullableSequence(Nullable< nsTArray< nsRefPtr<TestInterface> > >&);
|
|
|
|
void ReceiveNullableCastableObjectNullableSequence(Nullable< nsTArray< nsRefPtr<TestInterface> > >&);
|
|
|
|
void ReceiveWeakCastableObjectSequence(nsTArray<TestInterface*> &);
|
|
|
|
void ReceiveWeakNullableCastableObjectSequence(nsTArray<TestInterface*> &);
|
|
|
|
void ReceiveWeakCastableObjectNullableSequence(Nullable< nsTArray<TestInterface*> >&);
|
|
|
|
void ReceiveWeakNullableCastableObjectNullableSequence(Nullable< nsTArray<TestInterface*> >&);
|
|
|
|
void PassCastableObjectSequence(const Sequence< OwningNonNull<TestInterface> >&);
|
|
|
|
void PassNullableCastableObjectSequence(const Sequence< nsRefPtr<TestInterface> > &);
|
|
|
|
void PassCastableObjectNullableSequence(const Nullable< Sequence< OwningNonNull<TestInterface> > >&);
|
|
|
|
void PassNullableCastableObjectNullableSequence(const Nullable< Sequence< nsRefPtr<TestInterface> > >&);
|
|
|
|
void PassOptionalSequence(const Optional<Sequence<int32_t> >&);
|
|
|
|
void PassOptionalNullableSequence(const Optional<Nullable<Sequence<int32_t> > >&);
|
|
|
|
void PassOptionalNullableSequenceWithDefaultValue(const Nullable< Sequence<int32_t> >&);
|
|
|
|
void PassOptionalObjectSequence(const Optional<Sequence<OwningNonNull<TestInterface> > >&);
|
2012-11-27 12:20:40 -08:00
|
|
|
void PassExternalInterfaceSequence(const Sequence<nsRefPtr<TestExternalInterface> >&);
|
|
|
|
void PassNullableExternalInterfaceSequence(const Sequence<nsRefPtr<TestExternalInterface> >&);
|
2012-09-05 06:21:33 -07:00
|
|
|
|
|
|
|
void ReceiveStringSequence(nsTArray<nsString>&);
|
|
|
|
void PassStringSequence(const Sequence<nsString>&);
|
2012-06-12 07:22:05 -07:00
|
|
|
|
2013-06-12 22:18:35 -07:00
|
|
|
void ReceiveByteStringSequence(nsTArray<nsCString>&);
|
|
|
|
void PassByteStringSequence(const Sequence<nsCString>&);
|
|
|
|
|
2012-06-13 08:15:05 -07:00
|
|
|
void ReceiveAnySequence(JSContext*, nsTArray<JS::Value>&);
|
2013-05-16 09:36:55 -07:00
|
|
|
void ReceiveNullableAnySequence(JSContext*, Nullable<nsTArray<JS::Value> >&);
|
|
|
|
void ReceiveAnySequenceSequence(JSContext*, nsTArray<nsTArray<JS::Value> >&);
|
|
|
|
|
|
|
|
void ReceiveObjectSequence(JSContext*, nsTArray<JSObject*>&);
|
|
|
|
void ReceiveNullableObjectSequence(JSContext*, nsTArray<JSObject*>&);
|
2012-06-13 08:15:05 -07:00
|
|
|
|
2013-03-01 22:07:43 -08:00
|
|
|
void PassSequenceOfSequences(const Sequence< Sequence<int32_t> >&);
|
2013-04-02 17:20:38 -07:00
|
|
|
void ReceiveSequenceOfSequences(nsTArray< nsTArray<int32_t> >&);
|
2013-03-01 22:07:43 -08:00
|
|
|
|
2012-05-29 20:45:18 -07:00
|
|
|
// Typed array types
|
2013-08-05 10:40:01 -07:00
|
|
|
void PassArrayBuffer(const ArrayBuffer&);
|
|
|
|
void PassNullableArrayBuffer(const Nullable<ArrayBuffer>&);
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalArrayBuffer(const Optional<ArrayBuffer>&);
|
2013-08-05 10:40:01 -07:00
|
|
|
void PassOptionalNullableArrayBuffer(const Optional<Nullable<ArrayBuffer> >&);
|
|
|
|
void PassOptionalNullableArrayBufferWithDefaultValue(const Nullable<ArrayBuffer>&);
|
|
|
|
void PassArrayBufferView(const ArrayBufferView&);
|
|
|
|
void PassInt8Array(const Int8Array&);
|
|
|
|
void PassInt16Array(const Int16Array&);
|
|
|
|
void PassInt32Array(const Int32Array&);
|
|
|
|
void PassUint8Array(const Uint8Array&);
|
|
|
|
void PassUint16Array(const Uint16Array&);
|
|
|
|
void PassUint32Array(const Uint32Array&);
|
|
|
|
void PassUint8ClampedArray(const Uint8ClampedArray&);
|
|
|
|
void PassFloat32Array(const Float32Array&);
|
|
|
|
void PassFloat64Array(const Float64Array&);
|
2013-08-05 10:40:02 -07:00
|
|
|
void PassSequenceOfArrayBuffers(const Sequence<ArrayBuffer>&);
|
|
|
|
void PassSequenceOfNullableArrayBuffers(const Sequence<Nullable<ArrayBuffer> >&);
|
|
|
|
void PassVariadicTypedArray(const Sequence<Float32Array>&);
|
|
|
|
void PassVariadicNullableTypedArray(const Sequence<Nullable<Float32Array> >&);
|
2012-09-20 19:47:47 -07:00
|
|
|
JSObject* ReceiveUint8Array(JSContext*);
|
2012-05-29 20:45:18 -07:00
|
|
|
|
2013-06-12 22:18:35 -07:00
|
|
|
// DOMString types
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassString(const nsAString&);
|
|
|
|
void PassNullableString(const nsAString&);
|
|
|
|
void PassOptionalString(const Optional<nsAString>&);
|
2013-06-05 17:51:21 -07:00
|
|
|
void PassOptionalUndefinedMissingString(const Optional<nsAString>&);
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalStringWithDefaultValue(const nsAString&);
|
2013-06-05 17:51:21 -07:00
|
|
|
void PassOptionalUndefinedMissingStringWithDefaultValue(const nsAString&);
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalNullableString(const Optional<nsAString>&);
|
|
|
|
void PassOptionalNullableStringWithDefaultValue(const nsAString&);
|
2012-12-11 14:50:56 -08:00
|
|
|
void PassVariadicString(const Sequence<nsString>&);
|
2012-05-29 20:45:18 -07:00
|
|
|
|
2013-06-12 22:18:35 -07:00
|
|
|
// ByteString types
|
|
|
|
void PassByteString(const nsCString&);
|
|
|
|
void PassNullableByteString(const nsCString&);
|
|
|
|
void PassOptionalByteString(const Optional<nsCString>&);
|
|
|
|
void PassOptionalNullableByteString(const Optional<nsCString>&);
|
|
|
|
void PassVariadicByteString(const Sequence<nsCString>&);
|
|
|
|
|
2012-10-17 14:01:55 -07:00
|
|
|
// Enumerated types
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassEnum(TestEnum);
|
2013-04-19 20:04:19 -07:00
|
|
|
void PassNullableEnum(const Nullable<TestEnum>&);
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalEnum(const Optional<TestEnum>&);
|
|
|
|
void PassEnumWithDefault(TestEnum);
|
2013-04-19 20:04:19 -07:00
|
|
|
void PassOptionalNullableEnum(const Optional<Nullable<TestEnum> >&);
|
|
|
|
void PassOptionalNullableEnumWithDefaultValue(const Nullable<TestEnum>&);
|
|
|
|
void PassOptionalNullableEnumWithDefaultValue2(const Nullable<TestEnum>&);
|
2012-09-05 06:21:33 -07:00
|
|
|
TestEnum ReceiveEnum();
|
2013-04-19 20:04:19 -07:00
|
|
|
Nullable<TestEnum> ReceiveNullableEnum();
|
2012-09-11 12:08:24 -07:00
|
|
|
TestEnum EnumAttribute();
|
|
|
|
TestEnum ReadonlyEnumAttribute();
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetEnumAttribute(TestEnum);
|
2012-05-29 20:45:18 -07:00
|
|
|
|
|
|
|
// Callback types
|
2012-11-09 07:43:58 -08:00
|
|
|
void PassCallback(TestCallback&);
|
|
|
|
void PassNullableCallback(TestCallback*);
|
|
|
|
void PassOptionalCallback(const Optional<OwningNonNull<TestCallback> >&);
|
|
|
|
void PassOptionalNullableCallback(const Optional<nsRefPtr<TestCallback> >&);
|
|
|
|
void PassOptionalNullableCallbackWithDefaultValue(TestCallback*);
|
|
|
|
already_AddRefed<TestCallback> ReceiveCallback();
|
|
|
|
already_AddRefed<TestCallback> ReceiveNullableCallback();
|
|
|
|
void PassNullableTreatAsNullCallback(TestTreatAsNullCallback*);
|
|
|
|
void PassOptionalNullableTreatAsNullCallback(const Optional<nsRefPtr<TestTreatAsNullCallback> >&);
|
|
|
|
void PassOptionalNullableTreatAsNullCallbackWithDefaultValue(TestTreatAsNullCallback*);
|
2013-01-02 19:03:25 -08:00
|
|
|
void SetTreatAsNullCallback(TestTreatAsNullCallback&);
|
|
|
|
already_AddRefed<TestTreatAsNullCallback> TreatAsNullCallback();
|
|
|
|
void SetNullableTreatAsNullCallback(TestTreatAsNullCallback*);
|
|
|
|
already_AddRefed<TestTreatAsNullCallback> GetNullableTreatAsNullCallback();
|
2012-05-29 20:45:18 -07:00
|
|
|
|
|
|
|
// Any types
|
2013-05-16 09:36:54 -07:00
|
|
|
void PassAny(JSContext*, JS::Handle<JS::Value>);
|
2013-05-16 09:36:55 -07:00
|
|
|
void PassVariadicAny(JSContext*, const Sequence<JS::Value>&);
|
2013-05-16 09:36:56 -07:00
|
|
|
void PassOptionalAny(JSContext*, const Optional<JS::Handle<JS::Value> >&);
|
2013-05-16 09:36:54 -07:00
|
|
|
void PassAnyDefaultNull(JSContext*, JS::Handle<JS::Value>);
|
2013-05-16 09:36:55 -07:00
|
|
|
void PassSequenceOfAny(JSContext*, const Sequence<JS::Value>&);
|
|
|
|
void PassNullableSequenceOfAny(JSContext*, const Nullable<Sequence<JS::Value> >&);
|
|
|
|
void PassOptionalSequenceOfAny(JSContext*, const Optional<Sequence<JS::Value> >&);
|
|
|
|
void PassOptionalNullableSequenceOfAny(JSContext*, const Optional<Nullable<Sequence<JS::Value> > >&);
|
|
|
|
void PassOptionalSequenceOfAnyWithDefaultValue(JSContext*, const Nullable<Sequence<JS::Value> >&);
|
|
|
|
void PassSequenceOfSequenceOfAny(JSContext*, const Sequence<Sequence<JS::Value> >&);
|
|
|
|
void PassSequenceOfNullableSequenceOfAny(JSContext*, const Sequence<Nullable<Sequence<JS::Value> > >&);
|
|
|
|
void PassNullableSequenceOfNullableSequenceOfAny(JSContext*, const Nullable<Sequence<Nullable<Sequence<JS::Value> > > >&);
|
|
|
|
void PassOptionalNullableSequenceOfNullableSequenceOfAny(JSContext*, const Optional<Nullable<Sequence<Nullable<Sequence<JS::Value> > > > >&);
|
2012-09-05 06:21:33 -07:00
|
|
|
JS::Value ReceiveAny(JSContext*);
|
2012-05-29 20:45:18 -07:00
|
|
|
|
2012-05-18 14:25:47 -07:00
|
|
|
// object types
|
2013-05-16 09:36:55 -07:00
|
|
|
void PassObject(JSContext*, JS::Handle<JSObject*>);
|
2013-05-16 09:36:55 -07:00
|
|
|
void PassVariadicObject(JSContext*, const Sequence<JSObject*>&);
|
2013-05-16 09:36:55 -07:00
|
|
|
void PassNullableObject(JSContext*, JS::Handle<JSObject*>);
|
2013-05-16 09:36:55 -07:00
|
|
|
void PassVariadicNullableObject(JSContext*, const Sequence<JSObject*>&);
|
2013-05-16 09:36:56 -07:00
|
|
|
void PassOptionalObject(JSContext*, const Optional<JS::Handle<JSObject*> >&);
|
|
|
|
void PassOptionalNullableObject(JSContext*, const Optional<JS::Handle<JSObject*> >&);
|
2013-05-16 09:36:55 -07:00
|
|
|
void PassOptionalNullableObjectWithDefaultValue(JSContext*, JS::Handle<JSObject*>);
|
2013-05-16 09:36:55 -07:00
|
|
|
void PassSequenceOfObject(JSContext*, const Sequence<JSObject*>&);
|
|
|
|
void PassSequenceOfNullableObject(JSContext*, const Sequence<JSObject*>&);
|
2013-08-28 21:30:05 -07:00
|
|
|
void PassNullableSequenceOfObject(JSContext*, const Nullable<Sequence<JSObject*> >&);
|
2013-05-16 09:36:55 -07:00
|
|
|
void PassOptionalNullableSequenceOfNullableSequenceOfObject(JSContext*, const Optional<Nullable<Sequence<Nullable<Sequence<JSObject*> > > > >&);
|
|
|
|
void PassOptionalNullableSequenceOfNullableSequenceOfNullableObject(JSContext*, const Optional<Nullable<Sequence<Nullable<Sequence<JSObject*> > > > >&);
|
2012-09-05 06:21:33 -07:00
|
|
|
JSObject* ReceiveObject(JSContext*);
|
|
|
|
JSObject* ReceiveNullableObject(JSContext*);
|
2012-05-29 20:45:18 -07:00
|
|
|
|
2012-05-18 14:25:47 -07:00
|
|
|
// Union types
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassUnion(JSContext*, const ObjectOrLong& arg);
|
2013-05-16 09:36:55 -07:00
|
|
|
void PassUnionWithNullable(JSContext* cx, const ObjectOrNullOrLong& arg)
|
2012-05-18 14:25:47 -07:00
|
|
|
{
|
|
|
|
ObjectOrLong returnValue;
|
|
|
|
if (arg.IsNull()) {
|
|
|
|
} else if (arg.IsObject()) {
|
2013-05-16 09:36:55 -07:00
|
|
|
JS::Rooted<JSObject*> obj(cx, arg.GetAsObject());
|
|
|
|
JS_GetClass(obj);
|
2012-05-18 14:25:47 -07:00
|
|
|
//returnValue.SetAsObject(&obj);
|
|
|
|
} else {
|
|
|
|
int32_t i = arg.GetAsLong();
|
|
|
|
i += 1;
|
|
|
|
}
|
|
|
|
}
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassNullableUnion(JSContext*, const Nullable<ObjectOrLong>&);
|
|
|
|
void PassOptionalUnion(JSContext*, const Optional<ObjectOrLong>&);
|
|
|
|
void PassOptionalNullableUnion(JSContext*, const Optional<Nullable<ObjectOrLong> >&);
|
|
|
|
void PassOptionalNullableUnionWithDefaultValue(JSContext*, const Nullable<ObjectOrLong>&);
|
|
|
|
//void PassUnionWithInterfaces(const TestInterfaceOrTestExternalInterface& arg);
|
|
|
|
//void PassUnionWithInterfacesAndNullable(const TestInterfaceOrNullOrTestExternalInterface& arg);
|
|
|
|
void PassUnionWithArrayBuffer(const ArrayBufferOrLong&);
|
|
|
|
void PassUnionWithString(JSContext*, const StringOrObject&);
|
|
|
|
//void PassUnionWithEnum(JSContext*, const TestEnumOrObject&);
|
2012-11-09 07:43:58 -08:00
|
|
|
//void PassUnionWithCallback(JSContext*, const TestCallbackOrLong&);
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassUnionWithObject(JSContext*, const ObjectOrLong&);
|
2012-05-18 14:25:47 -07:00
|
|
|
|
2013-07-26 11:25:54 -07:00
|
|
|
void ReceiveUnion(const CanvasPatternOrCanvasGradientReturnValue&);
|
|
|
|
void ReceiveUnionContainingNull(const CanvasPatternOrNullOrCanvasGradientReturnValue&);
|
|
|
|
void ReceiveNullableUnion(const Nullable<CanvasPatternOrCanvasGradientReturnValue>&);
|
|
|
|
void GetWritableUnion(const CanvasPatternOrCanvasGradientReturnValue&);
|
|
|
|
void SetWritableUnion(const CanvasPatternOrCanvasGradient&);
|
|
|
|
void GetWritableUnionContainingNull(const CanvasPatternOrNullOrCanvasGradientReturnValue&);
|
|
|
|
void SetWritableUnionContainingNull(const CanvasPatternOrNullOrCanvasGradient&);
|
|
|
|
void GetWritableNullableUnion(const Nullable<CanvasPatternOrCanvasGradientReturnValue>&);
|
|
|
|
void SetWritableNullableUnion(const Nullable<CanvasPatternOrCanvasGradient>&);
|
|
|
|
|
2013-05-02 11:38:20 -07:00
|
|
|
// Date types
|
|
|
|
void PassDate(Date);
|
|
|
|
void PassNullableDate(const Nullable<Date>&);
|
|
|
|
void PassOptionalDate(const Optional<Date>&);
|
|
|
|
void PassOptionalNullableDate(const Optional<Nullable<Date> >&);
|
|
|
|
void PassOptionalNullableDateWithDefaultValue(const Nullable<Date>&);
|
|
|
|
void PassDateSequence(const Sequence<Date>&);
|
|
|
|
void PassNullableDateSequence(const Sequence<Nullable<Date> >&);
|
|
|
|
Date ReceiveDate();
|
|
|
|
Nullable<Date> ReceiveNullableDate();
|
|
|
|
|
2012-05-18 14:25:47 -07:00
|
|
|
// binaryNames tests
|
2012-09-05 06:21:33 -07:00
|
|
|
void MethodRenamedTo();
|
|
|
|
void MethodRenamedTo(int8_t);
|
2012-09-11 12:08:24 -07:00
|
|
|
int8_t AttributeGetterRenamedTo();
|
|
|
|
int8_t AttributeRenamedTo();
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetAttributeRenamedTo(int8_t);
|
2012-05-18 14:25:47 -07:00
|
|
|
|
2012-06-12 07:22:05 -07:00
|
|
|
// Dictionary tests
|
2013-04-17 13:40:54 -07:00
|
|
|
void PassDictionary(JSContext*, const Dict&);
|
|
|
|
void ReceiveDictionary(JSContext*, Dict&);
|
2013-05-16 09:36:56 -07:00
|
|
|
void ReceiveNullableDictionary(JSContext*, Nullable<DictInitializer>&);
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOtherDictionary(const GrandparentDict&);
|
2013-04-17 13:40:54 -07:00
|
|
|
void PassSequenceOfDictionaries(JSContext*, const Sequence<Dict>&);
|
|
|
|
void PassDictionaryOrLong(JSContext*, const Dict&);
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassDictionaryOrLong(int32_t);
|
2013-04-17 13:40:54 -07:00
|
|
|
void PassDictContainingDict(JSContext*, const DictContainingDict&);
|
2013-05-16 09:36:55 -07:00
|
|
|
void PassDictContainingSequence(JSContext*, const DictContainingSequence&);
|
|
|
|
void ReceiveDictContainingSequence(JSContext*, DictContainingSequence&);
|
2012-06-12 07:22:05 -07:00
|
|
|
|
2012-09-06 07:23:51 -07:00
|
|
|
// Typedefs
|
|
|
|
void ExerciseTypedefInterfaces1(TestInterface&);
|
|
|
|
already_AddRefed<TestInterface> ExerciseTypedefInterfaces2(TestInterface*);
|
|
|
|
void ExerciseTypedefInterfaces3(TestInterface&);
|
|
|
|
|
2012-10-19 00:34:28 -07:00
|
|
|
// Static methods and attributes
|
2012-12-03 08:07:49 -08:00
|
|
|
static void StaticMethod(const GlobalObject&, bool);
|
|
|
|
static void StaticMethodWithContext(const GlobalObject&, JSContext*,
|
|
|
|
JS::Value);
|
|
|
|
static bool StaticAttribute(const GlobalObject&);
|
|
|
|
static void SetStaticAttribute(const GlobalObject&, bool);
|
2012-10-19 00:34:28 -07:00
|
|
|
|
2012-12-11 14:50:56 -08:00
|
|
|
// Overload resolution tests
|
|
|
|
bool Overload1(TestInterface&);
|
|
|
|
TestInterface* Overload1(const nsAString&, TestInterface&);
|
2013-01-03 11:03:11 -08:00
|
|
|
void Overload2(TestInterface&);
|
2013-04-17 13:40:54 -07:00
|
|
|
void Overload2(JSContext*, const Dict&);
|
2013-07-30 10:39:34 -07:00
|
|
|
void Overload2(bool);
|
2013-01-03 11:03:00 -08:00
|
|
|
void Overload2(const nsAString&);
|
2013-05-02 11:38:20 -07:00
|
|
|
void Overload2(Date);
|
2013-01-03 11:03:11 -08:00
|
|
|
void Overload3(TestInterface&);
|
|
|
|
void Overload3(const TestCallback&);
|
2013-07-30 10:39:34 -07:00
|
|
|
void Overload3(bool);
|
2013-01-03 11:03:11 -08:00
|
|
|
void Overload4(TestInterface&);
|
|
|
|
void Overload4(TestCallbackInterface&);
|
|
|
|
void Overload4(const nsAString&);
|
2013-07-30 10:39:34 -07:00
|
|
|
void Overload5(int32_t);
|
|
|
|
void Overload5(TestEnum);
|
|
|
|
void Overload6(int32_t);
|
|
|
|
void Overload6(bool);
|
|
|
|
void Overload7(int32_t);
|
|
|
|
void Overload7(bool);
|
|
|
|
void Overload7(const nsCString&);
|
|
|
|
void Overload8(int32_t);
|
|
|
|
void Overload8(TestInterface&);
|
2012-12-11 14:50:56 -08:00
|
|
|
|
|
|
|
// Variadic handling
|
|
|
|
void PassVariadicThirdArg(const nsAString&, int32_t,
|
|
|
|
const Sequence<OwningNonNull<TestInterface> >&);
|
|
|
|
|
2013-02-19 08:54:41 -08:00
|
|
|
// Conditionally exposed methods/attributes
|
|
|
|
bool Prefable1();
|
|
|
|
bool Prefable2();
|
|
|
|
bool Prefable3();
|
|
|
|
bool Prefable4();
|
|
|
|
bool Prefable5();
|
|
|
|
bool Prefable6();
|
|
|
|
bool Prefable7();
|
|
|
|
bool Prefable8();
|
|
|
|
bool Prefable9();
|
|
|
|
void Prefable10();
|
|
|
|
void Prefable11();
|
|
|
|
bool Prefable12();
|
|
|
|
void Prefable13();
|
|
|
|
bool Prefable14();
|
|
|
|
bool Prefable15();
|
|
|
|
bool Prefable16();
|
|
|
|
void Prefable17();
|
|
|
|
void Prefable18();
|
|
|
|
void Prefable19();
|
|
|
|
|
2012-09-12 09:24:58 -07:00
|
|
|
// Miscellania
|
|
|
|
int32_t AttrWithLenientThis();
|
|
|
|
void SetAttrWithLenientThis(int32_t);
|
2012-10-24 13:10:49 -07:00
|
|
|
uint32_t UnforgeableAttr();
|
|
|
|
uint32_t UnforgeableAttr2();
|
2012-11-05 11:40:32 -08:00
|
|
|
void Stringify(nsString&);
|
2012-10-24 13:10:49 -07:00
|
|
|
void PassRenamedInterface(nsRenamedInterface&);
|
2012-08-13 05:20:49 -07:00
|
|
|
TestInterface* PutForwardsAttr();
|
|
|
|
TestInterface* PutForwardsAttr2();
|
|
|
|
TestInterface* PutForwardsAttr3();
|
2013-07-30 07:04:04 -07:00
|
|
|
JS::Value JsonifierShouldSkipThis(JSContext*);
|
|
|
|
void SetJsonifierShouldSkipThis(JSContext*, JS::Rooted<JS::Value>&);
|
|
|
|
TestParentInterface* JsonifierShouldSkipThis2();
|
|
|
|
void SetJsonifierShouldSkipThis2(TestParentInterface&);
|
|
|
|
TestCallbackInterface* JsonifierShouldSkipThis3();
|
|
|
|
void SetJsonifierShouldSkipThis3(TestCallbackInterface&);
|
2012-11-09 08:24:32 -08:00
|
|
|
void ThrowingMethod(ErrorResult& aRv);
|
|
|
|
bool GetThrowingAttr(ErrorResult& aRv) const;
|
|
|
|
void SetThrowingAttr(bool arg, ErrorResult& aRv);
|
|
|
|
bool GetThrowingGetterAttr(ErrorResult& aRv) const;
|
|
|
|
void SetThrowingGetterAttr(bool arg);
|
|
|
|
bool ThrowingSetterAttr() const;
|
|
|
|
void SetThrowingSetterAttr(bool arg, ErrorResult& aRv);
|
2013-03-04 11:08:24 -08:00
|
|
|
int16_t LegacyCall(JS::Value, uint32_t, TestInterface&);
|
2013-06-26 07:59:46 -07:00
|
|
|
void PassArgsWithDefaults(JSContext*, const Optional<int32_t>&,
|
|
|
|
TestInterface*, const Dict&, double,
|
|
|
|
const Optional<float>&);
|
2012-09-12 09:24:58 -07:00
|
|
|
|
2012-06-11 15:21:35 -07:00
|
|
|
// Methods and properties imported via "implements"
|
2012-09-11 12:08:24 -07:00
|
|
|
bool ImplementedProperty();
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetImplementedProperty(bool);
|
2012-09-05 06:21:33 -07:00
|
|
|
void ImplementedMethod();
|
2012-09-11 12:08:24 -07:00
|
|
|
bool ImplementedParentProperty();
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetImplementedParentProperty(bool);
|
2012-09-05 06:21:33 -07:00
|
|
|
void ImplementedParentMethod();
|
2012-09-11 12:08:24 -07:00
|
|
|
bool IndirectlyImplementedProperty();
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetIndirectlyImplementedProperty(bool);
|
2012-09-05 06:21:33 -07:00
|
|
|
void IndirectlyImplementedMethod();
|
2012-09-11 12:08:24 -07:00
|
|
|
uint32_t DiamondImplementedProperty();
|
2012-09-06 00:25:03 -07:00
|
|
|
|
|
|
|
// Test EnforceRange/Clamp
|
|
|
|
void DontEnforceRangeOrClamp(int8_t);
|
|
|
|
void DoEnforceRange(int8_t);
|
|
|
|
void DoClamp(int8_t);
|
2012-06-11 15:21:35 -07:00
|
|
|
|
2012-05-23 09:44:48 -07:00
|
|
|
private:
|
2012-05-23 09:44:48 -07:00
|
|
|
// We add signatures here that _could_ start matching if the codegen
|
|
|
|
// got data types wrong. That way if it ever does we'll have a call
|
|
|
|
// to these private deleted methods and compilation will fail.
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetReadonlyByte(int8_t) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetWritableByte(T) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassByte(T) MOZ_DELETE;
|
2012-10-17 14:01:55 -07:00
|
|
|
void PassNullableByte(Nullable<int8_t>&) MOZ_DELETE;
|
2012-05-29 20:45:18 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalByte(const Optional<T>&) MOZ_DELETE;
|
2012-05-29 20:45:18 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalByteWithDefault(T) MOZ_DELETE;
|
2012-12-11 14:50:56 -08:00
|
|
|
void PassVariadicByte(Sequence<int8_t>&) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetReadonlyShort(int16_t) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetWritableShort(T) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassShort(T) MOZ_DELETE;
|
2012-05-29 20:45:18 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalShort(const Optional<T>&) MOZ_DELETE;
|
2012-05-29 20:45:18 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalShortWithDefault(T) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetReadonlyLong(int32_t) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetWritableLong(T) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassLong(T) MOZ_DELETE;
|
2012-05-29 20:45:18 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalLong(const Optional<T>&) MOZ_DELETE;
|
2012-05-29 20:45:18 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalLongWithDefault(T) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetReadonlyLongLong(int64_t) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetWritableLongLong(T) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassLongLong(T) MOZ_DELETE;
|
2012-05-29 20:45:18 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalLongLong(const Optional<T>&) MOZ_DELETE;
|
2012-05-29 20:45:18 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalLongLongWithDefault(T) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetReadonlyOctet(uint8_t) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetWritableOctet(T) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOctet(T) MOZ_DELETE;
|
2012-05-29 20:45:18 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalOctet(const Optional<T>&) MOZ_DELETE;
|
2012-05-29 20:45:18 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalOctetWithDefault(T) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetReadonlyUnsignedShort(uint16_t) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetWritableUnsignedShort(T) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassUnsignedShort(T) MOZ_DELETE;
|
2012-05-29 20:45:18 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalUnsignedShort(const Optional<T>&) MOZ_DELETE;
|
2012-05-29 20:45:18 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalUnsignedShortWithDefault(T) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetReadonlyUnsignedLong(uint32_t) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetWritableUnsignedLong(T) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassUnsignedLong(T) MOZ_DELETE;
|
2012-05-29 20:45:18 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalUnsignedLong(const Optional<T>&) MOZ_DELETE;
|
2012-05-29 20:45:18 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalUnsignedLongWithDefault(T) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetReadonlyUnsignedLongLong(uint64_t) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetWritableUnsignedLongLong(T) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassUnsignedLongLong(T) MOZ_DELETE;
|
2012-05-29 20:45:18 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalUnsignedLongLong(const Optional<T>&) MOZ_DELETE;
|
2012-05-29 20:45:18 -07:00
|
|
|
template<typename T>
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalUnsignedLongLongWithDefault(T) MOZ_DELETE;
|
2012-05-24 22:08:26 -07:00
|
|
|
|
2012-05-29 20:45:18 -07:00
|
|
|
// Enforce that only const things are passed for sequences
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassSequence(Sequence<int32_t> &) MOZ_DELETE;
|
|
|
|
void PassNullableSequence(Nullable< Sequence<int32_t> >&) MOZ_DELETE;
|
|
|
|
void PassOptionalNullableSequenceWithDefaultValue(Nullable< Sequence<int32_t> >&) MOZ_DELETE;
|
2013-05-16 09:36:55 -07:00
|
|
|
void PassSequenceOfAny(JSContext*, Sequence<JS::Value>&) MOZ_DELETE;
|
|
|
|
void PassNullableSequenceOfAny(JSContext*, Nullable<Sequence<JS::Value> >&) MOZ_DELETE;
|
|
|
|
void PassOptionalSequenceOfAny(JSContext*, Optional<Sequence<JS::Value> >&) MOZ_DELETE;
|
|
|
|
void PassOptionalNullableSequenceOfAny(JSContext*, Optional<Nullable<Sequence<JS::Value> > >&) MOZ_DELETE;
|
|
|
|
void PassOptionalSequenceOfAnyWithDefaultValue(JSContext*, Nullable<Sequence<JS::Value> >&) MOZ_DELETE;
|
|
|
|
void PassSequenceOfSequenceOfAny(JSContext*, Sequence<Sequence<JS::Value> >&) MOZ_DELETE;
|
|
|
|
void PassSequenceOfNullableSequenceOfAny(JSContext*, Sequence<Nullable<Sequence<JS::Value> > >&) MOZ_DELETE;
|
|
|
|
void PassNullableSequenceOfNullableSequenceOfAny(JSContext*, Nullable<Sequence<Nullable<Sequence<JS::Value> > > >&) MOZ_DELETE;
|
|
|
|
void PassOptionalNullableSequenceOfNullableSequenceOfAny(JSContext*, Optional<Nullable<Sequence<Nullable<Sequence<JS::Value> > > > >&) MOZ_DELETE;
|
|
|
|
void PassSequenceOfObject(JSContext*, Sequence<JSObject*>&) MOZ_DELETE;
|
|
|
|
void PassSequenceOfNullableObject(JSContext*, Sequence<JSObject*>&) MOZ_DELETE;
|
|
|
|
void PassOptionalNullableSequenceOfNullableSequenceOfObject(JSContext*, Optional<Nullable<Sequence<Nullable<Sequence<JSObject*> > > > >&) MOZ_DELETE;
|
|
|
|
void PassOptionalNullableSequenceOfNullableSequenceOfNullableObject(JSContext*, Optional<Nullable<Sequence<Nullable<Sequence<JSObject*> > > > >&) MOZ_DELETE;
|
2012-05-29 20:45:18 -07:00
|
|
|
|
|
|
|
// Enforce that only const things are passed for optional
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalByte(Optional<int8_t>&) MOZ_DELETE;
|
|
|
|
void PassOptionalNullableByte(Optional<Nullable<int8_t> >&) MOZ_DELETE;
|
|
|
|
void PassOptionalShort(Optional<int16_t>&) MOZ_DELETE;
|
|
|
|
void PassOptionalLong(Optional<int32_t>&) MOZ_DELETE;
|
|
|
|
void PassOptionalLongLong(Optional<int64_t>&) MOZ_DELETE;
|
|
|
|
void PassOptionalOctet(Optional<uint8_t>&) MOZ_DELETE;
|
|
|
|
void PassOptionalUnsignedShort(Optional<uint16_t>&) MOZ_DELETE;
|
|
|
|
void PassOptionalUnsignedLong(Optional<uint32_t>&) MOZ_DELETE;
|
|
|
|
void PassOptionalUnsignedLongLong(Optional<uint64_t>&) MOZ_DELETE;
|
|
|
|
void PassOptionalSelf(Optional<TestInterface*> &) MOZ_DELETE;
|
|
|
|
void PassOptionalNonNullSelf(Optional<NonNull<TestInterface> >&) MOZ_DELETE;
|
2013-01-08 10:05:36 -08:00
|
|
|
void PassOptionalOther(Optional<IndirectlyImplementedInterface*>&);
|
|
|
|
void PassOptionalNonNullOther(Optional<NonNull<IndirectlyImplementedInterface> >&);
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassOptionalExternal(Optional<TestExternalInterface*>&) MOZ_DELETE;
|
|
|
|
void PassOptionalNonNullExternal(Optional<TestExternalInterface*>&) MOZ_DELETE;
|
|
|
|
void PassOptionalSequence(Optional<Sequence<int32_t> >&) MOZ_DELETE;
|
|
|
|
void PassOptionalNullableSequence(Optional<Nullable<Sequence<int32_t> > >&) MOZ_DELETE;
|
|
|
|
void PassOptionalObjectSequence(Optional<Sequence<OwningNonNull<TestInterface> > >&) MOZ_DELETE;
|
|
|
|
void PassOptionalArrayBuffer(Optional<ArrayBuffer>&) MOZ_DELETE;
|
|
|
|
void PassOptionalNullableArrayBuffer(Optional<ArrayBuffer*>&) MOZ_DELETE;
|
|
|
|
void PassOptionalEnum(Optional<TestEnum>&) MOZ_DELETE;
|
2013-05-16 09:36:55 -07:00
|
|
|
void PassOptionalCallback(JSContext*, Optional<OwningNonNull<TestCallback> >&) MOZ_DELETE;
|
|
|
|
void PassOptionalNullableCallback(JSContext*, Optional<nsRefPtr<TestCallback> >&) MOZ_DELETE;
|
2013-05-16 09:36:56 -07:00
|
|
|
void PassOptionalAny(Optional<JS::Handle<JS::Value> >&) MOZ_DELETE;
|
2012-05-29 20:45:18 -07:00
|
|
|
|
|
|
|
// And test that string stuff is always const
|
2012-09-05 06:21:33 -07:00
|
|
|
void PassString(nsAString&) MOZ_DELETE;
|
|
|
|
void PassNullableString(nsAString&) MOZ_DELETE;
|
|
|
|
void PassOptionalString(Optional<nsAString>&) MOZ_DELETE;
|
|
|
|
void PassOptionalStringWithDefaultValue(nsAString&) MOZ_DELETE;
|
|
|
|
void PassOptionalNullableString(Optional<nsAString>&) MOZ_DELETE;
|
|
|
|
void PassOptionalNullableStringWithDefaultValue(nsAString&) MOZ_DELETE;
|
2012-12-11 14:50:56 -08:00
|
|
|
void PassVariadicString(Sequence<nsString>&) MOZ_DELETE;
|
2013-04-25 16:03:06 -07:00
|
|
|
|
2013-06-12 22:18:35 -07:00
|
|
|
// cstrings should be const as well
|
|
|
|
void PassByteString(nsCString&) MOZ_DELETE;
|
|
|
|
void PassNullableByteString(nsCString&) MOZ_DELETE;
|
|
|
|
void PassOptionalByteString(Optional<nsCString>&) MOZ_DELETE;
|
|
|
|
void PassOptionalNullableByteString(Optional<nsCString>&) MOZ_DELETE;
|
|
|
|
void PassVariadicByteString(Sequence<nsCString>&) MOZ_DELETE;
|
|
|
|
|
2013-04-25 16:03:06 -07:00
|
|
|
// Make sure dictionary arguments are always const
|
|
|
|
void PassDictionary(JSContext*, Dict&) MOZ_DELETE;
|
|
|
|
void PassOtherDictionary(GrandparentDict&) MOZ_DELETE;
|
|
|
|
void PassSequenceOfDictionaries(JSContext*, Sequence<Dict>&) MOZ_DELETE;
|
|
|
|
void PassDictionaryOrLong(JSContext*, Dict&) MOZ_DELETE;
|
|
|
|
void PassDictContainingDict(JSContext*, DictContainingDict&) MOZ_DELETE;
|
|
|
|
void PassDictContainingSequence(DictContainingSequence&) MOZ_DELETE;
|
2013-04-25 16:03:06 -07:00
|
|
|
|
|
|
|
// Make sure various nullable things are always const
|
|
|
|
void PassNullableEnum(Nullable<TestEnum>&) MOZ_DELETE;
|
2013-04-25 16:03:07 -07:00
|
|
|
|
|
|
|
// Make sure unions are always const
|
|
|
|
void PassUnion(JSContext*, ObjectOrLong& arg) MOZ_DELETE;
|
|
|
|
void PassUnionWithNullable(JSContext*, ObjectOrNullOrLong& arg) MOZ_DELETE;
|
|
|
|
void PassNullableUnion(JSContext*, Nullable<ObjectOrLong>&) MOZ_DELETE;
|
|
|
|
void PassOptionalUnion(JSContext*, Optional<ObjectOrLong>&) MOZ_DELETE;
|
|
|
|
void PassOptionalNullableUnion(JSContext*, Optional<Nullable<ObjectOrLong> >&) MOZ_DELETE;
|
|
|
|
void PassOptionalNullableUnionWithDefaultValue(JSContext*, Nullable<ObjectOrLong>&) MOZ_DELETE;
|
2013-05-02 11:38:20 -07:00
|
|
|
|
|
|
|
// Make sure various date stuff is const as needed
|
|
|
|
void PassNullableDate(Nullable<Date>&) MOZ_DELETE;
|
|
|
|
void PassOptionalDate(Optional<Date>&) MOZ_DELETE;
|
|
|
|
void PassOptionalNullableDate(Optional<Nullable<Date> >&) MOZ_DELETE;
|
|
|
|
void PassOptionalNullableDateWithDefaultValue(Nullable<Date>&) MOZ_DELETE;
|
|
|
|
void PassDateSequence(Sequence<Date>&) MOZ_DELETE;
|
|
|
|
void PassNullableDateSequence(Sequence<Nullable<Date> >&) MOZ_DELETE;
|
2013-05-16 09:36:55 -07:00
|
|
|
|
|
|
|
// Make sure variadics are const as needed
|
|
|
|
void PassVariadicAny(JSContext*, Sequence<JS::Value>&) MOZ_DELETE;
|
|
|
|
void PassVariadicObject(JSContext*, Sequence<JSObject*>&) MOZ_DELETE;
|
|
|
|
void PassVariadicNullableObject(JSContext*, Sequence<JSObject*>&) MOZ_DELETE;
|
2013-07-22 05:15:43 -07:00
|
|
|
|
|
|
|
// Ensure NonNull does not leak in
|
|
|
|
void PassSelf(NonNull<TestInterface>&) MOZ_DELETE;
|
|
|
|
void PassSelf(OwningNonNull<TestInterface>&) MOZ_DELETE;
|
|
|
|
void PassSelf(const NonNull<TestInterface>&) MOZ_DELETE;
|
|
|
|
void PassSelf(const OwningNonNull<TestInterface>&) MOZ_DELETE;
|
|
|
|
void PassOther(NonNull<IndirectlyImplementedInterface>&) MOZ_DELETE;
|
|
|
|
void PassOther(const NonNull<IndirectlyImplementedInterface>&) MOZ_DELETE;
|
|
|
|
void PassOther(OwningNonNull<IndirectlyImplementedInterface>&) MOZ_DELETE;
|
|
|
|
void PassOther(const OwningNonNull<IndirectlyImplementedInterface>&) MOZ_DELETE;
|
|
|
|
void PassCallbackInterface(OwningNonNull<TestCallbackInterface>&) MOZ_DELETE;
|
|
|
|
void PassCallbackInterface(const OwningNonNull<TestCallbackInterface>&) MOZ_DELETE;
|
|
|
|
void PassCallbackInterface(NonNull<TestCallbackInterface>&) MOZ_DELETE;
|
|
|
|
void PassCallbackInterface(const NonNull<TestCallbackInterface>&) MOZ_DELETE;
|
|
|
|
void PassCallback(OwningNonNull<TestCallback>&) MOZ_DELETE;
|
|
|
|
void PassCallback(const OwningNonNull<TestCallback>&) MOZ_DELETE;
|
|
|
|
void PassCallback(NonNull<TestCallback>&) MOZ_DELETE;
|
|
|
|
void PassCallback(const NonNull<TestCallback>&) MOZ_DELETE;
|
|
|
|
void PassString(const NonNull<nsAString>&) MOZ_DELETE;
|
|
|
|
void PassString(NonNull<nsAString>&) MOZ_DELETE;
|
|
|
|
void PassString(const OwningNonNull<nsAString>&) MOZ_DELETE;
|
|
|
|
void PassString(OwningNonNull<nsAString>&) MOZ_DELETE;
|
2012-05-23 09:44:48 -07:00
|
|
|
};
|
|
|
|
|
2012-05-22 06:46:20 -07:00
|
|
|
class TestIndexedGetterInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
2012-09-05 06:21:33 -07:00
|
|
|
uint32_t IndexedGetter(uint32_t, bool&);
|
|
|
|
uint32_t IndexedGetter(uint32_t&) MOZ_DELETE;
|
|
|
|
uint32_t Item(uint32_t&);
|
|
|
|
uint32_t Item(uint32_t, bool&) MOZ_DELETE;
|
2012-09-11 12:08:24 -07:00
|
|
|
uint32_t Length();
|
2012-05-22 06:46:20 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
class TestNamedGetterInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
2012-09-05 06:21:33 -07:00
|
|
|
void NamedGetter(const nsAString&, bool&, nsAString&);
|
2012-11-05 08:58:03 -08:00
|
|
|
void GetSupportedNames(nsTArray<nsString>&);
|
2012-05-22 06:46:20 -07:00
|
|
|
};
|
|
|
|
|
2012-11-06 08:00:57 -08:00
|
|
|
class TestIndexedGetterAndSetterAndNamedGetterInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
|
|
|
void NamedGetter(const nsAString&, bool&, nsAString&);
|
|
|
|
void GetSupportedNames(nsTArray<nsString>&);
|
|
|
|
int32_t IndexedGetter(uint32_t, bool&);
|
|
|
|
void IndexedSetter(uint32_t, int32_t);
|
|
|
|
uint32_t Length();
|
|
|
|
};
|
|
|
|
|
2012-05-22 06:46:20 -07:00
|
|
|
class TestIndexedAndNamedGetterInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
2012-09-05 06:21:33 -07:00
|
|
|
uint32_t IndexedGetter(uint32_t, bool&);
|
|
|
|
void NamedGetter(const nsAString&, bool&, nsAString&);
|
|
|
|
void NamedItem(const nsAString&, nsAString&);
|
2012-09-11 12:08:24 -07:00
|
|
|
uint32_t Length();
|
2012-11-05 08:58:03 -08:00
|
|
|
void GetSupportedNames(nsTArray<nsString>&);
|
2012-05-22 06:46:20 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
class TestIndexedSetterInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
2012-09-05 06:21:33 -07:00
|
|
|
void IndexedSetter(uint32_t, const nsAString&);
|
2012-11-05 08:58:03 -08:00
|
|
|
void IndexedGetter(uint32_t, bool&, nsString&);
|
|
|
|
uint32_t Length();
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetItem(uint32_t, const nsAString&);
|
2012-05-22 06:46:20 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
class TestNamedSetterInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
2012-09-05 06:21:33 -07:00
|
|
|
void NamedSetter(const nsAString&, TestIndexedSetterInterface&);
|
2012-11-05 08:58:03 -08:00
|
|
|
TestIndexedSetterInterface* NamedGetter(const nsAString&, bool&);
|
2012-11-05 08:58:03 -08:00
|
|
|
void GetSupportedNames(nsTArray<nsString>&);
|
2012-05-22 06:46:20 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
class TestIndexedAndNamedSetterInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
2012-09-05 06:21:33 -07:00
|
|
|
void IndexedSetter(uint32_t, TestIndexedSetterInterface&);
|
2012-11-05 08:58:03 -08:00
|
|
|
TestIndexedSetterInterface* IndexedGetter(uint32_t, bool&);
|
|
|
|
uint32_t Length();
|
2012-09-05 06:21:33 -07:00
|
|
|
void NamedSetter(const nsAString&, TestIndexedSetterInterface&);
|
2012-11-05 08:58:03 -08:00
|
|
|
TestIndexedSetterInterface* NamedGetter(const nsAString&, bool&);
|
2012-09-05 06:21:33 -07:00
|
|
|
void SetNamedItem(const nsAString&, TestIndexedSetterInterface&);
|
2012-11-05 08:58:03 -08:00
|
|
|
void GetSupportedNames(nsTArray<nsString>&);
|
2012-05-22 06:46:20 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
class TestIndexedAndNamedGetterAndSetterInterface : public TestIndexedSetterInterface
|
|
|
|
{
|
|
|
|
public:
|
2012-09-05 06:21:33 -07:00
|
|
|
uint32_t IndexedGetter(uint32_t, bool&);
|
|
|
|
uint32_t Item(uint32_t);
|
|
|
|
void NamedGetter(const nsAString&, bool&, nsAString&);
|
|
|
|
void NamedItem(const nsAString&, nsAString&);
|
|
|
|
void IndexedSetter(uint32_t, int32_t&);
|
|
|
|
void IndexedSetter(uint32_t, const nsAString&) MOZ_DELETE;
|
|
|
|
void NamedSetter(const nsAString&, const nsAString&);
|
2012-05-22 06:46:20 -07:00
|
|
|
void Stringify(nsAString&);
|
2012-09-11 12:08:24 -07:00
|
|
|
uint32_t Length();
|
2012-11-05 08:58:03 -08:00
|
|
|
void GetSupportedNames(nsTArray<nsString>&);
|
2012-05-22 06:46:20 -07:00
|
|
|
};
|
|
|
|
|
2012-10-31 05:36:20 -07:00
|
|
|
class TestCppKeywordNamedMethodsInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
|
|
|
bool Continue();
|
|
|
|
bool Delete();
|
|
|
|
int32_t Volatile();
|
|
|
|
};
|
|
|
|
|
2012-11-05 08:58:02 -08:00
|
|
|
class TestIndexedDeleterInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
|
|
|
void IndexedDeleter(uint32_t, bool&);
|
|
|
|
void IndexedDeleter(uint32_t) MOZ_DELETE;
|
2012-11-05 08:58:03 -08:00
|
|
|
long IndexedGetter(uint32_t, bool&);
|
|
|
|
uint32_t Length();
|
2012-11-05 08:58:02 -08:00
|
|
|
void DelItem(uint32_t);
|
|
|
|
void DelItem(uint32_t, bool&) MOZ_DELETE;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TestIndexedDeleterWithRetvalInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
|
|
|
bool IndexedDeleter(uint32_t, bool&);
|
|
|
|
bool IndexedDeleter(uint32_t) MOZ_DELETE;
|
2012-11-05 08:58:03 -08:00
|
|
|
long IndexedGetter(uint32_t, bool&);
|
|
|
|
uint32_t Length();
|
2012-11-05 08:58:02 -08:00
|
|
|
bool DelItem(uint32_t);
|
|
|
|
bool DelItem(uint32_t, bool&) MOZ_DELETE;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TestNamedDeleterInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
|
|
|
void NamedDeleter(const nsAString&, bool&);
|
2012-11-05 08:58:03 -08:00
|
|
|
long NamedGetter(const nsAString&, bool&);
|
2012-11-05 08:58:03 -08:00
|
|
|
void GetSupportedNames(nsTArray<nsString>&);
|
2012-11-05 08:58:02 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
class TestNamedDeleterWithRetvalInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
|
|
|
bool NamedDeleter(const nsAString&, bool&);
|
|
|
|
bool NamedDeleter(const nsAString&) MOZ_DELETE;
|
2012-11-05 08:58:03 -08:00
|
|
|
long NamedGetter(const nsAString&, bool&);
|
2012-11-05 08:58:02 -08:00
|
|
|
bool DelNamedItem(const nsAString&);
|
|
|
|
bool DelNamedItem(const nsAString&, bool&) MOZ_DELETE;
|
2012-11-05 08:58:03 -08:00
|
|
|
void GetSupportedNames(nsTArray<nsString>&);
|
2012-11-05 08:58:02 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
class TestIndexedAndNamedDeleterInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
|
|
|
void IndexedDeleter(uint32_t, bool&);
|
2012-11-05 08:58:03 -08:00
|
|
|
long IndexedGetter(uint32_t, bool&);
|
|
|
|
uint32_t Length();
|
2012-11-05 08:58:02 -08:00
|
|
|
|
|
|
|
void NamedDeleter(const nsAString&, bool&);
|
|
|
|
void NamedDeleter(const nsAString&) MOZ_DELETE;
|
2012-11-05 08:58:03 -08:00
|
|
|
long NamedGetter(const nsAString&, bool&);
|
2012-11-05 08:58:02 -08:00
|
|
|
void DelNamedItem(const nsAString&);
|
|
|
|
void DelNamedItem(const nsAString&, bool&) MOZ_DELETE;
|
2012-11-05 08:58:03 -08:00
|
|
|
void GetSupportedNames(nsTArray<nsString>&);
|
2012-11-05 08:58:02 -08:00
|
|
|
};
|
|
|
|
|
2013-03-04 11:08:24 -08:00
|
|
|
class TestParentInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
2012-12-14 11:10:50 -08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
2013-03-04 11:08:24 -08:00
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
};
|
|
|
|
|
|
|
|
class TestChildInterface : public TestParentInterface
|
|
|
|
{
|
2012-12-14 11:10:50 -08:00
|
|
|
};
|
|
|
|
|
2012-05-23 09:44:48 -07:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif /* TestBindingHeader_h */
|