Copy as Markdown

Other Tools

/* THIS FILE IS AUTOGENERATED FROM RTCConfiguration.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_RTCCONFIGURATIONBINDING_H_
#define DOM_RTCCONFIGURATIONBINDING_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/RTCCertificate.h"
#include "mozilla/dom/UnionTypes.h"
namespace mozilla {
namespace dom {
struct NativePropertyHooks;
class OwningStringOrStringSequence;
class ProtoAndIfaceCache;
class RTCCertificate;
struct RTCConfigurationAtoms;
struct RTCIceServer;
struct RTCIceServerAtoms;
class StringOrStringSequence;
} // namespace dom
} // namespace mozilla
namespace mozilla {
namespace dom {
enum class RTCIceCredentialType : uint8_t {
Password,
};
namespace binding_detail {
template <> struct EnumStrings<RTCIceCredentialType> {
static const nsLiteralCString Values[1];
};
} // namespace binding_detail
bool
ToJSValue(JSContext* aCx, RTCIceCredentialType aArgument, JS::MutableHandle<JS::Value> aValue);
enum class RTCIceTransportPolicy : uint8_t {
Relay,
All,
};
namespace binding_detail {
template <> struct EnumStrings<RTCIceTransportPolicy> {
static const nsLiteralCString Values[2];
};
} // namespace binding_detail
bool
ToJSValue(JSContext* aCx, RTCIceTransportPolicy aArgument, JS::MutableHandle<JS::Value> aValue);
enum class RTCBundlePolicy : uint8_t {
Balanced,
Max_compat,
Max_bundle,
};
namespace binding_detail {
template <> struct EnumStrings<RTCBundlePolicy> {
static const nsLiteralCString Values[3];
};
} // namespace binding_detail
bool
ToJSValue(JSContext* aCx, RTCBundlePolicy aArgument, JS::MutableHandle<JS::Value> aValue);
struct RTCIceServer : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mCredential;
MOZ_INIT_OUTSIDE_CTOR RTCIceCredentialType mCredentialType;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mUrl;
MOZ_INIT_OUTSIDE_CTOR Optional<OwningStringOrStringSequence> mUrls;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mUsername;
RTCIceServer();
explicit inline RTCIceServer(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
RTCIceServer(RTCIceServer&& aOther) = default;
explicit inline RTCIceServer(const RTCIceServer& 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);
RTCIceServer&
operator=(const RTCIceServer& aOther);
private:
static bool
InitIds(JSContext* cx, RTCIceServerAtoms* atomsCache);
};
namespace binding_detail {
struct FastRTCIceServer : public RTCIceServer
{
inline FastRTCIceServer()
: RTCIceServer(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct RTCConfiguration : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR RTCBundlePolicy mBundlePolicy;
MOZ_INIT_OUTSIDE_CTOR Sequence<OwningNonNull<mozilla::dom::RTCCertificate>> mCertificates;
MOZ_INIT_OUTSIDE_CTOR Sequence<RTCIceServer> mIceServers;
MOZ_INIT_OUTSIDE_CTOR RTCIceTransportPolicy mIceTransportPolicy;
MOZ_INIT_OUTSIDE_CTOR nsString mPeerIdentity;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mSdpSemantics;
RTCConfiguration();
explicit inline RTCConfiguration(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
RTCConfiguration(RTCConfiguration&& aOther) = default;
explicit inline RTCConfiguration(const RTCConfiguration& 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);
inline void
TraverseForCC(nsCycleCollectionTraversalCallback& aCallback, uint32_t aFlags)
{
ImplCycleCollectionTraverse(aCallback, mCertificates, "mCertificates", aFlags);
}
inline void
UnlinkForCC()
{
ImplCycleCollectionUnlink(mCertificates);
}
RTCConfiguration&
operator=(const RTCConfiguration& aOther);
private:
static bool
InitIds(JSContext* cx, RTCConfigurationAtoms* atomsCache);
};
namespace binding_detail {
struct FastRTCConfiguration : public RTCConfiguration
{
inline FastRTCConfiguration()
: RTCConfiguration(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
} // namespace dom
template <>
struct MaxContiguousEnumValue<dom::RTCIceCredentialType>
{
static constexpr dom::RTCIceCredentialType value = dom::RTCIceCredentialType::Password;
static_assert(static_cast<uint8_t>(dom::RTCIceCredentialType::Password) == 0,
"We rely on this in ContiguousEnumValues");
static_assert(mozilla::ArrayLength(dom::binding_detail::EnumStrings<dom::RTCIceCredentialType>::Values) - 1 == UnderlyingValue(value),
"Mismatch between enum strings and enum count");
};
template <>
struct MaxContiguousEnumValue<dom::RTCIceTransportPolicy>
{
static constexpr dom::RTCIceTransportPolicy value = dom::RTCIceTransportPolicy::All;
static_assert(static_cast<uint8_t>(dom::RTCIceTransportPolicy::Relay) == 0,
"We rely on this in ContiguousEnumValues");
static_assert(mozilla::ArrayLength(dom::binding_detail::EnumStrings<dom::RTCIceTransportPolicy>::Values) - 1 == UnderlyingValue(value),
"Mismatch between enum strings and enum count");
};
template <>
struct MaxContiguousEnumValue<dom::RTCBundlePolicy>
{
static constexpr dom::RTCBundlePolicy value = dom::RTCBundlePolicy::Max_bundle;
static_assert(static_cast<uint8_t>(dom::RTCBundlePolicy::Balanced) == 0,
"We rely on this in ContiguousEnumValues");
static_assert(mozilla::ArrayLength(dom::binding_detail::EnumStrings<dom::RTCBundlePolicy>::Values) - 1 == UnderlyingValue(value),
"Mismatch between enum strings and enum count");
};
} // namespace mozilla
#endif // DOM_RTCCONFIGURATIONBINDING_H_