Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/security/manager/ssl/nsISiteSecurityService.idl
*/
#ifndef __gen_nsISiteSecurityService_h__
#define __gen_nsISiteSecurityService_h__
#include "nsISupports.h"
#include "js/Value.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 nsIURI; /* forward declaration */
/* starting interface: nsISiteSecurityService */
#define NS_ISITESECURITYSERVICE_IID_STR "275127f8-dbd7-4681-afbf-6df0c6587a01"
#define NS_ISITESECURITYSERVICE_IID \
{0x275127f8, 0xdbd7, 0x4681, \
{ 0xaf, 0xbf, 0x6d, 0xf0, 0xc6, 0x58, 0x7a, 0x01 }}
class NS_NO_VTABLE nsISiteSecurityService : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISITESECURITYSERVICE_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsISiteSecurityService;
enum {
Success = 0U,
ERROR_UNKNOWN = 1U,
ERROR_COULD_NOT_PARSE_HEADER = 3U,
ERROR_NO_MAX_AGE = 4U,
ERROR_MULTIPLE_MAX_AGES = 5U,
ERROR_INVALID_MAX_AGE = 6U,
ERROR_MULTIPLE_INCLUDE_SUBDOMAINS = 7U,
ERROR_INVALID_INCLUDE_SUBDOMAINS = 8U,
ERROR_COULD_NOT_SAVE_STATE = 13U
};
/* [binaryname(ProcessHeader),must_use,noscript] void processHeaderNative (in nsIURI aSourceURI, in ACString aHeader, in const_OriginAttributesRef aOriginAttributes, [optional] out unsigned long long aMaxAge, [optional] out boolean aIncludeSubdomains, [optional] out uint32_t aFailureResult); */
[[nodiscard]] NS_IMETHOD ProcessHeader(nsIURI *aSourceURI, const nsACString& aHeader, const mozilla::OriginAttributes & aOriginAttributes, uint64_t *aMaxAge = nullptr, bool *aIncludeSubdomains = nullptr, uint32_t *aFailureResult = nullptr) = 0;
/* [binaryname(ProcessHeaderScriptable),implicit_jscontext,must_use,optional_argc] void processHeader (in nsIURI aSourceURI, in ACString aHeader, [optional] in jsval aOriginAttributes, [optional] out unsigned long long aMaxAge, [optional] out boolean aIncludeSubdomains, [optional] out uint32_t aFailureResult); */
JS_HAZ_CAN_RUN_SCRIPT [[nodiscard]] NS_IMETHOD ProcessHeaderScriptable(nsIURI *aSourceURI, const nsACString& aHeader, JS::Handle<JS::Value> aOriginAttributes, uint64_t *aMaxAge, bool *aIncludeSubdomains, uint32_t *aFailureResult, JSContext* cx, uint8_t _argc) = 0;
enum ResetStateBy : uint8_t {
ExactDomain = 0,
RootDomain = 1,
BaseDomain = 2,
};
/* [implicit_jscontext,must_use,optional_argc] void resetState (in nsIURI aURI, [optional] in jsval aOriginAttributes, [optional] in nsISiteSecurityService_ResetStateBy aScope); */
JS_HAZ_CAN_RUN_SCRIPT [[nodiscard]] NS_IMETHOD ResetState(nsIURI *aURI, JS::Handle<JS::Value> aOriginAttributes, nsISiteSecurityService::ResetStateBy aScope, JSContext* cx, uint8_t _argc) = 0;
/* [binaryname(IsSecureURI),must_use,noscript] boolean isSecureURINative (in nsIURI aURI, in const_OriginAttributesRef aOriginAttributes); */
[[nodiscard]] NS_IMETHOD IsSecureURI(nsIURI *aURI, const mozilla::OriginAttributes & aOriginAttributes, bool *_retval) = 0;
/* [binaryname(IsSecureURIScriptable),implicit_jscontext,must_use,optional_argc] boolean isSecureURI (in nsIURI aURI, [optional] in jsval aOriginAttributes); */
JS_HAZ_CAN_RUN_SCRIPT [[nodiscard]] NS_IMETHOD IsSecureURIScriptable(nsIURI *aURI, JS::Handle<JS::Value> aOriginAttributes, JSContext* cx, uint8_t _argc, bool *_retval) = 0;
/* [must_use] void clearAll (); */
JS_HAZ_CAN_RUN_SCRIPT [[nodiscard]] NS_IMETHOD ClearAll(void) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsISiteSecurityService, NS_ISITESECURITYSERVICE_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSISITESECURITYSERVICE \
[[nodiscard]] NS_IMETHOD ProcessHeader(nsIURI *aSourceURI, const nsACString& aHeader, const mozilla::OriginAttributes & aOriginAttributes, uint64_t *aMaxAge = nullptr, bool *aIncludeSubdomains = nullptr, uint32_t *aFailureResult = nullptr) override; \
[[nodiscard]] NS_IMETHOD ProcessHeaderScriptable(nsIURI *aSourceURI, const nsACString& aHeader, JS::Handle<JS::Value> aOriginAttributes, uint64_t *aMaxAge, bool *aIncludeSubdomains, uint32_t *aFailureResult, JSContext* cx, uint8_t _argc) override; \
[[nodiscard]] NS_IMETHOD ResetState(nsIURI *aURI, JS::Handle<JS::Value> aOriginAttributes, nsISiteSecurityService::ResetStateBy aScope, JSContext* cx, uint8_t _argc) override; \
[[nodiscard]] NS_IMETHOD IsSecureURI(nsIURI *aURI, const mozilla::OriginAttributes & aOriginAttributes, bool *_retval) override; \
[[nodiscard]] NS_IMETHOD IsSecureURIScriptable(nsIURI *aURI, JS::Handle<JS::Value> aOriginAttributes, JSContext* cx, uint8_t _argc, bool *_retval) override; \
[[nodiscard]] NS_IMETHOD ClearAll(void) 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_NSISITESECURITYSERVICE \
[[nodiscard]] nsresult ProcessHeader(nsIURI *aSourceURI, const nsACString& aHeader, const mozilla::OriginAttributes & aOriginAttributes, uint64_t *aMaxAge = nullptr, bool *aIncludeSubdomains = nullptr, uint32_t *aFailureResult = nullptr); \
[[nodiscard]] nsresult ProcessHeaderScriptable(nsIURI *aSourceURI, const nsACString& aHeader, JS::Handle<JS::Value> aOriginAttributes, uint64_t *aMaxAge, bool *aIncludeSubdomains, uint32_t *aFailureResult, JSContext* cx, uint8_t _argc); \
[[nodiscard]] nsresult ResetState(nsIURI *aURI, JS::Handle<JS::Value> aOriginAttributes, nsISiteSecurityService::ResetStateBy aScope, JSContext* cx, uint8_t _argc); \
[[nodiscard]] nsresult IsSecureURI(nsIURI *aURI, const mozilla::OriginAttributes & aOriginAttributes, bool *_retval); \
[[nodiscard]] nsresult IsSecureURIScriptable(nsIURI *aURI, JS::Handle<JS::Value> aOriginAttributes, JSContext* cx, uint8_t _argc, bool *_retval); \
[[nodiscard]] nsresult ClearAll(void);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSISITESECURITYSERVICE(_to) \
[[nodiscard]] NS_IMETHOD ProcessHeader(nsIURI *aSourceURI, const nsACString& aHeader, const mozilla::OriginAttributes & aOriginAttributes, uint64_t *aMaxAge = nullptr, bool *aIncludeSubdomains = nullptr, uint32_t *aFailureResult = nullptr) override { return _to ProcessHeader(aSourceURI, aHeader, aOriginAttributes, aMaxAge, aIncludeSubdomains, aFailureResult); } \
[[nodiscard]] NS_IMETHOD ProcessHeaderScriptable(nsIURI *aSourceURI, const nsACString& aHeader, JS::Handle<JS::Value> aOriginAttributes, uint64_t *aMaxAge, bool *aIncludeSubdomains, uint32_t *aFailureResult, JSContext* cx, uint8_t _argc) override { return _to ProcessHeaderScriptable(aSourceURI, aHeader, aOriginAttributes, aMaxAge, aIncludeSubdomains, aFailureResult, cx, _argc); } \
[[nodiscard]] NS_IMETHOD ResetState(nsIURI *aURI, JS::Handle<JS::Value> aOriginAttributes, nsISiteSecurityService::ResetStateBy aScope, JSContext* cx, uint8_t _argc) override { return _to ResetState(aURI, aOriginAttributes, aScope, cx, _argc); } \
[[nodiscard]] NS_IMETHOD IsSecureURI(nsIURI *aURI, const mozilla::OriginAttributes & aOriginAttributes, bool *_retval) override { return _to IsSecureURI(aURI, aOriginAttributes, _retval); } \
[[nodiscard]] NS_IMETHOD IsSecureURIScriptable(nsIURI *aURI, JS::Handle<JS::Value> aOriginAttributes, JSContext* cx, uint8_t _argc, bool *_retval) override { return _to IsSecureURIScriptable(aURI, aOriginAttributes, cx, _argc, _retval); } \
[[nodiscard]] NS_IMETHOD ClearAll(void) override { return _to ClearAll(); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSISITESECURITYSERVICE(_to) \
[[nodiscard]] NS_IMETHOD ProcessHeader(nsIURI *aSourceURI, const nsACString& aHeader, const mozilla::OriginAttributes & aOriginAttributes, uint64_t *aMaxAge = nullptr, bool *aIncludeSubdomains = nullptr, uint32_t *aFailureResult = nullptr) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ProcessHeader(aSourceURI, aHeader, aOriginAttributes, aMaxAge, aIncludeSubdomains, aFailureResult); } \
[[nodiscard]] NS_IMETHOD ProcessHeaderScriptable(nsIURI *aSourceURI, const nsACString& aHeader, JS::Handle<JS::Value> aOriginAttributes, uint64_t *aMaxAge, bool *aIncludeSubdomains, uint32_t *aFailureResult, JSContext* cx, uint8_t _argc) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ProcessHeaderScriptable(aSourceURI, aHeader, aOriginAttributes, aMaxAge, aIncludeSubdomains, aFailureResult, cx, _argc); } \
[[nodiscard]] NS_IMETHOD ResetState(nsIURI *aURI, JS::Handle<JS::Value> aOriginAttributes, nsISiteSecurityService::ResetStateBy aScope, JSContext* cx, uint8_t _argc) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ResetState(aURI, aOriginAttributes, aScope, cx, _argc); } \
[[nodiscard]] NS_IMETHOD IsSecureURI(nsIURI *aURI, const mozilla::OriginAttributes & aOriginAttributes, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsSecureURI(aURI, aOriginAttributes, _retval); } \
[[nodiscard]] NS_IMETHOD IsSecureURIScriptable(nsIURI *aURI, JS::Handle<JS::Value> aOriginAttributes, JSContext* cx, uint8_t _argc, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsSecureURIScriptable(aURI, aOriginAttributes, cx, _argc, _retval); } \
[[nodiscard]] NS_IMETHOD ClearAll(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearAll(); }
#define NS_SSSERVICE_CONTRACTID "@mozilla.org/ssservice;1"
#endif /* __gen_nsISiteSecurityService_h__ */