Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/netwerk/base/nsIInterceptionInfo.idl
*/
#ifndef __gen_nsIInterceptionInfo_h__
#define __gen_nsIInterceptionInfo_h__
#include "nsISupports.h"
#include "nsIContentPolicy.h"
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIPrincipal; /* forward declaration */
class nsIRedirectHistoryEntry; /* forward declaration */
#include "nsTArray.h"
/* starting interface: nsIInterceptionInfo */
#define NS_IINTERCEPTIONINFO_IID_STR "8b9cd81f-3cd1-4f6a-9086-92a9bbf055f4"
#define NS_IINTERCEPTIONINFO_IID \
{0x8b9cd81f, 0x3cd1, 0x4f6a, \
{ 0x90, 0x86, 0x92, 0xa9, 0xbb, 0xf0, 0x55, 0xf4 }}
class nsIInterceptionInfo : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IINTERCEPTIONINFO_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIInterceptionInfo;
/* [binaryname(TriggeringPrincipal),noscript,nostdcall,notxpcom] nsIPrincipal binaryTriggeringPrincipal (); */
virtual nsIPrincipal * TriggeringPrincipal(void) = 0;
/* [binaryname(SetTriggeringPrincipal),noscript,nostdcall,notxpcom] void binarySetTriggeringPrincipal (in nsIPrincipal aPrincipal); */
virtual void SetTriggeringPrincipal(nsIPrincipal *aPrincipal) = 0;
/* [binaryname(ContentPolicyType),noscript,nostdcall,notxpcom] nsContentPolicyType binaryContentPolicyType (); */
virtual nsContentPolicyType ContentPolicyType(void) = 0;
/* [binaryname(ExternalContentPolicyType),noscript,nostdcall,notxpcom] nsContentPolicyType binaryExternalContentPolicyType (); */
virtual nsContentPolicyType ExternalContentPolicyType(void) = 0;
/* [binaryname(SetContentPolicyType),noscript,nostdcall,notxpcom] void binarySetContentPolicyType (in nsContentPolicyType aContentPolicyType); */
virtual void SetContentPolicyType(nsContentPolicyType aContentPolicyType) = 0;
inline ExtContentPolicyType GetExtContentPolicyType()
{
return static_cast<ExtContentPolicyType>(ExternalContentPolicyType());
}
/* [binaryname(RedirectChain),noscript,nostdcall,notxpcom] nsIRedirectHistoryEntryArray binaryRedirectChain (); */
virtual const nsTArray<nsCOMPtr<nsIRedirectHistoryEntry>> & RedirectChain(void) = 0;
/* [binaryname(SetRedirectChain),noscript,nostdcall,notxpcom] void binarySetRedirectChain (in nsIRedirectHistoryEntryArray aRedirectChain); */
virtual void SetRedirectChain(const nsTArray<nsCOMPtr<nsIRedirectHistoryEntry>> & aRedirectChain) = 0;
/* [binaryname(FromThirdParty),noscript,nostdcall,notxpcom] boolean binaryFromThirdParty (); */
virtual bool FromThirdParty(void) = 0;
/* [binaryname(SetFromThirdParty),noscript,nostdcall,notxpcom] void binarySetFromThirdParty (in boolean aFromThirdParty); */
virtual void SetFromThirdParty(bool aFromThirdParty) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIInterceptionInfo, NS_IINTERCEPTIONINFO_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIINTERCEPTIONINFO \
virtual nsIPrincipal * TriggeringPrincipal(void) override; \
virtual void SetTriggeringPrincipal(nsIPrincipal *aPrincipal) override; \
virtual nsContentPolicyType ContentPolicyType(void) override; \
virtual nsContentPolicyType ExternalContentPolicyType(void) override; \
virtual void SetContentPolicyType(nsContentPolicyType aContentPolicyType) override; \
virtual const nsTArray<nsCOMPtr<nsIRedirectHistoryEntry>> & RedirectChain(void) override; \
virtual void SetRedirectChain(const nsTArray<nsCOMPtr<nsIRedirectHistoryEntry>> & aRedirectChain) override; \
virtual bool FromThirdParty(void) override; \
virtual void SetFromThirdParty(bool aFromThirdParty) 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_NSIINTERCEPTIONINFO \
nsIPrincipal * TriggeringPrincipal(void); \
void SetTriggeringPrincipal(nsIPrincipal *aPrincipal); \
nsContentPolicyType ContentPolicyType(void); \
nsContentPolicyType ExternalContentPolicyType(void); \
void SetContentPolicyType(nsContentPolicyType aContentPolicyType); \
const nsTArray<nsCOMPtr<nsIRedirectHistoryEntry>> & RedirectChain(void); \
void SetRedirectChain(const nsTArray<nsCOMPtr<nsIRedirectHistoryEntry>> & aRedirectChain); \
bool FromThirdParty(void); \
void SetFromThirdParty(bool aFromThirdParty);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIINTERCEPTIONINFO(_to) \
virtual nsIPrincipal * TriggeringPrincipal(void) override { return _to TriggeringPrincipal(); } \
virtual void SetTriggeringPrincipal(nsIPrincipal *aPrincipal) override { return _to SetTriggeringPrincipal(aPrincipal); } \
virtual nsContentPolicyType ContentPolicyType(void) override { return _to ContentPolicyType(); } \
virtual nsContentPolicyType ExternalContentPolicyType(void) override { return _to ExternalContentPolicyType(); } \
virtual void SetContentPolicyType(nsContentPolicyType aContentPolicyType) override { return _to SetContentPolicyType(aContentPolicyType); } \
virtual const nsTArray<nsCOMPtr<nsIRedirectHistoryEntry>> & RedirectChain(void) override { return _to RedirectChain(); } \
virtual void SetRedirectChain(const nsTArray<nsCOMPtr<nsIRedirectHistoryEntry>> & aRedirectChain) override { return _to SetRedirectChain(aRedirectChain); } \
virtual bool FromThirdParty(void) override { return _to FromThirdParty(); } \
virtual void SetFromThirdParty(bool aFromThirdParty) override { return _to SetFromThirdParty(aFromThirdParty); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIINTERCEPTIONINFO(_to) \
virtual nsIPrincipal * TriggeringPrincipal(void) override; \
virtual void SetTriggeringPrincipal(nsIPrincipal *aPrincipal) override; \
virtual nsContentPolicyType ContentPolicyType(void) override; \
virtual nsContentPolicyType ExternalContentPolicyType(void) override; \
virtual void SetContentPolicyType(nsContentPolicyType aContentPolicyType) override; \
virtual const nsTArray<nsCOMPtr<nsIRedirectHistoryEntry>> & RedirectChain(void) override; \
virtual void SetRedirectChain(const nsTArray<nsCOMPtr<nsIRedirectHistoryEntry>> & aRedirectChain) override; \
virtual bool FromThirdParty(void) override; \
virtual void SetFromThirdParty(bool aFromThirdParty) override;
#endif /* __gen_nsIInterceptionInfo_h__ */