Copy as Markdown
Other Tools
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/netwerk/protocol/http/nsIBinaryHttp.idl
*/
#ifndef __gen_nsIBinaryHttp_h__
#define __gen_nsIBinaryHttp_h__
#include "nsISupports.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
/* starting interface: nsIBinaryHttpRequest */
#define NS_IBINARYHTTPREQUEST_IID_STR "f6f899cc-683a-43da-9206-0eb0c09cc758"
#define NS_IBINARYHTTPREQUEST_IID \
{0xf6f899cc, 0x683a, 0x43da, \
{ 0x92, 0x06, 0x0e, 0xb0, 0xc0, 0x9c, 0xc7, 0x58 }}
class NS_NO_VTABLE nsIBinaryHttpRequest : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IBINARYHTTPREQUEST_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIBinaryHttpRequest;
/* readonly attribute ACString method; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetMethod(nsACString& aMethod) = 0;
/* readonly attribute ACString scheme; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetScheme(nsACString& aScheme) = 0;
/* readonly attribute ACString authority; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetAuthority(nsACString& aAuthority) = 0;
/* readonly attribute ACString path; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetPath(nsACString& aPath) = 0;
/* readonly attribute Array<ACString> headerNames; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetHeaderNames(nsTArray<nsCString >& aHeaderNames) = 0;
/* readonly attribute Array<ACString> headerValues; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetHeaderValues(nsTArray<nsCString >& aHeaderValues) = 0;
/* readonly attribute Array<octet> content; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetContent(nsTArray<uint8_t >& aContent) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIBinaryHttpRequest, NS_IBINARYHTTPREQUEST_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIBINARYHTTPREQUEST \
NS_IMETHOD GetMethod(nsACString& aMethod) override; \
NS_IMETHOD GetScheme(nsACString& aScheme) override; \
NS_IMETHOD GetAuthority(nsACString& aAuthority) override; \
NS_IMETHOD GetPath(nsACString& aPath) override; \
NS_IMETHOD GetHeaderNames(nsTArray<nsCString >& aHeaderNames) override; \
NS_IMETHOD GetHeaderValues(nsTArray<nsCString >& aHeaderValues) override; \
NS_IMETHOD GetContent(nsTArray<uint8_t >& aContent) 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_NSIBINARYHTTPREQUEST \
nsresult GetMethod(nsACString& aMethod); \
nsresult GetScheme(nsACString& aScheme); \
nsresult GetAuthority(nsACString& aAuthority); \
nsresult GetPath(nsACString& aPath); \
nsresult GetHeaderNames(nsTArray<nsCString >& aHeaderNames); \
nsresult GetHeaderValues(nsTArray<nsCString >& aHeaderValues); \
nsresult GetContent(nsTArray<uint8_t >& aContent);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIBINARYHTTPREQUEST(_to) \
NS_IMETHOD GetMethod(nsACString& aMethod) override { return _to GetMethod(aMethod); } \
NS_IMETHOD GetScheme(nsACString& aScheme) override { return _to GetScheme(aScheme); } \
NS_IMETHOD GetAuthority(nsACString& aAuthority) override { return _to GetAuthority(aAuthority); } \
NS_IMETHOD GetPath(nsACString& aPath) override { return _to GetPath(aPath); } \
NS_IMETHOD GetHeaderNames(nsTArray<nsCString >& aHeaderNames) override { return _to GetHeaderNames(aHeaderNames); } \
NS_IMETHOD GetHeaderValues(nsTArray<nsCString >& aHeaderValues) override { return _to GetHeaderValues(aHeaderValues); } \
NS_IMETHOD GetContent(nsTArray<uint8_t >& aContent) override { return _to GetContent(aContent); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIBINARYHTTPREQUEST(_to) \
NS_IMETHOD GetMethod(nsACString& aMethod) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMethod(aMethod); } \
NS_IMETHOD GetScheme(nsACString& aScheme) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScheme(aScheme); } \
NS_IMETHOD GetAuthority(nsACString& aAuthority) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAuthority(aAuthority); } \
NS_IMETHOD GetPath(nsACString& aPath) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPath(aPath); } \
NS_IMETHOD GetHeaderNames(nsTArray<nsCString >& aHeaderNames) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHeaderNames(aHeaderNames); } \
NS_IMETHOD GetHeaderValues(nsTArray<nsCString >& aHeaderValues) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHeaderValues(aHeaderValues); } \
NS_IMETHOD GetContent(nsTArray<uint8_t >& aContent) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContent(aContent); }
/* starting interface: nsIBinaryHttpResponse */
#define NS_IBINARYHTTPRESPONSE_IID_STR "6ca85d9c-cdc5-45d4-9adc-005abedce9c9"
#define NS_IBINARYHTTPRESPONSE_IID \
{0x6ca85d9c, 0xcdc5, 0x45d4, \
{ 0x9a, 0xdc, 0x00, 0x5a, 0xbe, 0xdc, 0xe9, 0xc9 }}
class NS_NO_VTABLE nsIBinaryHttpResponse : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IBINARYHTTPRESPONSE_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIBinaryHttpResponse;
/* readonly attribute uint16_t status; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetStatus(uint16_t *aStatus) = 0;
/* readonly attribute Array<ACString> headerNames; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetHeaderNames(nsTArray<nsCString >& aHeaderNames) = 0;
/* readonly attribute Array<ACString> headerValues; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetHeaderValues(nsTArray<nsCString >& aHeaderValues) = 0;
/* readonly attribute Array<octet> content; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetContent(nsTArray<uint8_t >& aContent) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIBinaryHttpResponse, NS_IBINARYHTTPRESPONSE_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIBINARYHTTPRESPONSE \
NS_IMETHOD GetStatus(uint16_t *aStatus) override; \
NS_IMETHOD GetHeaderNames(nsTArray<nsCString >& aHeaderNames) override; \
NS_IMETHOD GetHeaderValues(nsTArray<nsCString >& aHeaderValues) override; \
NS_IMETHOD GetContent(nsTArray<uint8_t >& aContent) 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_NSIBINARYHTTPRESPONSE \
nsresult GetStatus(uint16_t *aStatus); \
nsresult GetHeaderNames(nsTArray<nsCString >& aHeaderNames); \
nsresult GetHeaderValues(nsTArray<nsCString >& aHeaderValues); \
nsresult GetContent(nsTArray<uint8_t >& aContent);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIBINARYHTTPRESPONSE(_to) \
NS_IMETHOD GetStatus(uint16_t *aStatus) override { return _to GetStatus(aStatus); } \
NS_IMETHOD GetHeaderNames(nsTArray<nsCString >& aHeaderNames) override { return _to GetHeaderNames(aHeaderNames); } \
NS_IMETHOD GetHeaderValues(nsTArray<nsCString >& aHeaderValues) override { return _to GetHeaderValues(aHeaderValues); } \
NS_IMETHOD GetContent(nsTArray<uint8_t >& aContent) override { return _to GetContent(aContent); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIBINARYHTTPRESPONSE(_to) \
NS_IMETHOD GetStatus(uint16_t *aStatus) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStatus(aStatus); } \
NS_IMETHOD GetHeaderNames(nsTArray<nsCString >& aHeaderNames) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHeaderNames(aHeaderNames); } \
NS_IMETHOD GetHeaderValues(nsTArray<nsCString >& aHeaderValues) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHeaderValues(aHeaderValues); } \
NS_IMETHOD GetContent(nsTArray<uint8_t >& aContent) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContent(aContent); }
/* starting interface: nsIBinaryHttp */
#define NS_IBINARYHTTP_IID_STR "b43b3f73-8160-4ab2-9f5d-4129a9708081"
#define NS_IBINARYHTTP_IID \
{0xb43b3f73, 0x8160, 0x4ab2, \
{ 0x9f, 0x5d, 0x41, 0x29, 0xa9, 0x70, 0x80, 0x81 }}
class NS_NO_VTABLE nsIBinaryHttp : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IBINARYHTTP_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIBinaryHttp;
/* Array<octet> encodeRequest (in nsIBinaryHttpRequest request); */
NS_IMETHOD EncodeRequest(nsIBinaryHttpRequest *request, nsTArray<uint8_t >& _retval) = 0;
/* nsIBinaryHttpRequest decodeRequest (in Array<octet> request); */
NS_IMETHOD DecodeRequest(const nsTArray<uint8_t >& request, nsIBinaryHttpRequest **_retval) = 0;
/* nsIBinaryHttpResponse decodeResponse (in Array<octet> response); */
NS_IMETHOD DecodeResponse(const nsTArray<uint8_t >& response, nsIBinaryHttpResponse **_retval) = 0;
/* Array<octet> encodeResponse (in nsIBinaryHttpResponse response); */
NS_IMETHOD EncodeResponse(nsIBinaryHttpResponse *response, nsTArray<uint8_t >& _retval) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIBinaryHttp, NS_IBINARYHTTP_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIBINARYHTTP \
NS_IMETHOD EncodeRequest(nsIBinaryHttpRequest *request, nsTArray<uint8_t >& _retval) override; \
NS_IMETHOD DecodeRequest(const nsTArray<uint8_t >& request, nsIBinaryHttpRequest **_retval) override; \
NS_IMETHOD DecodeResponse(const nsTArray<uint8_t >& response, nsIBinaryHttpResponse **_retval) override; \
NS_IMETHOD EncodeResponse(nsIBinaryHttpResponse *response, nsTArray<uint8_t >& _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_NSIBINARYHTTP \
nsresult EncodeRequest(nsIBinaryHttpRequest *request, nsTArray<uint8_t >& _retval); \
nsresult DecodeRequest(const nsTArray<uint8_t >& request, nsIBinaryHttpRequest **_retval); \
nsresult DecodeResponse(const nsTArray<uint8_t >& response, nsIBinaryHttpResponse **_retval); \
nsresult EncodeResponse(nsIBinaryHttpResponse *response, nsTArray<uint8_t >& _retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIBINARYHTTP(_to) \
NS_IMETHOD EncodeRequest(nsIBinaryHttpRequest *request, nsTArray<uint8_t >& _retval) override { return _to EncodeRequest(request, _retval); } \
NS_IMETHOD DecodeRequest(const nsTArray<uint8_t >& request, nsIBinaryHttpRequest **_retval) override { return _to DecodeRequest(request, _retval); } \
NS_IMETHOD DecodeResponse(const nsTArray<uint8_t >& response, nsIBinaryHttpResponse **_retval) override { return _to DecodeResponse(response, _retval); } \
NS_IMETHOD EncodeResponse(nsIBinaryHttpResponse *response, nsTArray<uint8_t >& _retval) override { return _to EncodeResponse(response, _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_NSIBINARYHTTP(_to) \
NS_IMETHOD EncodeRequest(nsIBinaryHttpRequest *request, nsTArray<uint8_t >& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EncodeRequest(request, _retval); } \
NS_IMETHOD DecodeRequest(const nsTArray<uint8_t >& request, nsIBinaryHttpRequest **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DecodeRequest(request, _retval); } \
NS_IMETHOD DecodeResponse(const nsTArray<uint8_t >& response, nsIBinaryHttpResponse **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DecodeResponse(response, _retval); } \
NS_IMETHOD EncodeResponse(nsIBinaryHttpResponse *response, nsTArray<uint8_t >& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EncodeResponse(response, _retval); }
#endif /* __gen_nsIBinaryHttp_h__ */