Copy as Markdown

Other Tools

/* THIS FILE IS AUTOGENERATED FROM GetUserMediaRequest.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_GETUSERMEDIAREQUESTBINDING_H_
#define DOM_GETUSERMEDIAREQUESTBINDING_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"
#include "mozilla/dom/PrototypeList.h"
namespace mozilla {
namespace dom {
class GetUserMediaRequest;
struct NativePropertyHooks;
class ProtoAndIfaceCache;
} // namespace dom
} // namespace mozilla
namespace mozilla {
namespace dom {
enum class GetUserMediaRequestType : uint8_t {
Getusermedia,
Selectaudiooutput,
Recording_device_stopped,
};
namespace binding_detail {
template <> struct EnumStrings<GetUserMediaRequestType> {
static constexpr nsLiteralCString Values[3] {
"getusermedia"_ns,
"selectaudiooutput"_ns,
"recording-device-stopped"_ns,
};
};
} // namespace binding_detail
bool
ToJSValue(JSContext* aCx, GetUserMediaRequestType aArgument, JS::MutableHandle<JS::Value> aValue);
namespace GetUserMediaRequest_Binding {
typedef mozilla::dom::GetUserMediaRequest NativeType;
bool
Wrap(JSContext* aCx, mozilla::dom::GetUserMediaRequest* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
template <class T>
inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
{
JS::Rooted<JSObject*> reflector(aCx);
return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
}
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, DefineInterfaceProperty aDefineOnGlobal);
} // namespace GetUserMediaRequest_Binding
} // namespace dom
template <>
struct MaxContiguousEnumValue<dom::GetUserMediaRequestType>
{
static constexpr dom::GetUserMediaRequestType value = dom::GetUserMediaRequestType::Recording_device_stopped;
static_assert(static_cast<uint8_t>(dom::GetUserMediaRequestType::Getusermedia) == 0,
"We rely on this in ContiguousEnumValues");
static_assert(std::size(dom::binding_detail::EnumStrings<dom::GetUserMediaRequestType>::Values) - 1 == UnderlyingValue(value),
"Mismatch between enum strings and enum count");
};
} // namespace mozilla
#endif // DOM_GETUSERMEDIAREQUESTBINDING_H_