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

#ifndef mozilla_dom_CameraControlBinding_h
#define mozilla_dom_CameraControlBinding_h

#include "CameraManagerBinding.h"
#include "js/RootingAPI.h"
#include "jspubtd.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Nullable.h"

namespace mozilla {

class nsDOMCameraControl;
struct nsDOMCameraControlAtoms;

namespace dom {

struct CameraPictureOptionsAtoms;
struct CameraPosition;
struct CameraPositionAtoms;
struct CameraRegionAtoms;
struct CameraSize;
struct CameraStartRecordingOptionsAtoms;
class DOMCameraDetectedFace;
struct DOMCameraDetectedFaceAtoms;
struct NativePropertyHooks;
class ProtoAndIfaceCache;

} // namespace dom

} // namespace mozilla

namespace mozilla {
namespace dom {

struct CameraPosition : public DictionaryBase
{
  double mAltitude;
  double mLatitude;
  double mLongitude;
  double mTimestamp;

  CameraPosition();

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

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

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

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

  bool
  Init(const nsAString& aJSON);

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

  bool
  ToJSON(nsAString& aJSON) const;

  void
  TraceDictionary(JSTracer* trc);

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

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


struct CameraRegion : public DictionaryBase
{
  int32_t mBottom;
  int32_t mLeft;
  int32_t mRight;
  int32_t mTop;
  uint32_t mWeight;

  CameraRegion();

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

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

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

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

  bool
  Init(const nsAString& aJSON);

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

  bool
  ToJSON(nsAString& aJSON) const;

  void
  TraceDictionary(JSTracer* trc);

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

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


struct CameraStartRecordingOptions : public DictionaryBase
{
  bool mAutoEnableLowLightTorch;
  uint64_t mMaxFileSizeBytes;
  uint64_t mMaxVideoLengthMs;
  int32_t mRotation;

  CameraStartRecordingOptions();

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

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

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

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

  bool
  Init(const nsAString& aJSON);

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

  bool
  ToJSON(nsAString& aJSON) const;

  void
  TraceDictionary(JSTracer* trc);

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

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


struct CameraPictureOptions : public DictionaryBase
{
  int64_t mDateTime;
  nsString mFileFormat;
  CameraSize mPictureSize;
  CameraPosition mPosition;
  int32_t mRotation;

  CameraPictureOptions();

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

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

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

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

  bool
  Init(const nsAString& aJSON);

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

  bool
  ToJSON(nsAString& aJSON) const;

  void
  TraceDictionary(JSTracer* trc);

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

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


namespace CameraControlBinding {

  typedef mozilla::nsDOMCameraControl 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::nsDOMCameraControl* 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*>
  GetProtoObjectHandle(JSContext* aCx, JS::Handle<JSObject*> aGlobal);

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

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

} // namespace CameraControlBinding



namespace CameraDetectedFaceBinding {

  typedef mozilla::dom::DOMCameraDetectedFace 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::DOMCameraDetectedFace* 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*>
  GetProtoObjectHandle(JSContext* aCx, JS::Handle<JSObject*> aGlobal);

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

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

} // namespace CameraDetectedFaceBinding



} // namespace dom
} // namespace mozilla

#endif // mozilla_dom_CameraControlBinding_h
