/* 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,
  Cannot_initialize_pulseaudio,
  Unsupported_libavcodec,
  EndGuard_
};

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

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


struct DecoderDoctorNotification : public DictionaryBase
{
  MOZ_INIT_OUTSIDE_CTOR nsString mDecoderDoctorReportId;
  MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mFormats;
  MOZ_INIT_OUTSIDE_CTOR bool mIsSolved;
  MOZ_INIT_OUTSIDE_CTOR 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
