/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/netwerk/base/nsIProtocolHandler.idl
*/
#ifndef __gen_nsIProtocolHandler_h__
#define __gen_nsIProtocolHandler_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
// %{C++:8-20
#include "nsCOMPtr.h"
/**
* Protocol handlers are registered with XPCOM under the following CONTRACTID prefix:
*/
#define NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "@mozilla.org/network/protocol;1?name="
/**
* For example, "@mozilla.org/network/protocol;1?name=http"
*/
#if defined(MOZ_THUNDERBIRD) || defined(MOZ_SUITE)
#define IS_ORIGIN_IS_FULL_SPEC_DEFINED 1
#endif
// %}
class nsIURI; /* forward declaration */
class nsIChannel; /* forward declaration */
class nsILoadInfo; /* forward declaration */
/* starting interface: nsIProtocolHandlerWithDynamicFlags */
#define NS_IPROTOCOLHANDLERWITHDYNAMICFLAGS_IID_STR "65a8e823-0591-4fc0-a56a-03265e0a4ce8"
#define NS_IPROTOCOLHANDLERWITHDYNAMICFLAGS_IID \
{0x65a8e823, 0x0591, 0x4fc0, \
{ 0xa5, 0x6a, 0x03, 0x26, 0x5e, 0x0a, 0x4c, 0xe8 }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIProtocolHandlerWithDynamicFlags) nsIProtocolHandlerWithDynamicFlags : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IPROTOCOLHANDLERWITHDYNAMICFLAGS_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIProtocolHandlerWithDynamicFlags;
/* unsigned long getFlagsForURI (in nsIURI aURI); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIProtocolHandlerWithDynamicFlags_getFlagsForURI)
NS_IMETHOD GetFlagsForURI(nsIURI *aURI, uint32_t *_retval) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPROTOCOLHANDLERWITHDYNAMICFLAGS \
NS_IMETHOD GetFlagsForURI(nsIURI *aURI, uint32_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_NSIPROTOCOLHANDLERWITHDYNAMICFLAGS \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIProtocolHandlerWithDynamicFlags_getFlagsForURI)\
nsresult GetFlagsForURI(nsIURI *aURI, uint32_t *_retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPROTOCOLHANDLERWITHDYNAMICFLAGS(_to) \
NS_IMETHOD GetFlagsForURI(nsIURI *aURI, uint32_t *_retval) override { return _to GetFlagsForURI(aURI, _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_NSIPROTOCOLHANDLERWITHDYNAMICFLAGS(_to) \
NS_IMETHOD GetFlagsForURI(nsIURI *aURI, uint32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFlagsForURI(aURI, _retval); }
/* starting interface: nsIProtocolHandler */
#define NS_IPROTOCOLHANDLER_IID_STR "a87210e6-7c8c-41f7-864d-df809015193e"
#define NS_IPROTOCOLHANDLER_IID \
{0xa87210e6, 0x7c8c, 0x41f7, \
{ 0x86, 0x4d, 0xdf, 0x80, 0x90, 0x15, 0x19, 0x3e }}
class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIProtocolHandler) nsIProtocolHandler : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_IPROTOCOLHANDLER_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIProtocolHandler;
/* readonly attribute ACString scheme; */
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIProtocolHandler_scheme)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetScheme(nsACString& aScheme) = 0;
/* nsIChannel newChannel (in nsIURI aURI, in nsILoadInfo aLoadinfo); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIProtocolHandler_newChannel)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD NewChannel(nsIURI *aURI, nsILoadInfo *aLoadinfo, nsIChannel **_retval) = 0;
/* boolean allowPort (in long port, in string scheme); */
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIProtocolHandler_allowPort)
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AllowPort(int32_t port, const char * scheme, bool *_retval) = 0;
enum {
URI_STD MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_STD) = 0U,
URI_NORELATIVE MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_NORELATIVE) = 1U,
URI_NOAUTH MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_NOAUTH) = 2U,
ALLOWS_PROXY MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_ALLOWS_PROXY) = 4U,
ALLOWS_PROXY_HTTP MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_ALLOWS_PROXY_HTTP) = 8U,
URI_INHERITS_SECURITY_CONTEXT MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_INHERITS_SECURITY_CONTEXT) = 16U,
URI_FORBIDS_AUTOMATIC_DOCUMENT_REPLACEMENT MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_FORBIDS_AUTOMATIC_DOCUMENT_REPLACEMENT) = 32U,
URI_LOADABLE_BY_ANYONE MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_LOADABLE_BY_ANYONE) = 64U,
URI_DANGEROUS_TO_LOAD MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_DANGEROUS_TO_LOAD) = 128U,
URI_IS_UI_RESOURCE MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_IS_UI_RESOURCE) = 256U,
URI_IS_LOCAL_FILE MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_IS_LOCAL_FILE) = 512U,
URI_LOADABLE_BY_SUBSUMERS MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_LOADABLE_BY_SUBSUMERS) = 1024U,
URI_DOES_NOT_RETURN_DATA MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_DOES_NOT_RETURN_DATA) = 2048U,
URI_IS_LOCAL_RESOURCE MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_IS_LOCAL_RESOURCE) = 4096U,
URI_OPENING_EXECUTES_SCRIPT MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_OPENING_EXECUTES_SCRIPT) = 8192U,
URI_NON_PERSISTABLE MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_NON_PERSISTABLE) = 16384U,
URI_CROSS_ORIGIN_NEEDS_WEBAPPS_PERM MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_CROSS_ORIGIN_NEEDS_WEBAPPS_PERM) = 32768U,
URI_SYNC_LOAD_IS_OK MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_SYNC_LOAD_IS_OK) = 65536U,
URI_IS_POTENTIALLY_TRUSTWORTHY MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_IS_POTENTIALLY_TRUSTWORTHY) = 131072U,
URI_IS_WEBEXTENSION_RESOURCE MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_IS_WEBEXTENSION_RESOURCE) = 262144U,
ORIGIN_IS_FULL_SPEC MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_ORIGIN_IS_FULL_SPEC) = 524288U,
URI_SCHEME_NOT_SELF_LINKABLE MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_SCHEME_NOT_SELF_LINKABLE) = 1048576U,
URI_LOADABLE_BY_EXTENSIONS MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_LOADABLE_BY_EXTENSIONS) = 2097152U,
URI_FORBIDS_COOKIE_ACCESS MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_FORBIDS_COOKIE_ACCESS) = 4194304U,
URI_HAS_WEB_EXPOSED_ORIGIN MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_URI_HAS_WEB_EXPOSED_ORIGIN) = 8388608U,
DYNAMIC_URI_FLAGS MOZ_BINDING(binding_to, idl, const, XPIDL_nsIProtocolHandler_DYNAMIC_URI_FLAGS) = 2228416U
};
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPROTOCOLHANDLER \
NS_IMETHOD GetScheme(nsACString& aScheme) override; \
NS_IMETHOD NewChannel(nsIURI *aURI, nsILoadInfo *aLoadinfo, nsIChannel **_retval) override; \
NS_IMETHOD AllowPort(int32_t port, const char * scheme, 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_NSIPROTOCOLHANDLER \
MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIProtocolHandler_scheme)\
nsresult GetScheme(nsACString& aScheme); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIProtocolHandler_newChannel)\
nsresult NewChannel(nsIURI *aURI, nsILoadInfo *aLoadinfo, nsIChannel **_retval); \
MOZ_BINDING(binding_to, idl, method, XPIDL_nsIProtocolHandler_allowPort)\
nsresult AllowPort(int32_t port, const char * scheme, bool *_retval); \
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPROTOCOLHANDLER(_to) \
NS_IMETHOD GetScheme(nsACString& aScheme) override { return _to GetScheme(aScheme); } \
NS_IMETHOD NewChannel(nsIURI *aURI, nsILoadInfo *aLoadinfo, nsIChannel **_retval) override { return _to NewChannel(aURI, aLoadinfo, _retval); } \
NS_IMETHOD AllowPort(int32_t port, const char * scheme, bool *_retval) override { return _to AllowPort(port, scheme, _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_NSIPROTOCOLHANDLER(_to) \
NS_IMETHOD GetScheme(nsACString& aScheme) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScheme(aScheme); } \
NS_IMETHOD NewChannel(nsIURI *aURI, nsILoadInfo *aLoadinfo, nsIChannel **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NewChannel(aURI, aLoadinfo, _retval); } \
NS_IMETHOD AllowPort(int32_t port, const char * scheme, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AllowPort(port, scheme, _retval); } \
#endif /* __gen_nsIProtocolHandler_h__ */