/* THIS FILE IS AUTOGENERATED FROM DecoderDoctorNotification.webidl BY Codegen.py - DO NOT EDIT */

#ifndef mozilla_dom_DecoderDoctorNotificationBinding_h
#define mozilla_dom_DecoderDoctorNotificationBinding_h

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

namespace mozilla {
namespace dom {

struct DecoderDoctorNotificationAtoms;
struct NativePropertyHooks;
class ProtoAndIfaceCache;

} // namespace dom
} // namespace mozilla

namespace mozilla {
namespace dom {

enum class DecoderDoctorNotificationType : uint32_t {
  Cannot_play,
  Platform_decoder_not_found,
  Can_play_but_some_missing_decoders,
  Unsupported_libavcodec,
  EndGuard_
};

namespace DecoderDoctorNotificationTypeValues {
extern const EnumEntry strings[5];
} // namespace DecoderDoctorNotificationTypeValues

bool
ToJSValue(JSContext* aCx, DecoderDoctorNotificationType aArgument, JS::MutableHandle<JS::Value> aValue);


struct DecoderDoctorNotification : public DictionaryBase
{
  nsString mDecoderDoctorReportId;
  Optional<nsString> mFormats;
  bool mIsSolved;
  DecoderDoctorNotificationType mType;

  DecoderDoctorNotification();

  explicit inline DecoderDoctorNotification(const FastDictionaryInitializer& )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

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

  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 DecoderDoctorNotification& aOther);

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

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


} // namespace dom
} // namespace mozilla

#endif // mozilla_dom_DecoderDoctorNotificationBinding_h
