Copy as Markdown

Other Tools

/* THIS FILE IS AUTOGENERATED FROM WebTransportSendReceiveStream.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_WEBTRANSPORTSENDRECEIVESTREAMBINDING_H_
#define DOM_WEBTRANSPORTSENDRECEIVESTREAMBINDING_H_
#include "js/CallAndConstruct.h"
#include "js/RootingAPI.h"
#include "js/TypeDecls.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Nullable.h"
#include "mozilla/dom/PrototypeList.h"
namespace mozilla {
namespace dom {
struct NativePropertyHooks;
class ProtoAndIfaceCache;
class WebTransportBidirectionalStream;
class WebTransportReceiveStream;
struct WebTransportReceiveStreamStatsAtoms;
class WebTransportSendStream;
struct WebTransportSendStreamStatsAtoms;
} // namespace dom
} // namespace mozilla
namespace mozilla::dom {
struct WebTransportReceiveStreamStats : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<uint64_t> mBytesRead;
MOZ_INIT_OUTSIDE_CTOR Optional<uint64_t> mBytesReceived;
MOZ_INIT_OUTSIDE_CTOR Optional<double> mTimestamp;
WebTransportReceiveStreamStats();
explicit inline WebTransportReceiveStreamStats(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
WebTransportReceiveStreamStats(WebTransportReceiveStreamStats&& aOther) = default;
explicit inline WebTransportReceiveStreamStats(const WebTransportReceiveStreamStats& 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);
WebTransportReceiveStreamStats&
operator=(const WebTransportReceiveStreamStats& aOther);
bool
operator==(const WebTransportReceiveStreamStats& aOther) const;
private:
static bool
InitIds(JSContext* cx, WebTransportReceiveStreamStatsAtoms* atomsCache);
};
namespace binding_detail {
struct FastWebTransportReceiveStreamStats : public WebTransportReceiveStreamStats
{
inline FastWebTransportReceiveStreamStats()
: WebTransportReceiveStreamStats(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct WebTransportSendStreamStats : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<uint64_t> mBytesAcknowledged;
MOZ_INIT_OUTSIDE_CTOR Optional<uint64_t> mBytesSent;
MOZ_INIT_OUTSIDE_CTOR Optional<uint64_t> mBytesWritten;
MOZ_INIT_OUTSIDE_CTOR Optional<double> mTimestamp;
WebTransportSendStreamStats();
explicit inline WebTransportSendStreamStats(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
WebTransportSendStreamStats(WebTransportSendStreamStats&& aOther) = default;
explicit inline WebTransportSendStreamStats(const WebTransportSendStreamStats& 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);
WebTransportSendStreamStats&
operator=(const WebTransportSendStreamStats& aOther);
bool
operator==(const WebTransportSendStreamStats& aOther) const;
private:
static bool
InitIds(JSContext* cx, WebTransportSendStreamStatsAtoms* atomsCache);
};
namespace binding_detail {
struct FastWebTransportSendStreamStats : public WebTransportSendStreamStats
{
inline FastWebTransportSendStreamStats()
: WebTransportSendStreamStats(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
namespace WebTransportBidirectionalStream_Binding {
typedef mozilla::dom::WebTransportBidirectionalStream NativeType;
bool
ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
bool
Wrap(JSContext* aCx, mozilla::dom::WebTransportBidirectionalStream* 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, bool aDefineOnGlobal);
inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
{
/* Get the interface prototype object for this class. This will create the
object as needed. */
return GetPerInterfaceObjectHandle(aCx, prototypes::id::WebTransportBidirectionalStream,
&CreateInterfaceObjects,
/* aDefineOnGlobal = */ true);
}
inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
{
/* Get the interface object for this class. This will create the object as
needed. */
return GetPerInterfaceObjectHandle(aCx, constructors::id::WebTransportBidirectionalStream,
&CreateInterfaceObjects,
aDefineOnGlobal);
}
JSObject*
GetConstructorObject(JSContext* aCx);
} // namespace WebTransportBidirectionalStream_Binding
namespace WebTransportReceiveStream_Binding {
typedef mozilla::dom::WebTransportReceiveStream NativeType;
bool
ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
bool
Wrap(JSContext* aCx, mozilla::dom::WebTransportReceiveStream* 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, bool aDefineOnGlobal);
inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
{
/* Get the interface prototype object for this class. This will create the
object as needed. */
return GetPerInterfaceObjectHandle(aCx, prototypes::id::WebTransportReceiveStream,
&CreateInterfaceObjects,
/* aDefineOnGlobal = */ true);
}
inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
{
/* Get the interface object for this class. This will create the object as
needed. */
return GetPerInterfaceObjectHandle(aCx, constructors::id::WebTransportReceiveStream,
&CreateInterfaceObjects,
aDefineOnGlobal);
}
JSObject*
GetConstructorObject(JSContext* aCx);
} // namespace WebTransportReceiveStream_Binding
namespace WebTransportSendStream_Binding {
typedef mozilla::dom::WebTransportSendStream NativeType;
bool
ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
bool
Wrap(JSContext* aCx, mozilla::dom::WebTransportSendStream* 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, bool aDefineOnGlobal);
inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
{
/* Get the interface prototype object for this class. This will create the
object as needed. */
return GetPerInterfaceObjectHandle(aCx, prototypes::id::WebTransportSendStream,
&CreateInterfaceObjects,
/* aDefineOnGlobal = */ true);
}
inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
{
/* Get the interface object for this class. This will create the object as
needed. */
return GetPerInterfaceObjectHandle(aCx, constructors::id::WebTransportSendStream,
&CreateInterfaceObjects,
aDefineOnGlobal);
}
JSObject*
GetConstructorObject(JSContext* aCx);
} // namespace WebTransportSendStream_Binding
} // namespace mozilla::dom
#endif // DOM_WEBTRANSPORTSENDRECEIVESTREAMBINDING_H_