/* * DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/netwerk/protocol/webtransport/nsIWebTransportEventService.idl */ #ifndef __gen_nsIWebTransportEventService_h__ #define __gen_nsIWebTransportEventService_h__ #include "nsISupports.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 /* starting interface: nsIWebTransportEventListener */ #define NS_IWEBTRANSPORTEVENTLISTENER_IID_STR "5f34ad48-92ec-4684-ab08-76f6ead9008d" #define NS_IWEBTRANSPORTEVENTLISTENER_IID \ {0x5f34ad48, 0x92ec, 0x4684, \ { 0xab, 0x08, 0x76, 0xf6, 0xea, 0xd9, 0x00, 0x8d }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIWebTransportEventListener) nsIWebTransportEventListener : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_IWEBTRANSPORTEVENTLISTENER_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIWebTransportEventListener; /* [must_use] void webTransportSessionCreated (in uint64_t aHttpChannelId); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransportEventListener_webTransportSessionCreated) JS_HAZ_CAN_RUN_SCRIPT [[nodiscard]] NS_IMETHOD WebTransportSessionCreated(uint64_t aHttpChannelId) = 0; /* [must_use] void webTransportSessionClosed (in uint64_t aHttpChannelId, in unsigned short aCode, in AString aReason); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransportEventListener_webTransportSessionClosed) JS_HAZ_CAN_RUN_SCRIPT [[nodiscard]] NS_IMETHOD WebTransportSessionClosed(uint64_t aHttpChannelId, uint16_t aCode, const nsAString& aReason) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIWEBTRANSPORTEVENTLISTENER \ [[nodiscard]] NS_IMETHOD WebTransportSessionCreated(uint64_t aHttpChannelId) override; \ [[nodiscard]] NS_IMETHOD WebTransportSessionClosed(uint64_t aHttpChannelId, uint16_t aCode, const nsAString& aReason) 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_NSIWEBTRANSPORTEVENTLISTENER \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransportEventListener_webTransportSessionCreated)\ [[nodiscard]] nsresult WebTransportSessionCreated(uint64_t aHttpChannelId); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransportEventListener_webTransportSessionClosed)\ [[nodiscard]] nsresult WebTransportSessionClosed(uint64_t aHttpChannelId, uint16_t aCode, const nsAString& aReason); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIWEBTRANSPORTEVENTLISTENER(_to) \ [[nodiscard]] NS_IMETHOD WebTransportSessionCreated(uint64_t aHttpChannelId) override { return _to WebTransportSessionCreated(aHttpChannelId); } \ [[nodiscard]] NS_IMETHOD WebTransportSessionClosed(uint64_t aHttpChannelId, uint16_t aCode, const nsAString& aReason) override { return _to WebTransportSessionClosed(aHttpChannelId, aCode, aReason); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIWEBTRANSPORTEVENTLISTENER(_to) \ [[nodiscard]] NS_IMETHOD WebTransportSessionCreated(uint64_t aHttpChannelId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WebTransportSessionCreated(aHttpChannelId); } \ [[nodiscard]] NS_IMETHOD WebTransportSessionClosed(uint64_t aHttpChannelId, uint16_t aCode, const nsAString& aReason) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WebTransportSessionClosed(aHttpChannelId, aCode, aReason); } /* starting interface: nsIWebTransportEventService */ #define NS_IWEBTRANSPORTEVENTSERVICE_IID_STR "0907d7d4-351b-4513-a2d9-f6e6467d59ec" #define NS_IWEBTRANSPORTEVENTSERVICE_IID \ {0x0907d7d4, 0x351b, 0x4513, \ { 0xa2, 0xd9, 0xf6, 0xe6, 0x46, 0x7d, 0x59, 0xec }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIWebTransportEventService) nsIWebTransportEventService : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_IWEBTRANSPORTEVENTSERVICE_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIWebTransportEventService; /* [must_use] void addListener (in unsigned long long aInnerWindowID, in nsIWebTransportEventListener aListener); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransportEventService_addListener) [[nodiscard]] NS_IMETHOD AddListener(uint64_t aInnerWindowID, nsIWebTransportEventListener *aListener) = 0; /* [must_use] void removeListener (in unsigned long long aInnerWindowID, in nsIWebTransportEventListener aListener); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransportEventService_removeListener) [[nodiscard]] NS_IMETHOD RemoveListener(uint64_t aInnerWindowID, nsIWebTransportEventListener *aListener) = 0; /* [must_use] boolean hasListenerFor (in unsigned long long aInnerWindowID); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransportEventService_hasListenerFor) [[nodiscard]] NS_IMETHOD HasListenerFor(uint64_t aInnerWindowID, bool *_retval) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIWEBTRANSPORTEVENTSERVICE \ [[nodiscard]] NS_IMETHOD AddListener(uint64_t aInnerWindowID, nsIWebTransportEventListener *aListener) override; \ [[nodiscard]] NS_IMETHOD RemoveListener(uint64_t aInnerWindowID, nsIWebTransportEventListener *aListener) override; \ [[nodiscard]] NS_IMETHOD HasListenerFor(uint64_t aInnerWindowID, bool *_retval) 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_NSIWEBTRANSPORTEVENTSERVICE \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransportEventService_addListener)\ [[nodiscard]] nsresult AddListener(uint64_t aInnerWindowID, nsIWebTransportEventListener *aListener); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransportEventService_removeListener)\ [[nodiscard]] nsresult RemoveListener(uint64_t aInnerWindowID, nsIWebTransportEventListener *aListener); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIWebTransportEventService_hasListenerFor)\ [[nodiscard]] nsresult HasListenerFor(uint64_t aInnerWindowID, bool *_retval); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIWEBTRANSPORTEVENTSERVICE(_to) \ [[nodiscard]] NS_IMETHOD AddListener(uint64_t aInnerWindowID, nsIWebTransportEventListener *aListener) override { return _to AddListener(aInnerWindowID, aListener); } \ [[nodiscard]] NS_IMETHOD RemoveListener(uint64_t aInnerWindowID, nsIWebTransportEventListener *aListener) override { return _to RemoveListener(aInnerWindowID, aListener); } \ [[nodiscard]] NS_IMETHOD HasListenerFor(uint64_t aInnerWindowID, bool *_retval) override { return _to HasListenerFor(aInnerWindowID, _retval); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIWEBTRANSPORTEVENTSERVICE(_to) \ [[nodiscard]] NS_IMETHOD AddListener(uint64_t aInnerWindowID, nsIWebTransportEventListener *aListener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddListener(aInnerWindowID, aListener); } \ [[nodiscard]] NS_IMETHOD RemoveListener(uint64_t aInnerWindowID, nsIWebTransportEventListener *aListener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveListener(aInnerWindowID, aListener); } \ [[nodiscard]] NS_IMETHOD HasListenerFor(uint64_t aInnerWindowID, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HasListenerFor(aInnerWindowID, _retval); } #endif /* __gen_nsIWebTransportEventService_h__ */