/* * DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/netwerk/protocol/webtransport/nsIWebTransport.idl */ #ifndef __gen_nsIWebTransport_h__ #define __gen_nsIWebTransport_h__ #include "nsISupports.h" #include "nsIURI.h" #include "nsIPrincipal.h" #include "nsTArray.h" #include "js/GCAnnotations.h" /* For IDL files that don't want to include root IDL files. */ #ifndef NS_NO_VTABLE #define NS_NO_VTABLE #endif class WebTransportSessionEventListener; /* forward declaration */ class nsIWebTransportStreamCallback; /* forward declaration */ class nsIWebTransportBidirectionalStream; /* forward declaration */ class nsIWebTransportSendStream; /* forward declaration */ class nsIWebTransportReceiveStream; /* forward declaration */ class nsIWebTransportHash; /* forward declaration */ // %{C++:17-24 namespace mozilla::dom { class ClientInfo; class WebTransportStatsData; } namespace mozilla::net { class WebTransportSessionBase; class WebTransportStreamBase; } // %} /* starting interface: nsIWebTransport */ #define NS_IWEBTRANSPORT_IID_STR "c20d6e77-8cb1-4838-a88d-fff826080aa3" #define NS_IWEBTRANSPORT_IID \ {0xc20d6e77, 0x8cb1, 0x4838, \ { 0xa8, 0x8d, 0xff, 0xf8, 0x26, 0x08, 0x0a, 0xa3 }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIWebTransport) nsIWebTransport : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_IWEBTRANSPORT_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIWebTransport; enum MOZ_BINDING(binding_to, idl, class, XPIDL_nsIWebTransport_WebTransportError) WebTransportError : uint16_t { UNKNOWN_ERROR MOZ_BINDING(binding_to, idl, const, XPIDL_nsIWebTransport_WebTransportError_UNKNOWN_ERROR) = 0, INVALID_STATE_ERROR MOZ_BINDING(binding_to, idl, const, XPIDL_nsIWebTransport_WebTransportError_INVALID_STATE_ERROR) = 1, }; enum MOZ_BINDING(binding_to, idl, class, XPIDL_nsIWebTransport_HTTPVersion) HTTPVersion : uint8_t { h3 MOZ_BINDING(binding_to, idl, const, XPIDL_nsIWebTransport_HTTPVersion_h3) = 0, h2 MOZ_BINDING(binding_to, idl, const, XPIDL_nsIWebTransport_HTTPVersion_h2) = 1, }; /* void asyncConnect (in nsIURI aURI, in boolean aDedicated, in Array aServerCertHashes, in nsIPrincipal aLoadingPrincipal, in unsigned long aSecurityFlags, in WebTransportSessionEventListener aListener, [optional] in nsIWebTransport_HTTPVersion aVersion); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_asyncConnect) NS_IMETHOD AsyncConnect(nsIURI *aURI, bool aDedicated, const nsTArray>& aServerCertHashes, nsIPrincipal *aLoadingPrincipal, uint32_t aSecurityFlags, WebTransportSessionEventListener *aListener, nsIWebTransport::HTTPVersion aVersion) = 0; /* [noscript] void asyncConnectWithClient (in nsIURI aURI, in boolean aDedicated, in Array aServerCertHashes, in nsIPrincipal aLoadingPrincipal, in uint64_t aBrowsingContextID, in unsigned long aSecurityFlags, in WebTransportSessionEventListener aListener, in const_MaybeClientInfoRef aClientInfo, in Array aProtocols, in nsIWebTransport_HTTPVersion aVersion); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_asyncConnectWithClient) NS_IMETHOD AsyncConnectWithClient(nsIURI *aURI, bool aDedicated, const nsTArray>& aServerCertHashes, nsIPrincipal *aLoadingPrincipal, uint64_t aBrowsingContextID, uint32_t aSecurityFlags, WebTransportSessionEventListener *aListener, const mozilla::Maybe & aClientInfo, const nsTArray& aProtocols, nsIWebTransport::HTTPVersion aVersion) = 0; /* void getStats (); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_getStats) NS_IMETHOD GetStats(void) = 0; /* void exportKeyingMaterial (in Array aLabel, in Array aContext, out Array aKeyingMaterial); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_exportKeyingMaterial) NS_IMETHOD ExportKeyingMaterial(const nsTArray& aLabel, const nsTArray& aContext, nsTArray& aKeyingMaterial) = 0; /* void closeSession (in uint32_t aErrorCode, in ACString aReason); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_closeSession) NS_IMETHOD CloseSession(uint32_t aErrorCode, const nsACString& aReason) = 0; /* void createOutgoingBidirectionalStream (in nsIWebTransportStreamCallback aListener); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_createOutgoingBidirectionalStream) NS_IMETHOD CreateOutgoingBidirectionalStream(nsIWebTransportStreamCallback *aListener) = 0; /* void createOutgoingUnidirectionalStream (in nsIWebTransportStreamCallback aListener); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_createOutgoingUnidirectionalStream) NS_IMETHOD CreateOutgoingUnidirectionalStream(nsIWebTransportStreamCallback *aListener) = 0; /* void sendDatagram (in Array aData, in uint64_t aTrackingId, in uint64_t aSendGroupId, in int64_t aSendOrder); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_sendDatagram) NS_IMETHOD SendDatagram(const nsTArray& aData, uint64_t aTrackingId, uint64_t aSendGroupId, int64_t aSendOrder) = 0; /* void getMaxDatagramSize (); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_getMaxDatagramSize) NS_IMETHOD GetMaxDatagramSize(void) = 0; /* uint64_t getHttpChannelID (); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_getHttpChannelID) NS_IMETHOD GetHttpChannelID(uint64_t *_retval) = 0; /* ACString getNegotiatedProtocol (); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_getNegotiatedProtocol) NS_IMETHOD GetNegotiatedProtocol(nsACString& _retval) = 0; /* void registerSendGroup (in uint64_t groupId); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_registerSendGroup) NS_IMETHOD RegisterSendGroup(uint64_t groupId) = 0; /* [noscript] void retargetTo (in nsIEventTarget aTarget); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_retargetTo) NS_IMETHOD RetargetTo(nsIEventTarget *aTarget) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIWEBTRANSPORT \ NS_IMETHOD AsyncConnect(nsIURI *aURI, bool aDedicated, const nsTArray>& aServerCertHashes, nsIPrincipal *aLoadingPrincipal, uint32_t aSecurityFlags, WebTransportSessionEventListener *aListener, nsIWebTransport::HTTPVersion aVersion) override; \ NS_IMETHOD AsyncConnectWithClient(nsIURI *aURI, bool aDedicated, const nsTArray>& aServerCertHashes, nsIPrincipal *aLoadingPrincipal, uint64_t aBrowsingContextID, uint32_t aSecurityFlags, WebTransportSessionEventListener *aListener, const mozilla::Maybe & aClientInfo, const nsTArray& aProtocols, nsIWebTransport::HTTPVersion aVersion) override; \ NS_IMETHOD GetStats(void) override; \ NS_IMETHOD ExportKeyingMaterial(const nsTArray& aLabel, const nsTArray& aContext, nsTArray& aKeyingMaterial) override; \ NS_IMETHOD CloseSession(uint32_t aErrorCode, const nsACString& aReason) override; \ NS_IMETHOD CreateOutgoingBidirectionalStream(nsIWebTransportStreamCallback *aListener) override; \ NS_IMETHOD CreateOutgoingUnidirectionalStream(nsIWebTransportStreamCallback *aListener) override; \ NS_IMETHOD SendDatagram(const nsTArray& aData, uint64_t aTrackingId, uint64_t aSendGroupId, int64_t aSendOrder) override; \ NS_IMETHOD GetMaxDatagramSize(void) override; \ NS_IMETHOD GetHttpChannelID(uint64_t *_retval) override; \ NS_IMETHOD GetNegotiatedProtocol(nsACString& _retval) override; \ NS_IMETHOD RegisterSendGroup(uint64_t groupId) override; \ NS_IMETHOD RetargetTo(nsIEventTarget *aTarget) override; /* Use this macro when declaring the members of this interface when the class doesn't implement the interface. This is useful for forwarding. */ #define NS_DECL_NON_VIRTUAL_NSIWEBTRANSPORT \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_asyncConnect)\ nsresult AsyncConnect(nsIURI *aURI, bool aDedicated, const nsTArray>& aServerCertHashes, nsIPrincipal *aLoadingPrincipal, uint32_t aSecurityFlags, WebTransportSessionEventListener *aListener, nsIWebTransport::HTTPVersion aVersion); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_asyncConnectWithClient)\ nsresult AsyncConnectWithClient(nsIURI *aURI, bool aDedicated, const nsTArray>& aServerCertHashes, nsIPrincipal *aLoadingPrincipal, uint64_t aBrowsingContextID, uint32_t aSecurityFlags, WebTransportSessionEventListener *aListener, const mozilla::Maybe & aClientInfo, const nsTArray& aProtocols, nsIWebTransport::HTTPVersion aVersion); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_getStats)\ nsresult GetStats(void); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_exportKeyingMaterial)\ nsresult ExportKeyingMaterial(const nsTArray& aLabel, const nsTArray& aContext, nsTArray& aKeyingMaterial); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_closeSession)\ nsresult CloseSession(uint32_t aErrorCode, const nsACString& aReason); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_createOutgoingBidirectionalStream)\ nsresult CreateOutgoingBidirectionalStream(nsIWebTransportStreamCallback *aListener); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_createOutgoingUnidirectionalStream)\ nsresult CreateOutgoingUnidirectionalStream(nsIWebTransportStreamCallback *aListener); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_sendDatagram)\ nsresult SendDatagram(const nsTArray& aData, uint64_t aTrackingId, uint64_t aSendGroupId, int64_t aSendOrder); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_getMaxDatagramSize)\ nsresult GetMaxDatagramSize(void); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_getHttpChannelID)\ nsresult GetHttpChannelID(uint64_t *_retval); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_getNegotiatedProtocol)\ nsresult GetNegotiatedProtocol(nsACString& _retval); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_registerSendGroup)\ nsresult RegisterSendGroup(uint64_t groupId); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransport_retargetTo)\ nsresult RetargetTo(nsIEventTarget *aTarget); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIWEBTRANSPORT(_to) \ NS_IMETHOD AsyncConnect(nsIURI *aURI, bool aDedicated, const nsTArray>& aServerCertHashes, nsIPrincipal *aLoadingPrincipal, uint32_t aSecurityFlags, WebTransportSessionEventListener *aListener, nsIWebTransport::HTTPVersion aVersion) override { return _to AsyncConnect(aURI, aDedicated, aServerCertHashes, aLoadingPrincipal, aSecurityFlags, aListener, aVersion); } \ NS_IMETHOD AsyncConnectWithClient(nsIURI *aURI, bool aDedicated, const nsTArray>& aServerCertHashes, nsIPrincipal *aLoadingPrincipal, uint64_t aBrowsingContextID, uint32_t aSecurityFlags, WebTransportSessionEventListener *aListener, const mozilla::Maybe & aClientInfo, const nsTArray& aProtocols, nsIWebTransport::HTTPVersion aVersion) override { return _to AsyncConnectWithClient(aURI, aDedicated, aServerCertHashes, aLoadingPrincipal, aBrowsingContextID, aSecurityFlags, aListener, aClientInfo, aProtocols, aVersion); } \ NS_IMETHOD GetStats(void) override { return _to GetStats(); } \ NS_IMETHOD ExportKeyingMaterial(const nsTArray& aLabel, const nsTArray& aContext, nsTArray& aKeyingMaterial) override { return _to ExportKeyingMaterial(aLabel, aContext, aKeyingMaterial); } \ NS_IMETHOD CloseSession(uint32_t aErrorCode, const nsACString& aReason) override { return _to CloseSession(aErrorCode, aReason); } \ NS_IMETHOD CreateOutgoingBidirectionalStream(nsIWebTransportStreamCallback *aListener) override { return _to CreateOutgoingBidirectionalStream(aListener); } \ NS_IMETHOD CreateOutgoingUnidirectionalStream(nsIWebTransportStreamCallback *aListener) override { return _to CreateOutgoingUnidirectionalStream(aListener); } \ NS_IMETHOD SendDatagram(const nsTArray& aData, uint64_t aTrackingId, uint64_t aSendGroupId, int64_t aSendOrder) override { return _to SendDatagram(aData, aTrackingId, aSendGroupId, aSendOrder); } \ NS_IMETHOD GetMaxDatagramSize(void) override { return _to GetMaxDatagramSize(); } \ NS_IMETHOD GetHttpChannelID(uint64_t *_retval) override { return _to GetHttpChannelID(_retval); } \ NS_IMETHOD GetNegotiatedProtocol(nsACString& _retval) override { return _to GetNegotiatedProtocol(_retval); } \ NS_IMETHOD RegisterSendGroup(uint64_t groupId) override { return _to RegisterSendGroup(groupId); } \ NS_IMETHOD RetargetTo(nsIEventTarget *aTarget) override { return _to RetargetTo(aTarget); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIWEBTRANSPORT(_to) \ NS_IMETHOD AsyncConnect(nsIURI *aURI, bool aDedicated, const nsTArray>& aServerCertHashes, nsIPrincipal *aLoadingPrincipal, uint32_t aSecurityFlags, WebTransportSessionEventListener *aListener, nsIWebTransport::HTTPVersion aVersion) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AsyncConnect(aURI, aDedicated, aServerCertHashes, aLoadingPrincipal, aSecurityFlags, aListener, aVersion); } \ NS_IMETHOD AsyncConnectWithClient(nsIURI *aURI, bool aDedicated, const nsTArray>& aServerCertHashes, nsIPrincipal *aLoadingPrincipal, uint64_t aBrowsingContextID, uint32_t aSecurityFlags, WebTransportSessionEventListener *aListener, const mozilla::Maybe & aClientInfo, const nsTArray& aProtocols, nsIWebTransport::HTTPVersion aVersion) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AsyncConnectWithClient(aURI, aDedicated, aServerCertHashes, aLoadingPrincipal, aBrowsingContextID, aSecurityFlags, aListener, aClientInfo, aProtocols, aVersion); } \ NS_IMETHOD GetStats(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStats(); } \ NS_IMETHOD ExportKeyingMaterial(const nsTArray& aLabel, const nsTArray& aContext, nsTArray& aKeyingMaterial) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ExportKeyingMaterial(aLabel, aContext, aKeyingMaterial); } \ NS_IMETHOD CloseSession(uint32_t aErrorCode, const nsACString& aReason) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CloseSession(aErrorCode, aReason); } \ NS_IMETHOD CreateOutgoingBidirectionalStream(nsIWebTransportStreamCallback *aListener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateOutgoingBidirectionalStream(aListener); } \ NS_IMETHOD CreateOutgoingUnidirectionalStream(nsIWebTransportStreamCallback *aListener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateOutgoingUnidirectionalStream(aListener); } \ NS_IMETHOD SendDatagram(const nsTArray& aData, uint64_t aTrackingId, uint64_t aSendGroupId, int64_t aSendOrder) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SendDatagram(aData, aTrackingId, aSendGroupId, aSendOrder); } \ NS_IMETHOD GetMaxDatagramSize(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMaxDatagramSize(); } \ NS_IMETHOD GetHttpChannelID(uint64_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHttpChannelID(_retval); } \ NS_IMETHOD GetNegotiatedProtocol(nsACString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNegotiatedProtocol(_retval); } \ NS_IMETHOD RegisterSendGroup(uint64_t groupId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterSendGroup(groupId); } \ NS_IMETHOD RetargetTo(nsIEventTarget *aTarget) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RetargetTo(aTarget); } /* starting interface: nsIWebTransportSessionStats */ #define NS_IWEBTRANSPORTSESSIONSTATS_IID_STR "bd8549d7-002f-4032-96a4-19430399d081" #define NS_IWEBTRANSPORTSESSIONSTATS_IID \ {0xbd8549d7, 0x002f, 0x4032, \ { 0x96, 0xa4, 0x19, 0x43, 0x03, 0x99, 0xd0, 0x81 }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIWebTransportSessionStats) nsIWebTransportSessionStats : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_IWEBTRANSPORTSESSIONSTATS_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIWebTransportSessionStats; /* [noscript] readonly attribute WebTransportStatsDataPtr rawStats; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIWebTransportSessionStats_rawStats) NS_IMETHOD GetRawStats(mozilla::dom::WebTransportStatsData * * aRawStats) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIWEBTRANSPORTSESSIONSTATS \ NS_IMETHOD GetRawStats(mozilla::dom::WebTransportStatsData * * aRawStats) override; /* Use this macro when declaring the members of this interface when the class doesn't implement the interface. This is useful for forwarding. */ #define NS_DECL_NON_VIRTUAL_NSIWEBTRANSPORTSESSIONSTATS \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIWebTransportSessionStats_rawStats)\ nsresult GetRawStats(mozilla::dom::WebTransportStatsData * * aRawStats); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIWEBTRANSPORTSESSIONSTATS(_to) \ NS_IMETHOD GetRawStats(mozilla::dom::WebTransportStatsData * * aRawStats) override { return _to GetRawStats(aRawStats); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIWEBTRANSPORTSESSIONSTATS(_to) \ NS_IMETHOD GetRawStats(mozilla::dom::WebTransportStatsData * * aRawStats) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRawStats(aRawStats); } /* starting interface: WebTransportSessionEventListener */ #define WEBTRANSPORTSESSIONEVENTLISTENER_IID_STR "0e3cb269-f318-43c8-959e-897f57894b71" #define WEBTRANSPORTSESSIONEVENTLISTENER_IID \ {0x0e3cb269, 0xf318, 0x43c8, \ { 0x95, 0x9e, 0x89, 0x7f, 0x57, 0x89, 0x4b, 0x71 }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_WebTransportSessionEventListener) WebTransportSessionEventListener : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(WEBTRANSPORTSESSIONEVENTLISTENER_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = WebTransportSessionEventListener; /* void onSessionReady (in uint64_t aSessionId); */ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onSessionReady) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnSessionReady(uint64_t aSessionId) = 0; /* void onSessionClosed (in boolean aCleanly, in uint32_t aErrorCode, in ACString aReason, in nsIWebTransportSessionStats aStats); */ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onSessionClosed) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnSessionClosed(bool aCleanly, uint32_t aErrorCode, const nsACString& aReason, nsIWebTransportSessionStats *aStats) = 0; /* void onDraining (); */ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onDraining) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnDraining(void) = 0; /* void onIncomingBidirectionalStreamAvailable (in nsIWebTransportBidirectionalStream aStream); */ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onIncomingBidirectionalStreamAvailable) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnIncomingBidirectionalStreamAvailable(nsIWebTransportBidirectionalStream *aStream) = 0; /* void onIncomingUnidirectionalStreamAvailable (in nsIWebTransportReceiveStream aStream); */ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onIncomingUnidirectionalStreamAvailable) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnIncomingUnidirectionalStreamAvailable(nsIWebTransportReceiveStream *aStream) = 0; /* void onStopSending (in uint64_t aStreamId, in nsresult aError); */ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onStopSending) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnStopSending(uint64_t aStreamId, nsresult aError) = 0; /* void onResetReceived (in uint64_t aStreamId, in nsresult aError); */ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onResetReceived) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnResetReceived(uint64_t aStreamId, nsresult aError) = 0; /* void onDatagramReceived (in Array aData); */ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onDatagramReceived) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnDatagramReceived(const nsTArray& aData) = 0; /* void onMaxDatagramSize (in uint64_t aSize); */ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onMaxDatagramSize) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnMaxDatagramSize(uint64_t aSize) = 0; enum MOZ_BINDING(binding_to, idl, class, XPIDL_WebTransportSessionEventListener_DatagramOutcome) DatagramOutcome : uint32_t { UNKNOWN MOZ_BINDING(binding_to, idl, const, XPIDL_WebTransportSessionEventListener_DatagramOutcome_UNKNOWN) = 0, DROPPED_TOO_MUCH_DATA MOZ_BINDING(binding_to, idl, const, XPIDL_WebTransportSessionEventListener_DatagramOutcome_DROPPED_TOO_MUCH_DATA) = 1, SENT MOZ_BINDING(binding_to, idl, const, XPIDL_WebTransportSessionEventListener_DatagramOutcome_SENT) = 2, }; /* void onOutgoingDatagramOutCome (in uint64_t aId, in WebTransportSessionEventListener_DatagramOutcome aOutCome); */ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onOutgoingDatagramOutCome) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnOutgoingDatagramOutCome(uint64_t aId, WebTransportSessionEventListener::DatagramOutcome aOutCome) = 0; /* void onStatsAvailable (in nsIWebTransportSessionStats aStats); */ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onStatsAvailable) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnStatsAvailable(nsIWebTransportSessionStats *aStats) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_WEBTRANSPORTSESSIONEVENTLISTENER \ NS_IMETHOD OnSessionReady(uint64_t aSessionId) override; \ NS_IMETHOD OnSessionClosed(bool aCleanly, uint32_t aErrorCode, const nsACString& aReason, nsIWebTransportSessionStats *aStats) override; \ NS_IMETHOD OnDraining(void) override; \ NS_IMETHOD OnIncomingBidirectionalStreamAvailable(nsIWebTransportBidirectionalStream *aStream) override; \ NS_IMETHOD OnIncomingUnidirectionalStreamAvailable(nsIWebTransportReceiveStream *aStream) override; \ NS_IMETHOD OnStopSending(uint64_t aStreamId, nsresult aError) override; \ NS_IMETHOD OnResetReceived(uint64_t aStreamId, nsresult aError) override; \ NS_IMETHOD OnDatagramReceived(const nsTArray& aData) override; \ NS_IMETHOD OnMaxDatagramSize(uint64_t aSize) override; \ NS_IMETHOD OnOutgoingDatagramOutCome(uint64_t aId, WebTransportSessionEventListener::DatagramOutcome aOutCome) override; \ NS_IMETHOD OnStatsAvailable(nsIWebTransportSessionStats *aStats) override; /* Use this macro when declaring the members of this interface when the class doesn't implement the interface. This is useful for forwarding. */ #define NS_DECL_NON_VIRTUAL_WEBTRANSPORTSESSIONEVENTLISTENER \ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onSessionReady)\ nsresult OnSessionReady(uint64_t aSessionId); \ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onSessionClosed)\ nsresult OnSessionClosed(bool aCleanly, uint32_t aErrorCode, const nsACString& aReason, nsIWebTransportSessionStats *aStats); \ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onDraining)\ nsresult OnDraining(void); \ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onIncomingBidirectionalStreamAvailable)\ nsresult OnIncomingBidirectionalStreamAvailable(nsIWebTransportBidirectionalStream *aStream); \ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onIncomingUnidirectionalStreamAvailable)\ nsresult OnIncomingUnidirectionalStreamAvailable(nsIWebTransportReceiveStream *aStream); \ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onStopSending)\ nsresult OnStopSending(uint64_t aStreamId, nsresult aError); \ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onResetReceived)\ nsresult OnResetReceived(uint64_t aStreamId, nsresult aError); \ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onDatagramReceived)\ nsresult OnDatagramReceived(const nsTArray& aData); \ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onMaxDatagramSize)\ nsresult OnMaxDatagramSize(uint64_t aSize); \ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onOutgoingDatagramOutCome)\ nsresult OnOutgoingDatagramOutCome(uint64_t aId, WebTransportSessionEventListener::DatagramOutcome aOutCome); \ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListener_onStatsAvailable)\ nsresult OnStatsAvailable(nsIWebTransportSessionStats *aStats); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_WEBTRANSPORTSESSIONEVENTLISTENER(_to) \ NS_IMETHOD OnSessionReady(uint64_t aSessionId) override { return _to OnSessionReady(aSessionId); } \ NS_IMETHOD OnSessionClosed(bool aCleanly, uint32_t aErrorCode, const nsACString& aReason, nsIWebTransportSessionStats *aStats) override { return _to OnSessionClosed(aCleanly, aErrorCode, aReason, aStats); } \ NS_IMETHOD OnDraining(void) override { return _to OnDraining(); } \ NS_IMETHOD OnIncomingBidirectionalStreamAvailable(nsIWebTransportBidirectionalStream *aStream) override { return _to OnIncomingBidirectionalStreamAvailable(aStream); } \ NS_IMETHOD OnIncomingUnidirectionalStreamAvailable(nsIWebTransportReceiveStream *aStream) override { return _to OnIncomingUnidirectionalStreamAvailable(aStream); } \ NS_IMETHOD OnStopSending(uint64_t aStreamId, nsresult aError) override { return _to OnStopSending(aStreamId, aError); } \ NS_IMETHOD OnResetReceived(uint64_t aStreamId, nsresult aError) override { return _to OnResetReceived(aStreamId, aError); } \ NS_IMETHOD OnDatagramReceived(const nsTArray& aData) override { return _to OnDatagramReceived(aData); } \ NS_IMETHOD OnMaxDatagramSize(uint64_t aSize) override { return _to OnMaxDatagramSize(aSize); } \ NS_IMETHOD OnOutgoingDatagramOutCome(uint64_t aId, WebTransportSessionEventListener::DatagramOutcome aOutCome) override { return _to OnOutgoingDatagramOutCome(aId, aOutCome); } \ NS_IMETHOD OnStatsAvailable(nsIWebTransportSessionStats *aStats) override { return _to OnStatsAvailable(aStats); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_WEBTRANSPORTSESSIONEVENTLISTENER(_to) \ NS_IMETHOD OnSessionReady(uint64_t aSessionId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnSessionReady(aSessionId); } \ NS_IMETHOD OnSessionClosed(bool aCleanly, uint32_t aErrorCode, const nsACString& aReason, nsIWebTransportSessionStats *aStats) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnSessionClosed(aCleanly, aErrorCode, aReason, aStats); } \ NS_IMETHOD OnDraining(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDraining(); } \ NS_IMETHOD OnIncomingBidirectionalStreamAvailable(nsIWebTransportBidirectionalStream *aStream) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnIncomingBidirectionalStreamAvailable(aStream); } \ NS_IMETHOD OnIncomingUnidirectionalStreamAvailable(nsIWebTransportReceiveStream *aStream) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnIncomingUnidirectionalStreamAvailable(aStream); } \ NS_IMETHOD OnStopSending(uint64_t aStreamId, nsresult aError) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStopSending(aStreamId, aError); } \ NS_IMETHOD OnResetReceived(uint64_t aStreamId, nsresult aError) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnResetReceived(aStreamId, aError); } \ NS_IMETHOD OnDatagramReceived(const nsTArray& aData) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDatagramReceived(aData); } \ NS_IMETHOD OnMaxDatagramSize(uint64_t aSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnMaxDatagramSize(aSize); } \ NS_IMETHOD OnOutgoingDatagramOutCome(uint64_t aId, WebTransportSessionEventListener::DatagramOutcome aOutCome) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnOutgoingDatagramOutCome(aId, aOutCome); } \ NS_IMETHOD OnStatsAvailable(nsIWebTransportSessionStats *aStats) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStatsAvailable(aStats); } /* starting interface: WebTransportSessionEventListenerInternal */ #define WEBTRANSPORTSESSIONEVENTLISTENERINTERNAL_IID_STR "8fb30aa9-5163-4eb3-81f3-371e1ccb5b0e" #define WEBTRANSPORTSESSIONEVENTLISTENERINTERNAL_IID \ {0x8fb30aa9, 0x5163, 0x4eb3, \ { 0x81, 0xf3, 0x37, 0x1e, 0x1c, 0xcb, 0x5b, 0x0e }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_WebTransportSessionEventListenerInternal) WebTransportSessionEventListenerInternal : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(WEBTRANSPORTSESSIONEVENTLISTENERINTERNAL_IID) /* void onSessionReadyInternal (in WebTransportSessionPtr aSession); */ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListenerInternal_onSessionReadyInternal) NS_IMETHOD OnSessionReadyInternal(mozilla::net::WebTransportSessionBase * aSession) = 0; /* void onIncomingStreamAvailableInternal (in WebTransportStreamPtr aStream); */ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListenerInternal_onIncomingStreamAvailableInternal) NS_IMETHOD OnIncomingStreamAvailableInternal(mozilla::net::WebTransportStreamBase * aStream) = 0; /* void onDatagramReceivedInternal (in Datagram aData); */ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListenerInternal_onDatagramReceivedInternal) NS_IMETHOD OnDatagramReceivedInternal(nsTArray&& aData) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_WEBTRANSPORTSESSIONEVENTLISTENERINTERNAL \ NS_IMETHOD OnSessionReadyInternal(mozilla::net::WebTransportSessionBase * aSession) override; \ NS_IMETHOD OnIncomingStreamAvailableInternal(mozilla::net::WebTransportStreamBase * aStream) override; \ NS_IMETHOD OnDatagramReceivedInternal(nsTArray&& aData) override; /* Use this macro when declaring the members of this interface when the class doesn't implement the interface. This is useful for forwarding. */ #define NS_DECL_NON_VIRTUAL_WEBTRANSPORTSESSIONEVENTLISTENERINTERNAL \ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListenerInternal_onSessionReadyInternal)\ nsresult OnSessionReadyInternal(mozilla::net::WebTransportSessionBase * aSession); \ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListenerInternal_onIncomingStreamAvailableInternal)\ nsresult OnIncomingStreamAvailableInternal(mozilla::net::WebTransportStreamBase * aStream); \ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportSessionEventListenerInternal_onDatagramReceivedInternal)\ nsresult OnDatagramReceivedInternal(nsTArray&& aData); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_WEBTRANSPORTSESSIONEVENTLISTENERINTERNAL(_to) \ NS_IMETHOD OnSessionReadyInternal(mozilla::net::WebTransportSessionBase * aSession) override { return _to OnSessionReadyInternal(aSession); } \ NS_IMETHOD OnIncomingStreamAvailableInternal(mozilla::net::WebTransportStreamBase * aStream) override { return _to OnIncomingStreamAvailableInternal(aStream); } \ NS_IMETHOD OnDatagramReceivedInternal(nsTArray&& aData) override { return _to OnDatagramReceivedInternal(aData); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_WEBTRANSPORTSESSIONEVENTLISTENERINTERNAL(_to) \ NS_IMETHOD OnSessionReadyInternal(mozilla::net::WebTransportSessionBase * aSession) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnSessionReadyInternal(aSession); } \ NS_IMETHOD OnIncomingStreamAvailableInternal(mozilla::net::WebTransportStreamBase * aStream) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnIncomingStreamAvailableInternal(aStream); } \ NS_IMETHOD OnDatagramReceivedInternal(nsTArray&& aData) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDatagramReceivedInternal(aData); } /* starting interface: WebTransportConnectionSettings */ #define WEBTRANSPORTCONNECTIONSETTINGS_IID_STR "faad75bd-83c6-420b-9fdb-a70bd70be449" #define WEBTRANSPORTCONNECTIONSETTINGS_IID \ {0xfaad75bd, 0x83c6, 0x420b, \ { 0x9f, 0xdb, 0xa7, 0x0b, 0xd7, 0x0b, 0xe4, 0x49 }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_WebTransportConnectionSettings) WebTransportConnectionSettings : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(WEBTRANSPORTCONNECTIONSETTINGS_IID) /* readonly attribute boolean dedicated; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_WebTransportConnectionSettings_dedicated) NS_IMETHOD GetDedicated(bool *aDedicated) = 0; /* void getServerCertificateHashes (out Array aServerCertHashes); */ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportConnectionSettings_getServerCertificateHashes) NS_IMETHOD GetServerCertificateHashes(nsTArray>& aServerCertHashes) = 0; /* readonly attribute nsIWebTransport_HTTPVersion httpVersion; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_WebTransportConnectionSettings_httpVersion) NS_IMETHOD GetHttpVersion(nsIWebTransport::HTTPVersion *aHttpVersion) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_WEBTRANSPORTCONNECTIONSETTINGS \ NS_IMETHOD GetDedicated(bool *aDedicated) override; \ NS_IMETHOD GetServerCertificateHashes(nsTArray>& aServerCertHashes) override; \ NS_IMETHOD GetHttpVersion(nsIWebTransport::HTTPVersion *aHttpVersion) override; /* Use this macro when declaring the members of this interface when the class doesn't implement the interface. This is useful for forwarding. */ #define NS_DECL_NON_VIRTUAL_WEBTRANSPORTCONNECTIONSETTINGS \ MOZ_BINDING(binding_to, idl, getter, XPIDL_WebTransportConnectionSettings_dedicated)\ nsresult GetDedicated(bool *aDedicated); \ MOZ_BINDING(binding_to, idl, method, XPIDL_WebTransportConnectionSettings_getServerCertificateHashes)\ nsresult GetServerCertificateHashes(nsTArray>& aServerCertHashes); \ MOZ_BINDING(binding_to, idl, getter, XPIDL_WebTransportConnectionSettings_httpVersion)\ nsresult GetHttpVersion(nsIWebTransport::HTTPVersion *aHttpVersion); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_WEBTRANSPORTCONNECTIONSETTINGS(_to) \ NS_IMETHOD GetDedicated(bool *aDedicated) override { return _to GetDedicated(aDedicated); } \ NS_IMETHOD GetServerCertificateHashes(nsTArray>& aServerCertHashes) override { return _to GetServerCertificateHashes(aServerCertHashes); } \ NS_IMETHOD GetHttpVersion(nsIWebTransport::HTTPVersion *aHttpVersion) override { return _to GetHttpVersion(aHttpVersion); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_WEBTRANSPORTCONNECTIONSETTINGS(_to) \ NS_IMETHOD GetDedicated(bool *aDedicated) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDedicated(aDedicated); } \ NS_IMETHOD GetServerCertificateHashes(nsTArray>& aServerCertHashes) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetServerCertificateHashes(aServerCertHashes); } \ NS_IMETHOD GetHttpVersion(nsIWebTransport::HTTPVersion *aHttpVersion) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHttpVersion(aHttpVersion); } /* starting interface: nsIWebTransportStreamCallback */ #define NS_IWEBTRANSPORTSTREAMCALLBACK_IID_STR "c6eeff1d-599b-40a8-9157-c7a40c3d51a2" #define NS_IWEBTRANSPORTSTREAMCALLBACK_IID \ {0xc6eeff1d, 0x599b, 0x40a8, \ { 0x91, 0x57, 0xc7, 0xa4, 0x0c, 0x3d, 0x51, 0xa2 }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIWebTransportStreamCallback) nsIWebTransportStreamCallback : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_IWEBTRANSPORTSTREAMCALLBACK_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIWebTransportStreamCallback; /* void onBidirectionalStreamReady (in nsIWebTransportBidirectionalStream aStream); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransportStreamCallback_onBidirectionalStreamReady) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnBidirectionalStreamReady(nsIWebTransportBidirectionalStream *aStream) = 0; /* void onUnidirectionalStreamReady (in nsIWebTransportSendStream aStream); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransportStreamCallback_onUnidirectionalStreamReady) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnUnidirectionalStreamReady(nsIWebTransportSendStream *aStream) = 0; /* void onError (in uint8_t aError); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransportStreamCallback_onError) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnError(uint8_t aError) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIWEBTRANSPORTSTREAMCALLBACK \ NS_IMETHOD OnBidirectionalStreamReady(nsIWebTransportBidirectionalStream *aStream) override; \ NS_IMETHOD OnUnidirectionalStreamReady(nsIWebTransportSendStream *aStream) override; \ NS_IMETHOD OnError(uint8_t aError) override; /* Use this macro when declaring the members of this interface when the class doesn't implement the interface. This is useful for forwarding. */ #define NS_DECL_NON_VIRTUAL_NSIWEBTRANSPORTSTREAMCALLBACK \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransportStreamCallback_onBidirectionalStreamReady)\ nsresult OnBidirectionalStreamReady(nsIWebTransportBidirectionalStream *aStream); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransportStreamCallback_onUnidirectionalStreamReady)\ nsresult OnUnidirectionalStreamReady(nsIWebTransportSendStream *aStream); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransportStreamCallback_onError)\ nsresult OnError(uint8_t aError); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIWEBTRANSPORTSTREAMCALLBACK(_to) \ NS_IMETHOD OnBidirectionalStreamReady(nsIWebTransportBidirectionalStream *aStream) override { return _to OnBidirectionalStreamReady(aStream); } \ NS_IMETHOD OnUnidirectionalStreamReady(nsIWebTransportSendStream *aStream) override { return _to OnUnidirectionalStreamReady(aStream); } \ NS_IMETHOD OnError(uint8_t aError) override { return _to OnError(aError); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIWEBTRANSPORTSTREAMCALLBACK(_to) \ NS_IMETHOD OnBidirectionalStreamReady(nsIWebTransportBidirectionalStream *aStream) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnBidirectionalStreamReady(aStream); } \ NS_IMETHOD OnUnidirectionalStreamReady(nsIWebTransportSendStream *aStream) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnUnidirectionalStreamReady(aStream); } \ NS_IMETHOD OnError(uint8_t aError) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnError(aError); } /* starting interface: nsIWebTransportHash */ #define NS_IWEBTRANSPORTHASH_IID_STR "2523a26e-94be-4de6-8c27-9b4ffff742f0" #define NS_IWEBTRANSPORTHASH_IID \ {0x2523a26e, 0x94be, 0x4de6, \ { 0x8c, 0x27, 0x9b, 0x4f, 0xff, 0xf7, 0x42, 0xf0 }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIWebTransportHash) nsIWebTransportHash : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_IWEBTRANSPORTHASH_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIWebTransportHash; /* readonly attribute ACString algorithm; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIWebTransportHash_algorithm) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetAlgorithm(nsACString& aAlgorithm) = 0; /* readonly attribute Array value; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIWebTransportHash_value) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetValue(nsTArray& aValue) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIWEBTRANSPORTHASH \ NS_IMETHOD GetAlgorithm(nsACString& aAlgorithm) override; \ NS_IMETHOD GetValue(nsTArray& aValue) override; /* Use this macro when declaring the members of this interface when the class doesn't implement the interface. This is useful for forwarding. */ #define NS_DECL_NON_VIRTUAL_NSIWEBTRANSPORTHASH \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIWebTransportHash_algorithm)\ nsresult GetAlgorithm(nsACString& aAlgorithm); \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIWebTransportHash_value)\ nsresult GetValue(nsTArray& aValue); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIWEBTRANSPORTHASH(_to) \ NS_IMETHOD GetAlgorithm(nsACString& aAlgorithm) override { return _to GetAlgorithm(aAlgorithm); } \ NS_IMETHOD GetValue(nsTArray& aValue) override { return _to GetValue(aValue); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIWEBTRANSPORTHASH(_to) \ NS_IMETHOD GetAlgorithm(nsACString& aAlgorithm) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlgorithm(aAlgorithm); } \ NS_IMETHOD GetValue(nsTArray& aValue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); } #endif /* __gen_nsIWebTransport_h__ */