/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */

#ifndef mozilla_dom_SubtleCryptoBinding_h
#define mozilla_dom_SubtleCryptoBinding_h

#include "SubtleCryptoBinding.h"
#include "js/RootingAPI.h"
#include "jspubtd.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Nullable.h"
#include "mozilla/dom/TypedArray.h"
#include "mozilla/dom/UnionTypes.h"

namespace mozilla {
namespace dom {

struct AesCbcParamsAtoms;
struct AesCtrParamsAtoms;
struct AesGcmParamsAtoms;
class AesKeyAlgorithm;
struct AesKeyAlgorithmAtoms;
struct AesKeyGenParamsAtoms;
struct AlgorithmAtoms;
class ArrayBufferViewOrArrayBuffer;
struct DhKeyGenParamsAtoms;
struct EcKeyGenParamsAtoms;
struct HmacImportParamsAtoms;
class HmacKeyAlgorithm;
struct HmacKeyAlgorithmAtoms;
struct HmacKeyGenParamsAtoms;
class Key;
class KeyAlgorithm;
struct KeyAlgorithmAtoms;
struct KeyAtoms;
class KeyPair;
struct KeyPairAtoms;
class NativePropertyHooks;
class ObjectOrString;
class OwningArrayBufferViewOrArrayBuffer;
class OwningObjectOrString;
class ProtoAndIfaceCache;
struct RsaHashedImportParamsAtoms;
class RsaHashedKeyAlgorithm;
struct RsaHashedKeyAlgorithmAtoms;
struct RsaHashedKeyGenParamsAtoms;
class RsaKeyAlgorithm;
struct RsaKeyAlgorithmAtoms;
struct RsaKeyGenParamsAtoms;
class SubtleCrypto;
struct SubtleCryptoAtoms;

} // namespace dom
} // namespace mozilla

namespace mozilla {
namespace dom {

struct Algorithm : public DictionaryBase
{
  Optional<nsString> mName;

  Algorithm();

  explicit inline Algorithm(const Algorithm& aOther)
  {
    *this = aOther;
  }

protected:
  explicit inline Algorithm(int )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

private:
  static bool
  InitIds(JSContext* cx, AlgorithmAtoms* atomsCache);

public:
  bool
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value");

  bool
  Init(const nsAString& aJSON);

  bool
  ToObject(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;

  void
  TraceDictionary(JSTracer* trc);

  void
  operator=(const Algorithm& aOther);
};

namespace binding_detail {
struct FastAlgorithm : public Algorithm
{
  inline FastAlgorithm()
    : Algorithm(42)
  {
    // Doesn't matter what int we pass to the parent constructor
  }
};
} // namespace binding_detail


struct RsaHashedImportParams : public DictionaryBase
{
  Optional<OwningObjectOrString> mHash;

  RsaHashedImportParams();

protected:
  explicit inline RsaHashedImportParams(int )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

private:
  RsaHashedImportParams(const RsaHashedImportParams&) MOZ_DELETE;
  void operator=(const RsaHashedImportParams) MOZ_DELETE;

  static bool
  InitIds(JSContext* cx, RsaHashedImportParamsAtoms* atomsCache);

public:
  bool
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value");

  bool
  Init(const nsAString& aJSON);

  bool
  ToObject(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;

  void
  TraceDictionary(JSTracer* trc);
};

namespace binding_detail {
struct FastRsaHashedImportParams : public RsaHashedImportParams
{
  inline FastRsaHashedImportParams()
    : RsaHashedImportParams(42)
  {
    // Doesn't matter what int we pass to the parent constructor
  }
};
} // namespace binding_detail


struct AesCbcParams : public Algorithm
{
  Optional<OwningArrayBufferViewOrArrayBuffer> mIv;

  AesCbcParams();

protected:
  explicit inline AesCbcParams(int )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

private:
  AesCbcParams(const AesCbcParams&) MOZ_DELETE;
  void operator=(const AesCbcParams) MOZ_DELETE;

  static bool
  InitIds(JSContext* cx, AesCbcParamsAtoms* atomsCache);

public:
  bool
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value");

  bool
  Init(const nsAString& aJSON);

  bool
  ToObject(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;

  void
  TraceDictionary(JSTracer* trc);
};

namespace binding_detail {
struct FastAesCbcParams : public AesCbcParams
{
  inline FastAesCbcParams()
    : AesCbcParams(42)
  {
    // Doesn't matter what int we pass to the parent constructor
  }
};
} // namespace binding_detail


struct AesCtrParams : public Algorithm
{
  Optional<OwningArrayBufferViewOrArrayBuffer> mCounter;
  Optional<uint8_t> mLength;

  AesCtrParams();

protected:
  explicit inline AesCtrParams(int )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

private:
  AesCtrParams(const AesCtrParams&) MOZ_DELETE;
  void operator=(const AesCtrParams) MOZ_DELETE;

  static bool
  InitIds(JSContext* cx, AesCtrParamsAtoms* atomsCache);

public:
  bool
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value");

  bool
  Init(const nsAString& aJSON);

  bool
  ToObject(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;

  void
  TraceDictionary(JSTracer* trc);
};

namespace binding_detail {
struct FastAesCtrParams : public AesCtrParams
{
  inline FastAesCtrParams()
    : AesCtrParams(42)
  {
    // Doesn't matter what int we pass to the parent constructor
  }
};
} // namespace binding_detail


struct AesGcmParams : public Algorithm
{
  Optional<OwningArrayBufferViewOrArrayBuffer> mAdditionalData;
  Optional<OwningArrayBufferViewOrArrayBuffer> mIv;
  Optional<uint8_t> mTagLength;

  AesGcmParams();

protected:
  explicit inline AesGcmParams(int )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

private:
  AesGcmParams(const AesGcmParams&) MOZ_DELETE;
  void operator=(const AesGcmParams) MOZ_DELETE;

  static bool
  InitIds(JSContext* cx, AesGcmParamsAtoms* atomsCache);

public:
  bool
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value");

  bool
  Init(const nsAString& aJSON);

  bool
  ToObject(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;

  void
  TraceDictionary(JSTracer* trc);
};

namespace binding_detail {
struct FastAesGcmParams : public AesGcmParams
{
  inline FastAesGcmParams()
    : AesGcmParams(42)
  {
    // Doesn't matter what int we pass to the parent constructor
  }
};
} // namespace binding_detail


struct AesKeyGenParams : public Algorithm
{
  Optional<uint16_t> mLength;

  AesKeyGenParams();

  explicit inline AesKeyGenParams(const AesKeyGenParams& aOther)
  {
    *this = aOther;
  }

protected:
  explicit inline AesKeyGenParams(int )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

private:
  static bool
  InitIds(JSContext* cx, AesKeyGenParamsAtoms* atomsCache);

public:
  bool
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value");

  bool
  Init(const nsAString& aJSON);

  bool
  ToObject(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;

  void
  TraceDictionary(JSTracer* trc);

  void
  operator=(const AesKeyGenParams& aOther);
};

namespace binding_detail {
struct FastAesKeyGenParams : public AesKeyGenParams
{
  inline FastAesKeyGenParams()
    : AesKeyGenParams(42)
  {
    // Doesn't matter what int we pass to the parent constructor
  }
};
} // namespace binding_detail


struct DhKeyGenParams : public Algorithm
{
  Optional<Uint8Array> mGenerator;
  Optional<Uint8Array> mPrime;

  DhKeyGenParams();

protected:
  explicit inline DhKeyGenParams(int )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

private:
  DhKeyGenParams(const DhKeyGenParams&) MOZ_DELETE;
  void operator=(const DhKeyGenParams) MOZ_DELETE;

  static bool
  InitIds(JSContext* cx, DhKeyGenParamsAtoms* atomsCache);

public:
  bool
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value");

  bool
  Init(const nsAString& aJSON);

  bool
  ToObject(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;

  void
  TraceDictionary(JSTracer* trc);
};

namespace binding_detail {
struct FastDhKeyGenParams : public DhKeyGenParams
{
  inline FastDhKeyGenParams()
    : DhKeyGenParams(42)
  {
    // Doesn't matter what int we pass to the parent constructor
  }
};
} // namespace binding_detail


struct EcKeyGenParams : public Algorithm
{
  Optional<nsString> mNamedCurve;

  EcKeyGenParams();

  explicit inline EcKeyGenParams(const EcKeyGenParams& aOther)
  {
    *this = aOther;
  }

protected:
  explicit inline EcKeyGenParams(int )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

private:
  static bool
  InitIds(JSContext* cx, EcKeyGenParamsAtoms* atomsCache);

public:
  bool
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value");

  bool
  Init(const nsAString& aJSON);

  bool
  ToObject(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;

  void
  TraceDictionary(JSTracer* trc);

  void
  operator=(const EcKeyGenParams& aOther);
};

namespace binding_detail {
struct FastEcKeyGenParams : public EcKeyGenParams
{
  inline FastEcKeyGenParams()
    : EcKeyGenParams(42)
  {
    // Doesn't matter what int we pass to the parent constructor
  }
};
} // namespace binding_detail


struct HmacImportParams : public Algorithm
{
  Optional<OwningObjectOrString> mHash;

  HmacImportParams();

protected:
  explicit inline HmacImportParams(int )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

private:
  HmacImportParams(const HmacImportParams&) MOZ_DELETE;
  void operator=(const HmacImportParams) MOZ_DELETE;

  static bool
  InitIds(JSContext* cx, HmacImportParamsAtoms* atomsCache);

public:
  bool
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value");

  bool
  Init(const nsAString& aJSON);

  bool
  ToObject(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;

  void
  TraceDictionary(JSTracer* trc);
};

namespace binding_detail {
struct FastHmacImportParams : public HmacImportParams
{
  inline FastHmacImportParams()
    : HmacImportParams(42)
  {
    // Doesn't matter what int we pass to the parent constructor
  }
};
} // namespace binding_detail


struct HmacKeyGenParams : public Algorithm
{
  Optional<OwningObjectOrString> mHash;
  Optional<uint32_t> mLength;

  HmacKeyGenParams();

protected:
  explicit inline HmacKeyGenParams(int )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

private:
  HmacKeyGenParams(const HmacKeyGenParams&) MOZ_DELETE;
  void operator=(const HmacKeyGenParams) MOZ_DELETE;

  static bool
  InitIds(JSContext* cx, HmacKeyGenParamsAtoms* atomsCache);

public:
  bool
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value");

  bool
  Init(const nsAString& aJSON);

  bool
  ToObject(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;

  void
  TraceDictionary(JSTracer* trc);
};

namespace binding_detail {
struct FastHmacKeyGenParams : public HmacKeyGenParams
{
  inline FastHmacKeyGenParams()
    : HmacKeyGenParams(42)
  {
    // Doesn't matter what int we pass to the parent constructor
  }
};
} // namespace binding_detail


struct RsaKeyGenParams : public Algorithm
{
  Optional<uint32_t> mModulusLength;
  Optional<Uint8Array> mPublicExponent;

  RsaKeyGenParams();

protected:
  explicit inline RsaKeyGenParams(int )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

private:
  RsaKeyGenParams(const RsaKeyGenParams&) MOZ_DELETE;
  void operator=(const RsaKeyGenParams) MOZ_DELETE;

  static bool
  InitIds(JSContext* cx, RsaKeyGenParamsAtoms* atomsCache);

public:
  bool
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value");

  bool
  Init(const nsAString& aJSON);

  bool
  ToObject(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;

  void
  TraceDictionary(JSTracer* trc);
};

namespace binding_detail {
struct FastRsaKeyGenParams : public RsaKeyGenParams
{
  inline FastRsaKeyGenParams()
    : RsaKeyGenParams(42)
  {
    // Doesn't matter what int we pass to the parent constructor
  }
};
} // namespace binding_detail


struct RsaHashedKeyGenParams : public RsaKeyGenParams
{
  Optional<OwningObjectOrString> mHash;

  RsaHashedKeyGenParams();

protected:
  explicit inline RsaHashedKeyGenParams(int )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

private:
  RsaHashedKeyGenParams(const RsaHashedKeyGenParams&) MOZ_DELETE;
  void operator=(const RsaHashedKeyGenParams) MOZ_DELETE;

  static bool
  InitIds(JSContext* cx, RsaHashedKeyGenParamsAtoms* atomsCache);

public:
  bool
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value");

  bool
  Init(const nsAString& aJSON);

  bool
  ToObject(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;

  void
  TraceDictionary(JSTracer* trc);
};

namespace binding_detail {
struct FastRsaHashedKeyGenParams : public RsaHashedKeyGenParams
{
  inline FastRsaHashedKeyGenParams()
    : RsaHashedKeyGenParams(42)
  {
    // Doesn't matter what int we pass to the parent constructor
  }
};
} // namespace binding_detail


namespace AesKeyAlgorithmBinding {

  typedef mozilla::dom::AesKeyAlgorithm NativeType;

  // We declare this as an array so that retrieving a pointer to this
  // binding's property hooks only requires compile/link-time resolvable
  // address arithmetic.  Declaring it as a pointer instead would require
  // doing a run-time load to fetch a pointer to this binding's property
  // hooks.  And then structures which embedded a pointer to this structure
  // would require a run-time load for proper initialization, which would
  // then induce static constructors.  Lots of static constructors.
  extern const NativePropertyHooks sNativePropertyHooks[];

  const JSClass*
  GetJSClass();

  JSObject*
  Wrap(JSContext* aCx, mozilla::dom::AesKeyAlgorithm* aObject, nsWrapperCache* aCache);

  template <class T>
  inline JSObject* Wrap(JSContext* aCx, T* aObject)
  {
    return Wrap(aCx, aObject, aObject);
  }

  void
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);

  JS::Handle<JSObject*>
  GetProtoObject(JSContext* aCx, JS::Handle<JSObject*> aGlobal);

} // namespace AesKeyAlgorithmBinding



namespace HmacKeyAlgorithmBinding {

  typedef mozilla::dom::HmacKeyAlgorithm NativeType;

  // We declare this as an array so that retrieving a pointer to this
  // binding's property hooks only requires compile/link-time resolvable
  // address arithmetic.  Declaring it as a pointer instead would require
  // doing a run-time load to fetch a pointer to this binding's property
  // hooks.  And then structures which embedded a pointer to this structure
  // would require a run-time load for proper initialization, which would
  // then induce static constructors.  Lots of static constructors.
  extern const NativePropertyHooks sNativePropertyHooks[];

  const JSClass*
  GetJSClass();

  JSObject*
  Wrap(JSContext* aCx, mozilla::dom::HmacKeyAlgorithm* aObject, nsWrapperCache* aCache);

  template <class T>
  inline JSObject* Wrap(JSContext* aCx, T* aObject)
  {
    return Wrap(aCx, aObject, aObject);
  }

  void
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);

  JS::Handle<JSObject*>
  GetProtoObject(JSContext* aCx, JS::Handle<JSObject*> aGlobal);

} // namespace HmacKeyAlgorithmBinding



namespace KeyBinding {

  typedef mozilla::dom::Key NativeType;

  // We declare this as an array so that retrieving a pointer to this
  // binding's property hooks only requires compile/link-time resolvable
  // address arithmetic.  Declaring it as a pointer instead would require
  // doing a run-time load to fetch a pointer to this binding's property
  // hooks.  And then structures which embedded a pointer to this structure
  // would require a run-time load for proper initialization, which would
  // then induce static constructors.  Lots of static constructors.
  extern const NativePropertyHooks sNativePropertyHooks[];

  JSObject*
  DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);

  bool
  ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);

  const JSClass*
  GetJSClass();

  JSObject*
  Wrap(JSContext* aCx, mozilla::dom::Key* aObject, nsWrapperCache* aCache);

  template <class T>
  inline JSObject* Wrap(JSContext* aCx, T* aObject)
  {
    return Wrap(aCx, aObject, aObject);
  }

  void
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);

  JS::Handle<JSObject*>
  GetProtoObject(JSContext* aCx, JS::Handle<JSObject*> aGlobal);

  JS::Handle<JSObject*>
  GetConstructorObject(JSContext* aCx, JS::Handle<JSObject*> aGlobal, bool aDefineOnGlobal = true);

} // namespace KeyBinding



namespace KeyAlgorithmBinding {

  typedef mozilla::dom::KeyAlgorithm NativeType;

  // We declare this as an array so that retrieving a pointer to this
  // binding's property hooks only requires compile/link-time resolvable
  // address arithmetic.  Declaring it as a pointer instead would require
  // doing a run-time load to fetch a pointer to this binding's property
  // hooks.  And then structures which embedded a pointer to this structure
  // would require a run-time load for proper initialization, which would
  // then induce static constructors.  Lots of static constructors.
  extern const NativePropertyHooks sNativePropertyHooks[];

  const JSClass*
  GetJSClass();

  JSObject*
  Wrap(JSContext* aCx, mozilla::dom::KeyAlgorithm* aObject, nsWrapperCache* aCache);

  template <class T>
  inline JSObject* Wrap(JSContext* aCx, T* aObject)
  {
    return Wrap(aCx, aObject, aObject);
  }

  void
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);

  JS::Handle<JSObject*>
  GetProtoObject(JSContext* aCx, JS::Handle<JSObject*> aGlobal);

} // namespace KeyAlgorithmBinding



namespace KeyPairBinding {

  typedef mozilla::dom::KeyPair NativeType;

  // We declare this as an array so that retrieving a pointer to this
  // binding's property hooks only requires compile/link-time resolvable
  // address arithmetic.  Declaring it as a pointer instead would require
  // doing a run-time load to fetch a pointer to this binding's property
  // hooks.  And then structures which embedded a pointer to this structure
  // would require a run-time load for proper initialization, which would
  // then induce static constructors.  Lots of static constructors.
  extern const NativePropertyHooks sNativePropertyHooks[];

  JSObject*
  DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);

  bool
  ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);

  const JSClass*
  GetJSClass();

  JSObject*
  Wrap(JSContext* aCx, mozilla::dom::KeyPair* aObject, nsWrapperCache* aCache);

  template <class T>
  inline JSObject* Wrap(JSContext* aCx, T* aObject)
  {
    return Wrap(aCx, aObject, aObject);
  }

  void
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);

  JS::Handle<JSObject*>
  GetProtoObject(JSContext* aCx, JS::Handle<JSObject*> aGlobal);

  JS::Handle<JSObject*>
  GetConstructorObject(JSContext* aCx, JS::Handle<JSObject*> aGlobal, bool aDefineOnGlobal = true);

} // namespace KeyPairBinding



namespace RsaHashedKeyAlgorithmBinding {

  typedef mozilla::dom::RsaHashedKeyAlgorithm NativeType;

  // We declare this as an array so that retrieving a pointer to this
  // binding's property hooks only requires compile/link-time resolvable
  // address arithmetic.  Declaring it as a pointer instead would require
  // doing a run-time load to fetch a pointer to this binding's property
  // hooks.  And then structures which embedded a pointer to this structure
  // would require a run-time load for proper initialization, which would
  // then induce static constructors.  Lots of static constructors.
  extern const NativePropertyHooks sNativePropertyHooks[];

  const JSClass*
  GetJSClass();

  JSObject*
  Wrap(JSContext* aCx, mozilla::dom::RsaHashedKeyAlgorithm* aObject, nsWrapperCache* aCache);

  template <class T>
  inline JSObject* Wrap(JSContext* aCx, T* aObject)
  {
    return Wrap(aCx, aObject, aObject);
  }

  void
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);

  JS::Handle<JSObject*>
  GetProtoObject(JSContext* aCx, JS::Handle<JSObject*> aGlobal);

} // namespace RsaHashedKeyAlgorithmBinding



namespace RsaKeyAlgorithmBinding {

  typedef mozilla::dom::RsaKeyAlgorithm NativeType;

  // We declare this as an array so that retrieving a pointer to this
  // binding's property hooks only requires compile/link-time resolvable
  // address arithmetic.  Declaring it as a pointer instead would require
  // doing a run-time load to fetch a pointer to this binding's property
  // hooks.  And then structures which embedded a pointer to this structure
  // would require a run-time load for proper initialization, which would
  // then induce static constructors.  Lots of static constructors.
  extern const NativePropertyHooks sNativePropertyHooks[];

  const JSClass*
  GetJSClass();

  JSObject*
  Wrap(JSContext* aCx, mozilla::dom::RsaKeyAlgorithm* aObject, nsWrapperCache* aCache);

  template <class T>
  inline JSObject* Wrap(JSContext* aCx, T* aObject)
  {
    return Wrap(aCx, aObject, aObject);
  }

  void
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);

  JS::Handle<JSObject*>
  GetProtoObject(JSContext* aCx, JS::Handle<JSObject*> aGlobal);

} // namespace RsaKeyAlgorithmBinding



namespace SubtleCryptoBinding {

  typedef mozilla::dom::SubtleCrypto NativeType;

  // We declare this as an array so that retrieving a pointer to this
  // binding's property hooks only requires compile/link-time resolvable
  // address arithmetic.  Declaring it as a pointer instead would require
  // doing a run-time load to fetch a pointer to this binding's property
  // hooks.  And then structures which embedded a pointer to this structure
  // would require a run-time load for proper initialization, which would
  // then induce static constructors.  Lots of static constructors.
  extern const NativePropertyHooks sNativePropertyHooks[];

  JSObject*
  DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);

  bool
  ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);

  const JSClass*
  GetJSClass();

  JSObject*
  Wrap(JSContext* aCx, mozilla::dom::SubtleCrypto* aObject, nsWrapperCache* aCache);

  template <class T>
  inline JSObject* Wrap(JSContext* aCx, T* aObject)
  {
    return Wrap(aCx, aObject, aObject);
  }

  void
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);

  JS::Handle<JSObject*>
  GetProtoObject(JSContext* aCx, JS::Handle<JSObject*> aGlobal);

  JS::Handle<JSObject*>
  GetConstructorObject(JSContext* aCx, JS::Handle<JSObject*> aGlobal, bool aDefineOnGlobal = true);

} // namespace SubtleCryptoBinding



} // namespace dom
} // namespace mozilla

#endif // mozilla_dom_SubtleCryptoBinding_h
