Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/components/antitracking/bouncetrackingprotection/nsIBounceTrackingProtection.idl
*/
#ifndef __gen_nsIBounceTrackingProtection_h__
#define __gen_nsIBounceTrackingProtection_h__
#include "nsISupports.h"
#include "nsIBounceTrackingMapEntry.h"
#include "nsTArray.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
/* starting interface: nsIBounceTrackingProtection */
#define NS_IBOUNCETRACKINGPROTECTION_IID_STR "4866f748-29da-4c10-8eaa-ed2f7851e6b1"
#define NS_IBOUNCETRACKINGPROTECTION_IID \
{0x4866f748, 0x29da, 0x4c10, \
{ 0x8e, 0xaa, 0xed, 0x2f, 0x78, 0x51, 0xe6, 0xb1 }}
class NS_NO_VTABLE nsIBounceTrackingProtection : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IBOUNCETRACKINGPROTECTION_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIBounceTrackingProtection;
enum Modes : uint8_t {
MODE_DISABLED = 0,
MODE_ENABLED = 1,
MODE_ENABLED_STANDBY = 2,
MODE_ENABLED_DRY_RUN = 3,
MAX_MODE_VALUE = 3,
};
/* void clearAll (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ClearAll(void) = 0;
/* [implicit_jscontext] void clearBySiteHostAndOriginAttributes (in ACString aSiteHost, in jsval originAttributes); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ClearBySiteHostAndOriginAttributes(const nsACString& aSiteHost, JS::Handle<JS::Value> originAttributes, JSContext* cx) = 0;
/* [implicit_jscontext] void clearBySiteHostAndOriginAttributesPattern (in ACString aSiteHost, in jsval aOriginAttributesPattern); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ClearBySiteHostAndOriginAttributesPattern(const nsACString& aSiteHost, JS::Handle<JS::Value> aOriginAttributesPattern, JSContext* cx) = 0;
/* void clearByTimeRange (in PRTime aFrom, in PRTime aTo); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ClearByTimeRange(PRTime aFrom, PRTime aTo) = 0;
/* void clearByOriginAttributesPattern (in AString aPattern); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ClearByOriginAttributesPattern(const nsAString& aPattern) = 0;
/* void addSiteHostExceptions (in Array<ACString> aSiteHosts); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AddSiteHostExceptions(const nsTArray<nsCString >& aSiteHosts) = 0;
/* void removeSiteHostExceptions (in Array<ACString> aSiteHosts); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RemoveSiteHostExceptions(const nsTArray<nsCString >& aSiteHosts) = 0;
/* boolean hasRecentlyPurgedSite (in ACString aSiteHost); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD HasRecentlyPurgedSite(const nsACString& aSiteHost, bool *_retval) = 0;
/* Array<ACString> testGetSiteHostExceptions (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD TestGetSiteHostExceptions(nsTArray<nsCString >& _retval) = 0;
/* [implicit_jscontext] Promise testRunPurgeBounceTrackers (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD TestRunPurgeBounceTrackers(JSContext* cx, ::mozilla::dom::Promise * * _retval) = 0;
/* void testClearExpiredUserActivations (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD TestClearExpiredUserActivations(void) = 0;
/* [implicit_jscontext] Array<nsIBounceTrackingMapEntry> testGetBounceTrackerCandidateHosts (in jsval originAttributes); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD TestGetBounceTrackerCandidateHosts(JS::Handle<JS::Value> originAttributes, JSContext* cx, nsTArray<RefPtr<nsIBounceTrackingMapEntry>>& _retval) = 0;
/* [implicit_jscontext] Array<nsIBounceTrackingMapEntry> testGetUserActivationHosts (in jsval originAttributes); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD TestGetUserActivationHosts(JS::Handle<JS::Value> originAttributes, JSContext* cx, nsTArray<RefPtr<nsIBounceTrackingMapEntry>>& _retval) = 0;
/* [implicit_jscontext] void testAddBounceTrackerCandidate (in jsval originAttributes, in ACString aSiteHost, in PRTime aBounceTime); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD TestAddBounceTrackerCandidate(JS::Handle<JS::Value> originAttributes, const nsACString& aSiteHost, PRTime aBounceTime, JSContext* cx) = 0;
/* [implicit_jscontext] void testAddUserActivation (in jsval originAttributes, in ACString aSiteHost, in PRTime aActivationTime); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD TestAddUserActivation(JS::Handle<JS::Value> originAttributes, const nsACString& aSiteHost, PRTime aActivationTime, JSContext* cx) = 0;
/* [implicit_jscontext] Array<nsIBounceTrackingPurgeEntry> testGetRecentlyPurgedTrackers (in jsval originAttributes); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD TestGetRecentlyPurgedTrackers(JS::Handle<JS::Value> originAttributes, JSContext* cx, nsTArray<RefPtr<nsIBounceTrackingPurgeEntry>>& _retval) = 0;
/* void testMaybeMigrateUserInteractionPermissions (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD TestMaybeMigrateUserInteractionPermissions(void) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIBounceTrackingProtection, NS_IBOUNCETRACKINGPROTECTION_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIBOUNCETRACKINGPROTECTION \
NS_IMETHOD ClearAll(void) override; \
NS_IMETHOD ClearBySiteHostAndOriginAttributes(const nsACString& aSiteHost, JS::Handle<JS::Value> originAttributes, JSContext* cx) override; \
NS_IMETHOD ClearBySiteHostAndOriginAttributesPattern(const nsACString& aSiteHost, JS::Handle<JS::Value> aOriginAttributesPattern, JSContext* cx) override; \
NS_IMETHOD ClearByTimeRange(PRTime aFrom, PRTime aTo) override; \
NS_IMETHOD ClearByOriginAttributesPattern(const nsAString& aPattern) override; \
NS_IMETHOD AddSiteHostExceptions(const nsTArray<nsCString >& aSiteHosts) override; \
NS_IMETHOD RemoveSiteHostExceptions(const nsTArray<nsCString >& aSiteHosts) override; \
NS_IMETHOD HasRecentlyPurgedSite(const nsACString& aSiteHost, bool *_retval) override; \
NS_IMETHOD TestGetSiteHostExceptions(nsTArray<nsCString >& _retval) override; \
NS_IMETHOD TestRunPurgeBounceTrackers(JSContext* cx, ::mozilla::dom::Promise * * _retval) override; \
NS_IMETHOD TestClearExpiredUserActivations(void) override; \
NS_IMETHOD TestGetBounceTrackerCandidateHosts(JS::Handle<JS::Value> originAttributes, JSContext* cx, nsTArray<RefPtr<nsIBounceTrackingMapEntry>>& _retval) override; \
NS_IMETHOD TestGetUserActivationHosts(JS::Handle<JS::Value> originAttributes, JSContext* cx, nsTArray<RefPtr<nsIBounceTrackingMapEntry>>& _retval) override; \
NS_IMETHOD TestAddBounceTrackerCandidate(JS::Handle<JS::Value> originAttributes, const nsACString& aSiteHost, PRTime aBounceTime, JSContext* cx) override; \
NS_IMETHOD TestAddUserActivation(JS::Handle<JS::Value> originAttributes, const nsACString& aSiteHost, PRTime aActivationTime, JSContext* cx) override; \
NS_IMETHOD TestGetRecentlyPurgedTrackers(JS::Handle<JS::Value> originAttributes, JSContext* cx, nsTArray<RefPtr<nsIBounceTrackingPurgeEntry>>& _retval) override; \
NS_IMETHOD TestMaybeMigrateUserInteractionPermissions(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_NSIBOUNCETRACKINGPROTECTION \
nsresult ClearAll(void); \
nsresult ClearBySiteHostAndOriginAttributes(const nsACString& aSiteHost, JS::Handle<JS::Value> originAttributes, JSContext* cx); \
nsresult ClearBySiteHostAndOriginAttributesPattern(const nsACString& aSiteHost, JS::Handle<JS::Value> aOriginAttributesPattern, JSContext* cx); \
nsresult ClearByTimeRange(PRTime aFrom, PRTime aTo); \
nsresult ClearByOriginAttributesPattern(const nsAString& aPattern); \
nsresult AddSiteHostExceptions(const nsTArray<nsCString >& aSiteHosts); \
nsresult RemoveSiteHostExceptions(const nsTArray<nsCString >& aSiteHosts); \
nsresult HasRecentlyPurgedSite(const nsACString& aSiteHost, bool *_retval); \
nsresult TestGetSiteHostExceptions(nsTArray<nsCString >& _retval); \
nsresult TestRunPurgeBounceTrackers(JSContext* cx, ::mozilla::dom::Promise * * _retval); \
nsresult TestClearExpiredUserActivations(void); \
nsresult TestGetBounceTrackerCandidateHosts(JS::Handle<JS::Value> originAttributes, JSContext* cx, nsTArray<RefPtr<nsIBounceTrackingMapEntry>>& _retval); \
nsresult TestGetUserActivationHosts(JS::Handle<JS::Value> originAttributes, JSContext* cx, nsTArray<RefPtr<nsIBounceTrackingMapEntry>>& _retval); \
nsresult TestAddBounceTrackerCandidate(JS::Handle<JS::Value> originAttributes, const nsACString& aSiteHost, PRTime aBounceTime, JSContext* cx); \
nsresult TestAddUserActivation(JS::Handle<JS::Value> originAttributes, const nsACString& aSiteHost, PRTime aActivationTime, JSContext* cx); \
nsresult TestGetRecentlyPurgedTrackers(JS::Handle<JS::Value> originAttributes, JSContext* cx, nsTArray<RefPtr<nsIBounceTrackingPurgeEntry>>& _retval); \
nsresult TestMaybeMigrateUserInteractionPermissions(void);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIBOUNCETRACKINGPROTECTION(_to) \
NS_IMETHOD ClearAll(void) override { return _to ClearAll(); } \
NS_IMETHOD ClearBySiteHostAndOriginAttributes(const nsACString& aSiteHost, JS::Handle<JS::Value> originAttributes, JSContext* cx) override { return _to ClearBySiteHostAndOriginAttributes(aSiteHost, originAttributes, cx); } \
NS_IMETHOD ClearBySiteHostAndOriginAttributesPattern(const nsACString& aSiteHost, JS::Handle<JS::Value> aOriginAttributesPattern, JSContext* cx) override { return _to ClearBySiteHostAndOriginAttributesPattern(aSiteHost, aOriginAttributesPattern, cx); } \
NS_IMETHOD ClearByTimeRange(PRTime aFrom, PRTime aTo) override { return _to ClearByTimeRange(aFrom, aTo); } \
NS_IMETHOD ClearByOriginAttributesPattern(const nsAString& aPattern) override { return _to ClearByOriginAttributesPattern(aPattern); } \
NS_IMETHOD AddSiteHostExceptions(const nsTArray<nsCString >& aSiteHosts) override { return _to AddSiteHostExceptions(aSiteHosts); } \
NS_IMETHOD RemoveSiteHostExceptions(const nsTArray<nsCString >& aSiteHosts) override { return _to RemoveSiteHostExceptions(aSiteHosts); } \
NS_IMETHOD HasRecentlyPurgedSite(const nsACString& aSiteHost, bool *_retval) override { return _to HasRecentlyPurgedSite(aSiteHost, _retval); } \
NS_IMETHOD TestGetSiteHostExceptions(nsTArray<nsCString >& _retval) override { return _to TestGetSiteHostExceptions(_retval); } \
NS_IMETHOD TestRunPurgeBounceTrackers(JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return _to TestRunPurgeBounceTrackers(cx, _retval); } \
NS_IMETHOD TestClearExpiredUserActivations(void) override { return _to TestClearExpiredUserActivations(); } \
NS_IMETHOD TestGetBounceTrackerCandidateHosts(JS::Handle<JS::Value> originAttributes, JSContext* cx, nsTArray<RefPtr<nsIBounceTrackingMapEntry>>& _retval) override { return _to TestGetBounceTrackerCandidateHosts(originAttributes, cx, _retval); } \
NS_IMETHOD TestGetUserActivationHosts(JS::Handle<JS::Value> originAttributes, JSContext* cx, nsTArray<RefPtr<nsIBounceTrackingMapEntry>>& _retval) override { return _to TestGetUserActivationHosts(originAttributes, cx, _retval); } \
NS_IMETHOD TestAddBounceTrackerCandidate(JS::Handle<JS::Value> originAttributes, const nsACString& aSiteHost, PRTime aBounceTime, JSContext* cx) override { return _to TestAddBounceTrackerCandidate(originAttributes, aSiteHost, aBounceTime, cx); } \
NS_IMETHOD TestAddUserActivation(JS::Handle<JS::Value> originAttributes, const nsACString& aSiteHost, PRTime aActivationTime, JSContext* cx) override { return _to TestAddUserActivation(originAttributes, aSiteHost, aActivationTime, cx); } \
NS_IMETHOD TestGetRecentlyPurgedTrackers(JS::Handle<JS::Value> originAttributes, JSContext* cx, nsTArray<RefPtr<nsIBounceTrackingPurgeEntry>>& _retval) override { return _to TestGetRecentlyPurgedTrackers(originAttributes, cx, _retval); } \
NS_IMETHOD TestMaybeMigrateUserInteractionPermissions(void) override { return _to TestMaybeMigrateUserInteractionPermissions(); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIBOUNCETRACKINGPROTECTION(_to) \
NS_IMETHOD ClearAll(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearAll(); } \
NS_IMETHOD ClearBySiteHostAndOriginAttributes(const nsACString& aSiteHost, JS::Handle<JS::Value> originAttributes, JSContext* cx) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearBySiteHostAndOriginAttributes(aSiteHost, originAttributes, cx); } \
NS_IMETHOD ClearBySiteHostAndOriginAttributesPattern(const nsACString& aSiteHost, JS::Handle<JS::Value> aOriginAttributesPattern, JSContext* cx) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearBySiteHostAndOriginAttributesPattern(aSiteHost, aOriginAttributesPattern, cx); } \
NS_IMETHOD ClearByTimeRange(PRTime aFrom, PRTime aTo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearByTimeRange(aFrom, aTo); } \
NS_IMETHOD ClearByOriginAttributesPattern(const nsAString& aPattern) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearByOriginAttributesPattern(aPattern); } \
NS_IMETHOD AddSiteHostExceptions(const nsTArray<nsCString >& aSiteHosts) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddSiteHostExceptions(aSiteHosts); } \
NS_IMETHOD RemoveSiteHostExceptions(const nsTArray<nsCString >& aSiteHosts) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveSiteHostExceptions(aSiteHosts); } \
NS_IMETHOD HasRecentlyPurgedSite(const nsACString& aSiteHost, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HasRecentlyPurgedSite(aSiteHost, _retval); } \
NS_IMETHOD TestGetSiteHostExceptions(nsTArray<nsCString >& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->TestGetSiteHostExceptions(_retval); } \
NS_IMETHOD TestRunPurgeBounceTrackers(JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->TestRunPurgeBounceTrackers(cx, _retval); } \
NS_IMETHOD TestClearExpiredUserActivations(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->TestClearExpiredUserActivations(); } \
NS_IMETHOD TestGetBounceTrackerCandidateHosts(JS::Handle<JS::Value> originAttributes, JSContext* cx, nsTArray<RefPtr<nsIBounceTrackingMapEntry>>& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->TestGetBounceTrackerCandidateHosts(originAttributes, cx, _retval); } \
NS_IMETHOD TestGetUserActivationHosts(JS::Handle<JS::Value> originAttributes, JSContext* cx, nsTArray<RefPtr<nsIBounceTrackingMapEntry>>& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->TestGetUserActivationHosts(originAttributes, cx, _retval); } \
NS_IMETHOD TestAddBounceTrackerCandidate(JS::Handle<JS::Value> originAttributes, const nsACString& aSiteHost, PRTime aBounceTime, JSContext* cx) override { return !_to ? NS_ERROR_NULL_POINTER : _to->TestAddBounceTrackerCandidate(originAttributes, aSiteHost, aBounceTime, cx); } \
NS_IMETHOD TestAddUserActivation(JS::Handle<JS::Value> originAttributes, const nsACString& aSiteHost, PRTime aActivationTime, JSContext* cx) override { return !_to ? NS_ERROR_NULL_POINTER : _to->TestAddUserActivation(originAttributes, aSiteHost, aActivationTime, cx); } \
NS_IMETHOD TestGetRecentlyPurgedTrackers(JS::Handle<JS::Value> originAttributes, JSContext* cx, nsTArray<RefPtr<nsIBounceTrackingPurgeEntry>>& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->TestGetRecentlyPurgedTrackers(originAttributes, cx, _retval); } \
NS_IMETHOD TestMaybeMigrateUserInteractionPermissions(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->TestMaybeMigrateUserInteractionPermissions(); }
#endif /* __gen_nsIBounceTrackingProtection_h__ */