Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/security/manager/ssl/nsICertOverrideService.idl
*/
#ifndef __gen_nsICertOverrideService_h__
#define __gen_nsICertOverrideService_h__
#include "nsISupports.h"
#include "nsTArray.h"
#include "js/Value.h"
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIArray; /* forward declaration */
class nsIX509Cert; /* forward declaration */
#define NS_CERTOVERRIDE_CONTRACTID "@mozilla.org/security/certoverride;1"
namespace mozilla {
class OriginAttributes;
}
/* starting interface: nsICertOverride */
#define NS_ICERTOVERRIDE_IID_STR "ed735e24-fa55-4163-906d-17fb78851fe1"
#define NS_ICERTOVERRIDE_IID \
{0xed735e24, 0xfa55, 0x4163, \
{ 0x90, 0x6d, 0x17, 0xfb, 0x78, 0x85, 0x1f, 0xe1 }}
class NS_NO_VTABLE nsICertOverride : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICERTOVERRIDE_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsICertOverride;
/* readonly attribute ACString asciiHost; */
NS_IMETHOD GetAsciiHost(nsACString& aAsciiHost) = 0;
/* readonly attribute int32_t port; */
NS_IMETHOD GetPort(int32_t *aPort) = 0;
/* readonly attribute ACString hostPort; */
NS_IMETHOD GetHostPort(nsACString& aHostPort) = 0;
/* readonly attribute ACString fingerprint; */
NS_IMETHOD GetFingerprint(nsACString& aFingerprint) = 0;
/* [implicit_jscontext] readonly attribute jsval originAttributes; */
NS_IMETHOD GetOriginAttributes(JSContext* cx, JS::MutableHandle<JS::Value> aOriginAttributes) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsICertOverride, NS_ICERTOVERRIDE_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSICERTOVERRIDE \
NS_IMETHOD GetAsciiHost(nsACString& aAsciiHost) override; \
NS_IMETHOD GetPort(int32_t *aPort) override; \
NS_IMETHOD GetHostPort(nsACString& aHostPort) override; \
NS_IMETHOD GetFingerprint(nsACString& aFingerprint) override; \
NS_IMETHOD GetOriginAttributes(JSContext* cx, JS::MutableHandle<JS::Value> aOriginAttributes) 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_NSICERTOVERRIDE \
nsresult GetAsciiHost(nsACString& aAsciiHost); \
nsresult GetPort(int32_t *aPort); \
nsresult GetHostPort(nsACString& aHostPort); \
nsresult GetFingerprint(nsACString& aFingerprint); \
nsresult GetOriginAttributes(JSContext* cx, JS::MutableHandle<JS::Value> aOriginAttributes);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSICERTOVERRIDE(_to) \
NS_IMETHOD GetAsciiHost(nsACString& aAsciiHost) override { return _to GetAsciiHost(aAsciiHost); } \
NS_IMETHOD GetPort(int32_t *aPort) override { return _to GetPort(aPort); } \
NS_IMETHOD GetHostPort(nsACString& aHostPort) override { return _to GetHostPort(aHostPort); } \
NS_IMETHOD GetFingerprint(nsACString& aFingerprint) override { return _to GetFingerprint(aFingerprint); } \
NS_IMETHOD GetOriginAttributes(JSContext* cx, JS::MutableHandle<JS::Value> aOriginAttributes) override { return _to GetOriginAttributes(cx, aOriginAttributes); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSICERTOVERRIDE(_to) \
NS_IMETHOD GetAsciiHost(nsACString& aAsciiHost) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsciiHost(aAsciiHost); } \
NS_IMETHOD GetPort(int32_t *aPort) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPort(aPort); } \
NS_IMETHOD GetHostPort(nsACString& aHostPort) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHostPort(aHostPort); } \
NS_IMETHOD GetFingerprint(nsACString& aFingerprint) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFingerprint(aFingerprint); } \
NS_IMETHOD GetOriginAttributes(JSContext* cx, JS::MutableHandle<JS::Value> aOriginAttributes) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOriginAttributes(cx, aOriginAttributes); }
/* starting interface: nsICertOverrideService */
#define NS_ICERTOVERRIDESERVICE_IID_STR "be019e47-22fc-4355-9f16-9ab047d6742d"
#define NS_ICERTOVERRIDESERVICE_IID \
{0xbe019e47, 0x22fc, 0x4355, \
{ 0x9f, 0x16, 0x9a, 0xb0, 0x47, 0xd6, 0x74, 0x2d }}
class NS_NO_VTABLE nsICertOverrideService : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICERTOVERRIDESERVICE_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsICertOverrideService;
/* [binaryname(RememberValidityOverride),must_use,noscript] void rememberValidityOverrideNative (in AUTF8String aHostName, in int32_t aPort, in const_OriginAttributesRef aOriginAttributes, in nsIX509Cert aCert, in boolean aTemporary); */
[[nodiscard]] NS_IMETHOD RememberValidityOverride(const nsACString& aHostName, int32_t aPort, const mozilla::OriginAttributes & aOriginAttributes, nsIX509Cert *aCert, bool aTemporary) = 0;
/* [binaryname(RememberValidityOverrideScriptable),implicit_jscontext,must_use] void rememberValidityOverride (in AUTF8String aHostName, in int32_t aPort, in jsval aOriginAttributes, in nsIX509Cert aCert, in boolean aTemporary); */
[[nodiscard]] NS_IMETHOD RememberValidityOverrideScriptable(const nsACString& aHostName, int32_t aPort, JS::Handle<JS::Value> aOriginAttributes, nsIX509Cert *aCert, bool aTemporary, JSContext* cx) = 0;
/* [binaryname(HasMatchingOverride),must_use,noscript] boolean hasMatchingOverrideNative (in AUTF8String aHostName, in int32_t aPort, in const_OriginAttributesRef aOriginAttributes, in nsIX509Cert aCert, out boolean aIsTemporary); */
[[nodiscard]] NS_IMETHOD HasMatchingOverride(const nsACString& aHostName, int32_t aPort, const mozilla::OriginAttributes & aOriginAttributes, nsIX509Cert *aCert, bool *aIsTemporary, bool *_retval) = 0;
/* [binaryname(HasMatchingOverrideScriptable),implicit_jscontext,must_use] boolean hasMatchingOverride (in AUTF8String aHostName, in int32_t aPort, in jsval aOriginAttributes, in nsIX509Cert aCert, out boolean aIsTemporary); */
[[nodiscard]] NS_IMETHOD HasMatchingOverrideScriptable(const nsACString& aHostName, int32_t aPort, JS::Handle<JS::Value> aOriginAttributes, nsIX509Cert *aCert, bool *aIsTemporary, JSContext* cx, bool *_retval) = 0;
/* [binaryname(ClearValidityOverride),noscript] void clearValidityOverrideNative (in AUTF8String aHostName, in int32_t aPort, in const_OriginAttributesRef aOriginAttributes); */
NS_IMETHOD ClearValidityOverride(const nsACString& aHostName, int32_t aPort, const mozilla::OriginAttributes & aOriginAttributes) = 0;
/* [binaryname(ClearValidityOverrideScriptable),implicit_jscontext] void clearValidityOverride (in AUTF8String aHostName, in int32_t aPort, in jsval aOriginAttributes); */
NS_IMETHOD ClearValidityOverrideScriptable(const nsACString& aHostName, int32_t aPort, JS::Handle<JS::Value> aOriginAttributes, JSContext* cx) = 0;
/* void clearAllOverrides (); */
NS_IMETHOD ClearAllOverrides(void) = 0;
/* Array<nsICertOverride> getOverrides (); */
NS_IMETHOD GetOverrides(nsTArray<RefPtr<nsICertOverride>>& _retval) = 0;
/* void setDisableAllSecurityChecksAndLetAttackersInterceptMyData (in boolean aDisable); */
NS_IMETHOD SetDisableAllSecurityChecksAndLetAttackersInterceptMyData(bool aDisable) = 0;
/* readonly attribute boolean securityCheckDisabled; */
NS_IMETHOD GetSecurityCheckDisabled(bool *aSecurityCheckDisabled) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsICertOverrideService, NS_ICERTOVERRIDESERVICE_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSICERTOVERRIDESERVICE \
[[nodiscard]] NS_IMETHOD RememberValidityOverride(const nsACString& aHostName, int32_t aPort, const mozilla::OriginAttributes & aOriginAttributes, nsIX509Cert *aCert, bool aTemporary) override; \
[[nodiscard]] NS_IMETHOD RememberValidityOverrideScriptable(const nsACString& aHostName, int32_t aPort, JS::Handle<JS::Value> aOriginAttributes, nsIX509Cert *aCert, bool aTemporary, JSContext* cx) override; \
[[nodiscard]] NS_IMETHOD HasMatchingOverride(const nsACString& aHostName, int32_t aPort, const mozilla::OriginAttributes & aOriginAttributes, nsIX509Cert *aCert, bool *aIsTemporary, bool *_retval) override; \
[[nodiscard]] NS_IMETHOD HasMatchingOverrideScriptable(const nsACString& aHostName, int32_t aPort, JS::Handle<JS::Value> aOriginAttributes, nsIX509Cert *aCert, bool *aIsTemporary, JSContext* cx, bool *_retval) override; \
NS_IMETHOD ClearValidityOverride(const nsACString& aHostName, int32_t aPort, const mozilla::OriginAttributes & aOriginAttributes) override; \
NS_IMETHOD ClearValidityOverrideScriptable(const nsACString& aHostName, int32_t aPort, JS::Handle<JS::Value> aOriginAttributes, JSContext* cx) override; \
NS_IMETHOD ClearAllOverrides(void) override; \
NS_IMETHOD GetOverrides(nsTArray<RefPtr<nsICertOverride>>& _retval) override; \
NS_IMETHOD SetDisableAllSecurityChecksAndLetAttackersInterceptMyData(bool aDisable) override; \
NS_IMETHOD GetSecurityCheckDisabled(bool *aSecurityCheckDisabled) 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_NSICERTOVERRIDESERVICE \
[[nodiscard]] nsresult RememberValidityOverride(const nsACString& aHostName, int32_t aPort, const mozilla::OriginAttributes & aOriginAttributes, nsIX509Cert *aCert, bool aTemporary); \
[[nodiscard]] nsresult RememberValidityOverrideScriptable(const nsACString& aHostName, int32_t aPort, JS::Handle<JS::Value> aOriginAttributes, nsIX509Cert *aCert, bool aTemporary, JSContext* cx); \
[[nodiscard]] nsresult HasMatchingOverride(const nsACString& aHostName, int32_t aPort, const mozilla::OriginAttributes & aOriginAttributes, nsIX509Cert *aCert, bool *aIsTemporary, bool *_retval); \
[[nodiscard]] nsresult HasMatchingOverrideScriptable(const nsACString& aHostName, int32_t aPort, JS::Handle<JS::Value> aOriginAttributes, nsIX509Cert *aCert, bool *aIsTemporary, JSContext* cx, bool *_retval); \
nsresult ClearValidityOverride(const nsACString& aHostName, int32_t aPort, const mozilla::OriginAttributes & aOriginAttributes); \
nsresult ClearValidityOverrideScriptable(const nsACString& aHostName, int32_t aPort, JS::Handle<JS::Value> aOriginAttributes, JSContext* cx); \
nsresult ClearAllOverrides(void); \
nsresult GetOverrides(nsTArray<RefPtr<nsICertOverride>>& _retval); \
nsresult SetDisableAllSecurityChecksAndLetAttackersInterceptMyData(bool aDisable); \
nsresult GetSecurityCheckDisabled(bool *aSecurityCheckDisabled);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSICERTOVERRIDESERVICE(_to) \
[[nodiscard]] NS_IMETHOD RememberValidityOverride(const nsACString& aHostName, int32_t aPort, const mozilla::OriginAttributes & aOriginAttributes, nsIX509Cert *aCert, bool aTemporary) override { return _to RememberValidityOverride(aHostName, aPort, aOriginAttributes, aCert, aTemporary); } \
[[nodiscard]] NS_IMETHOD RememberValidityOverrideScriptable(const nsACString& aHostName, int32_t aPort, JS::Handle<JS::Value> aOriginAttributes, nsIX509Cert *aCert, bool aTemporary, JSContext* cx) override { return _to RememberValidityOverrideScriptable(aHostName, aPort, aOriginAttributes, aCert, aTemporary, cx); } \
[[nodiscard]] NS_IMETHOD HasMatchingOverride(const nsACString& aHostName, int32_t aPort, const mozilla::OriginAttributes & aOriginAttributes, nsIX509Cert *aCert, bool *aIsTemporary, bool *_retval) override { return _to HasMatchingOverride(aHostName, aPort, aOriginAttributes, aCert, aIsTemporary, _retval); } \
[[nodiscard]] NS_IMETHOD HasMatchingOverrideScriptable(const nsACString& aHostName, int32_t aPort, JS::Handle<JS::Value> aOriginAttributes, nsIX509Cert *aCert, bool *aIsTemporary, JSContext* cx, bool *_retval) override { return _to HasMatchingOverrideScriptable(aHostName, aPort, aOriginAttributes, aCert, aIsTemporary, cx, _retval); } \
NS_IMETHOD ClearValidityOverride(const nsACString& aHostName, int32_t aPort, const mozilla::OriginAttributes & aOriginAttributes) override { return _to ClearValidityOverride(aHostName, aPort, aOriginAttributes); } \
NS_IMETHOD ClearValidityOverrideScriptable(const nsACString& aHostName, int32_t aPort, JS::Handle<JS::Value> aOriginAttributes, JSContext* cx) override { return _to ClearValidityOverrideScriptable(aHostName, aPort, aOriginAttributes, cx); } \
NS_IMETHOD ClearAllOverrides(void) override { return _to ClearAllOverrides(); } \
NS_IMETHOD GetOverrides(nsTArray<RefPtr<nsICertOverride>>& _retval) override { return _to GetOverrides(_retval); } \
NS_IMETHOD SetDisableAllSecurityChecksAndLetAttackersInterceptMyData(bool aDisable) override { return _to SetDisableAllSecurityChecksAndLetAttackersInterceptMyData(aDisable); } \
NS_IMETHOD GetSecurityCheckDisabled(bool *aSecurityCheckDisabled) override { return _to GetSecurityCheckDisabled(aSecurityCheckDisabled); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSICERTOVERRIDESERVICE(_to) \
[[nodiscard]] NS_IMETHOD RememberValidityOverride(const nsACString& aHostName, int32_t aPort, const mozilla::OriginAttributes & aOriginAttributes, nsIX509Cert *aCert, bool aTemporary) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RememberValidityOverride(aHostName, aPort, aOriginAttributes, aCert, aTemporary); } \
[[nodiscard]] NS_IMETHOD RememberValidityOverrideScriptable(const nsACString& aHostName, int32_t aPort, JS::Handle<JS::Value> aOriginAttributes, nsIX509Cert *aCert, bool aTemporary, JSContext* cx) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RememberValidityOverrideScriptable(aHostName, aPort, aOriginAttributes, aCert, aTemporary, cx); } \
[[nodiscard]] NS_IMETHOD HasMatchingOverride(const nsACString& aHostName, int32_t aPort, const mozilla::OriginAttributes & aOriginAttributes, nsIX509Cert *aCert, bool *aIsTemporary, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HasMatchingOverride(aHostName, aPort, aOriginAttributes, aCert, aIsTemporary, _retval); } \
[[nodiscard]] NS_IMETHOD HasMatchingOverrideScriptable(const nsACString& aHostName, int32_t aPort, JS::Handle<JS::Value> aOriginAttributes, nsIX509Cert *aCert, bool *aIsTemporary, JSContext* cx, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HasMatchingOverrideScriptable(aHostName, aPort, aOriginAttributes, aCert, aIsTemporary, cx, _retval); } \
NS_IMETHOD ClearValidityOverride(const nsACString& aHostName, int32_t aPort, const mozilla::OriginAttributes & aOriginAttributes) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearValidityOverride(aHostName, aPort, aOriginAttributes); } \
NS_IMETHOD ClearValidityOverrideScriptable(const nsACString& aHostName, int32_t aPort, JS::Handle<JS::Value> aOriginAttributes, JSContext* cx) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearValidityOverrideScriptable(aHostName, aPort, aOriginAttributes, cx); } \
NS_IMETHOD ClearAllOverrides(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearAllOverrides(); } \
NS_IMETHOD GetOverrides(nsTArray<RefPtr<nsICertOverride>>& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOverrides(_retval); } \
NS_IMETHOD SetDisableAllSecurityChecksAndLetAttackersInterceptMyData(bool aDisable) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDisableAllSecurityChecksAndLetAttackersInterceptMyData(aDisable); } \
NS_IMETHOD GetSecurityCheckDisabled(bool *aSecurityCheckDisabled) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSecurityCheckDisabled(aSecurityCheckDisabled); }
#endif /* __gen_nsICertOverrideService_h__ */