Copy as Markdown

Other Tools

/* THIS FILE IS AUTOGENERATED FROM RTCRtpCapabilities.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_RTCRTPCAPABILITIESBINDING_H_
#define DOM_RTCRTPCAPABILITIESBINDING_H_
#include "js/CallAndConstruct.h"
#include "js/RootingAPI.h"
#include "js/TypeDecls.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Nullable.h"
namespace mozilla {
namespace dom {
struct NativePropertyHooks;
class ProtoAndIfaceCache;
struct RTCRtpCapabilitiesAtoms;
struct RTCRtpCodecAtoms;
struct RTCRtpCodecCapability;
struct RTCRtpHeaderExtensionCapability;
struct RTCRtpHeaderExtensionCapabilityAtoms;
} // namespace dom
} // namespace mozilla
namespace mozilla::dom {
struct RTCRtpCodec : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<uint16_t> mChannels;
MOZ_INIT_OUTSIDE_CTOR uint32_t mClockRate;
MOZ_INIT_OUTSIDE_CTOR nsString mMimeType;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mSdpFmtpLine;
RTCRtpCodec();
explicit inline RTCRtpCodec(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
RTCRtpCodec(RTCRtpCodec&& aOther) = default;
explicit inline RTCRtpCodec(const RTCRtpCodec& aOther)
{
*this = aOther;
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
RTCRtpCodec&
operator=(const RTCRtpCodec& aOther);
bool
operator==(const RTCRtpCodec& aOther) const;
private:
static bool
InitIds(JSContext* cx, RTCRtpCodecAtoms* atomsCache);
};
namespace binding_detail {
struct FastRTCRtpCodec : public RTCRtpCodec
{
inline FastRTCRtpCodec()
: RTCRtpCodec(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct RTCRtpHeaderExtensionCapability : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR nsString mUri;
RTCRtpHeaderExtensionCapability();
explicit inline RTCRtpHeaderExtensionCapability(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
RTCRtpHeaderExtensionCapability(RTCRtpHeaderExtensionCapability&& aOther) = default;
explicit inline RTCRtpHeaderExtensionCapability(const RTCRtpHeaderExtensionCapability& aOther)
{
*this = aOther;
}
bool
Init(const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
RTCRtpHeaderExtensionCapability&
operator=(const RTCRtpHeaderExtensionCapability& aOther);
bool
operator==(const RTCRtpHeaderExtensionCapability& aOther) const;
private:
static bool
InitIds(JSContext* cx, RTCRtpHeaderExtensionCapabilityAtoms* atomsCache);
};
namespace binding_detail {
struct FastRTCRtpHeaderExtensionCapability : public RTCRtpHeaderExtensionCapability
{
inline FastRTCRtpHeaderExtensionCapability()
: RTCRtpHeaderExtensionCapability(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct RTCRtpCodecCapability : public RTCRtpCodec
{
RTCRtpCodecCapability();
explicit inline RTCRtpCodecCapability(const FastDictionaryInitializer& )
: RTCRtpCodec(FastDictionaryInitializer())
{
// Do nothing here; this is used by our "Fast" subclass
}
RTCRtpCodecCapability(RTCRtpCodecCapability&& aOther) = default;
explicit inline RTCRtpCodecCapability(const RTCRtpCodecCapability& aOther)
: RTCRtpCodec(FastDictionaryInitializer())
{
*this = aOther;
}
bool
Init(const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
RTCRtpCodecCapability&
operator=(const RTCRtpCodecCapability& aOther);
bool
operator==(const RTCRtpCodecCapability& aOther) const;
};
namespace binding_detail {
struct FastRTCRtpCodecCapability : public RTCRtpCodecCapability
{
inline FastRTCRtpCodecCapability()
: RTCRtpCodecCapability(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct RTCRtpCapabilities : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Sequence<RTCRtpCodecCapability> mCodecs;
MOZ_INIT_OUTSIDE_CTOR Sequence<RTCRtpHeaderExtensionCapability> mHeaderExtensions;
RTCRtpCapabilities();
explicit inline RTCRtpCapabilities(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
RTCRtpCapabilities(RTCRtpCapabilities&& aOther) = default;
explicit inline RTCRtpCapabilities(const RTCRtpCapabilities& aOther)
{
*this = aOther;
}
bool
Init(const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
RTCRtpCapabilities&
operator=(const RTCRtpCapabilities& aOther);
private:
static bool
InitIds(JSContext* cx, RTCRtpCapabilitiesAtoms* atomsCache);
};
namespace binding_detail {
struct FastRTCRtpCapabilities : public RTCRtpCapabilities
{
inline FastRTCRtpCapabilities()
: RTCRtpCapabilities(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
} // namespace mozilla::dom
#endif // DOM_RTCRTPCAPABILITIESBINDING_H_