Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/netwerk/protocol/http/nsIReplacedHttpResponse.idl
*/
#ifndef __gen_nsIReplacedHttpResponse_h__
#define __gen_nsIReplacedHttpResponse_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
class nsIHttpHeaderVisitor; /* forward declaration */
/* starting interface: nsIReplacedHttpResponse */
#define NS_IREPLACEDHTTPRESPONSE_IID_STR "067cb318-9b67-4442-9c1c-93e62dac8a7c"
#define NS_IREPLACEDHTTPRESPONSE_IID \
{0x067cb318, 0x9b67, 0x4442, \
{ 0x9c, 0x1c, 0x93, 0xe6, 0x2d, 0xac, 0x8a, 0x7c }}
class NS_NO_VTABLE nsIReplacedHttpResponse : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IREPLACEDHTTPRESPONSE_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIReplacedHttpResponse;
/* [must_use] void init (); */
JS_HAZ_CAN_RUN_SCRIPT [[nodiscard]] NS_IMETHOD Init(void) = 0;
/* [must_use] attribute ACString responseBody; */
JS_HAZ_CAN_RUN_SCRIPT [[nodiscard]] NS_IMETHOD GetResponseBody(nsACString& aResponseBody) = 0;
JS_HAZ_CAN_RUN_SCRIPT [[nodiscard]] NS_IMETHOD SetResponseBody(const nsACString& aResponseBody) = 0;
/* [must_use] attribute unsigned long responseStatus; */
JS_HAZ_CAN_RUN_SCRIPT [[nodiscard]] NS_IMETHOD GetResponseStatus(uint32_t *aResponseStatus) = 0;
JS_HAZ_CAN_RUN_SCRIPT [[nodiscard]] NS_IMETHOD SetResponseStatus(uint32_t aResponseStatus) = 0;
/* [must_use] attribute ACString responseStatusText; */
JS_HAZ_CAN_RUN_SCRIPT [[nodiscard]] NS_IMETHOD GetResponseStatusText(nsACString& aResponseStatusText) = 0;
JS_HAZ_CAN_RUN_SCRIPT [[nodiscard]] NS_IMETHOD SetResponseStatusText(const nsACString& aResponseStatusText) = 0;
/* [must_use] void visitResponseHeaders (in nsIHttpHeaderVisitor visitor); */
JS_HAZ_CAN_RUN_SCRIPT [[nodiscard]] NS_IMETHOD VisitResponseHeaders(nsIHttpHeaderVisitor *visitor) = 0;
/* [must_use] void setResponseHeader (in ACString header, in ACString value, in boolean merge); */
JS_HAZ_CAN_RUN_SCRIPT [[nodiscard]] NS_IMETHOD SetResponseHeader(const nsACString& header, const nsACString& value, bool merge) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIReplacedHttpResponse, NS_IREPLACEDHTTPRESPONSE_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIREPLACEDHTTPRESPONSE \
[[nodiscard]] NS_IMETHOD Init(void) override; \
[[nodiscard]] NS_IMETHOD GetResponseBody(nsACString& aResponseBody) override; \
[[nodiscard]] NS_IMETHOD SetResponseBody(const nsACString& aResponseBody) override; \
[[nodiscard]] NS_IMETHOD GetResponseStatus(uint32_t *aResponseStatus) override; \
[[nodiscard]] NS_IMETHOD SetResponseStatus(uint32_t aResponseStatus) override; \
[[nodiscard]] NS_IMETHOD GetResponseStatusText(nsACString& aResponseStatusText) override; \
[[nodiscard]] NS_IMETHOD SetResponseStatusText(const nsACString& aResponseStatusText) override; \
[[nodiscard]] NS_IMETHOD VisitResponseHeaders(nsIHttpHeaderVisitor *visitor) override; \
[[nodiscard]] NS_IMETHOD SetResponseHeader(const nsACString& header, const nsACString& value, bool merge) 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_NSIREPLACEDHTTPRESPONSE \
[[nodiscard]] nsresult Init(void); \
[[nodiscard]] nsresult GetResponseBody(nsACString& aResponseBody); \
[[nodiscard]] nsresult SetResponseBody(const nsACString& aResponseBody); \
[[nodiscard]] nsresult GetResponseStatus(uint32_t *aResponseStatus); \
[[nodiscard]] nsresult SetResponseStatus(uint32_t aResponseStatus); \
[[nodiscard]] nsresult GetResponseStatusText(nsACString& aResponseStatusText); \
[[nodiscard]] nsresult SetResponseStatusText(const nsACString& aResponseStatusText); \
[[nodiscard]] nsresult VisitResponseHeaders(nsIHttpHeaderVisitor *visitor); \
[[nodiscard]] nsresult SetResponseHeader(const nsACString& header, const nsACString& value, bool merge);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIREPLACEDHTTPRESPONSE(_to) \
[[nodiscard]] NS_IMETHOD Init(void) override { return _to Init(); } \
[[nodiscard]] NS_IMETHOD GetResponseBody(nsACString& aResponseBody) override { return _to GetResponseBody(aResponseBody); } \
[[nodiscard]] NS_IMETHOD SetResponseBody(const nsACString& aResponseBody) override { return _to SetResponseBody(aResponseBody); } \
[[nodiscard]] NS_IMETHOD GetResponseStatus(uint32_t *aResponseStatus) override { return _to GetResponseStatus(aResponseStatus); } \
[[nodiscard]] NS_IMETHOD SetResponseStatus(uint32_t aResponseStatus) override { return _to SetResponseStatus(aResponseStatus); } \
[[nodiscard]] NS_IMETHOD GetResponseStatusText(nsACString& aResponseStatusText) override { return _to GetResponseStatusText(aResponseStatusText); } \
[[nodiscard]] NS_IMETHOD SetResponseStatusText(const nsACString& aResponseStatusText) override { return _to SetResponseStatusText(aResponseStatusText); } \
[[nodiscard]] NS_IMETHOD VisitResponseHeaders(nsIHttpHeaderVisitor *visitor) override { return _to VisitResponseHeaders(visitor); } \
[[nodiscard]] NS_IMETHOD SetResponseHeader(const nsACString& header, const nsACString& value, bool merge) override { return _to SetResponseHeader(header, value, merge); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIREPLACEDHTTPRESPONSE(_to) \
[[nodiscard]] NS_IMETHOD Init(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(); } \
[[nodiscard]] NS_IMETHOD GetResponseBody(nsACString& aResponseBody) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResponseBody(aResponseBody); } \
[[nodiscard]] NS_IMETHOD SetResponseBody(const nsACString& aResponseBody) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetResponseBody(aResponseBody); } \
[[nodiscard]] NS_IMETHOD GetResponseStatus(uint32_t *aResponseStatus) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResponseStatus(aResponseStatus); } \
[[nodiscard]] NS_IMETHOD SetResponseStatus(uint32_t aResponseStatus) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetResponseStatus(aResponseStatus); } \
[[nodiscard]] NS_IMETHOD GetResponseStatusText(nsACString& aResponseStatusText) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResponseStatusText(aResponseStatusText); } \
[[nodiscard]] NS_IMETHOD SetResponseStatusText(const nsACString& aResponseStatusText) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetResponseStatusText(aResponseStatusText); } \
[[nodiscard]] NS_IMETHOD VisitResponseHeaders(nsIHttpHeaderVisitor *visitor) override { return !_to ? NS_ERROR_NULL_POINTER : _to->VisitResponseHeaders(visitor); } \
[[nodiscard]] NS_IMETHOD SetResponseHeader(const nsACString& header, const nsACString& value, bool merge) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetResponseHeader(header, value, merge); }
#endif /* __gen_nsIReplacedHttpResponse_h__ */