Copy as Markdown

Other Tools

/* THIS FILE IS AUTOGENERATED FROM DecoderDoctorNotification.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_DECODERDOCTORNOTIFICATIONBINDING_H_
#define DOM_DECODERDOCTORNOTIFICATIONBINDING_H_
#include "js/CallAndConstruct.h"
#include "js/RootingAPI.h"
#include "js/TypeDecls.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/EnumTypeTraits.h"
#include "mozilla/Span.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 : uint8_t {
Cannot_play,
Platform_decoder_not_found,
Can_play_but_some_missing_decoders,
Cannot_initialize_pulseaudio,
Unsupported_libavcodec,
Decode_error,
Decode_warning,
};
namespace binding_detail {
template <> struct EnumStrings<DecoderDoctorNotificationType> {
static const nsLiteralCString Values[7];
};
} // namespace binding_detail
bool
ToJSValue(JSContext* aCx, DecoderDoctorNotificationType aArgument, JS::MutableHandle<JS::Value> aValue);
enum class DecoderDoctorReportType : uint8_t {
Mediawidevinenowmf,
Mediawmfneeded,
Mediaplatformdecodernotfound,
Mediacannotplaynodecoders,
Medianodecoders,
Mediacannotinitializepulseaudio,
Mediaunsupportedlibavcodec,
Mediadecodeerror,
Mediadecodewarning,
};
namespace binding_detail {
template <> struct EnumStrings<DecoderDoctorReportType> {
static const nsLiteralCString Values[9];
};
} // namespace binding_detail
bool
ToJSValue(JSContext* aCx, DecoderDoctorReportType aArgument, JS::MutableHandle<JS::Value> aValue);
struct DecoderDoctorNotification : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mDecodeIssue;
MOZ_INIT_OUTSIDE_CTOR nsString mDecoderDoctorReportId;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mDocURL;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mFormats;
MOZ_INIT_OUTSIDE_CTOR bool mIsSolved;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mResourceURL;
MOZ_INIT_OUTSIDE_CTOR DecoderDoctorNotificationType mType;
DecoderDoctorNotification();
explicit inline DecoderDoctorNotification(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
DecoderDoctorNotification(DecoderDoctorNotification&& aOther) = default;
explicit inline DecoderDoctorNotification(const DecoderDoctorNotification& aOther)
{
*this = aOther;
}
bool
Init(const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
bool
ToJSON(nsAString& aJSON) const;
void
TraceDictionary(JSTracer* trc);
DecoderDoctorNotification&
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
template <>
struct MaxContiguousEnumValue<dom::DecoderDoctorNotificationType>
{
static constexpr dom::DecoderDoctorNotificationType value = dom::DecoderDoctorNotificationType::Decode_warning;
static_assert(static_cast<uint8_t>(dom::DecoderDoctorNotificationType::Cannot_play) == 0,
"We rely on this in ContiguousEnumValues");
static_assert(mozilla::ArrayLength(dom::binding_detail::EnumStrings<dom::DecoderDoctorNotificationType>::Values) - 1 == UnderlyingValue(value),
"Mismatch between enum strings and enum count");
};
template <>
struct MaxContiguousEnumValue<dom::DecoderDoctorReportType>
{
static constexpr dom::DecoderDoctorReportType value = dom::DecoderDoctorReportType::Mediadecodewarning;
static_assert(static_cast<uint8_t>(dom::DecoderDoctorReportType::Mediawidevinenowmf) == 0,
"We rely on this in ContiguousEnumValues");
static_assert(mozilla::ArrayLength(dom::binding_detail::EnumStrings<dom::DecoderDoctorReportType>::Values) - 1 == UnderlyingValue(value),
"Mismatch between enum strings and enum count");
};
} // namespace mozilla
#endif // DOM_DECODERDOCTORNOTIFICATIONBINDING_H_