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);
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);
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, DefineInterfaceProperty aDefineOnGlobal);
JS::Handle<JSObject*>
GetConstructorObjectHandle(JSContext* aCx);
inline bool CreateAndDefineOnGlobal(JSContext* aCx)
{
// Get the interface or namespace object for this class. This will
// create the object as needed and always define the properties for
// it on the global. The caller should make sure the interface or
// namespace is exposed on the global before calling this.
return GetPerInterfaceObjectHandle(aCx, constructors::id::WebTransportBidirectionalStream,
&CreateInterfaceObjects,
DefineInterfaceProperty::Always);
}
} // 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, DefineInterfaceProperty aDefineOnGlobal);
JS::Handle<JSObject*>
GetConstructorObjectHandle(JSContext* aCx);
inline bool CreateAndDefineOnGlobal(JSContext* aCx)
{
// Get the interface or namespace object for this class. This will
// create the object as needed and always define the properties for
// it on the global. The caller should make sure the interface or
// namespace is exposed on the global before calling this.
return GetPerInterfaceObjectHandle(aCx, constructors::id::WebTransportReceiveStream,
&CreateInterfaceObjects,
DefineInterfaceProperty::Always);
}
} // 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, DefineInterfaceProperty aDefineOnGlobal);
JS::Handle<JSObject*>
GetConstructorObjectHandle(JSContext* aCx);
inline bool CreateAndDefineOnGlobal(JSContext* aCx)
{
// Get the interface or namespace object for this class. This will
// create the object as needed and always define the properties for
// it on the global. The caller should make sure the interface or
// namespace is exposed on the global before calling this.
return GetPerInterfaceObjectHandle(aCx, constructors::id::WebTransportSendStream,
&CreateInterfaceObjects,
DefineInterfaceProperty::Always);
}
} // namespace WebTransportSendStream_Binding
} // namespace mozilla::dom
#endif // DOM_WEBTRANSPORTSENDRECEIVESTREAMBINDING_H_