Generated file
Copy as Markdown
Other Tools
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/components/antitracking/scopedprefs/nsIScopedPrefs.idl
*/
#ifndef __gen_nsIScopedPrefs_h__
#define __gen_nsIScopedPrefs_h__
#include "nsISupports.h"
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
namespace mozilla {
namespace dom {
class BrowsingContext; /* webidl BrowsingContext */
} // namespace dom
} // namespace mozilla
/* starting interface: nsIScopedPrefs */
#define NS_ISCOPEDPREFS_IID_STR "63a0e445-e1ff-41ef-9f8c-0af5b30f894c"
#define NS_ISCOPEDPREFS_IID \
{0x63a0e445, 0xe1ff, 0x41ef, \
{ 0x9f, 0x8c, 0x0a, 0xf5, 0xb3, 0x0f, 0x89, 0x4c }}
class NS_NO_VTABLE nsIScopedPrefs : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_ISCOPEDPREFS_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIScopedPrefs;
enum Pref : uint8_t {
PRIVACY_TRACKINGPROTECTION_ENABLED = 0,
NUM_SCOPED_BOOL_PREFS = 1,
};
/* void setBoolPrefScoped (in nsIScopedPrefs_Pref pref, in BrowsingContext bc, in boolean value); */
NS_IMETHOD SetBoolPrefScoped(nsIScopedPrefs::Pref pref, mozilla::dom::BrowsingContext *bc, bool value) = 0;
/* boolean getBoolPrefScoped (in nsIScopedPrefs_Pref pref, in BrowsingContext bc); */
NS_IMETHOD GetBoolPrefScoped(nsIScopedPrefs::Pref pref, mozilla::dom::BrowsingContext *bc, bool *_retval) = 0;
/* void clearScoped (); */
NS_IMETHOD ClearScoped(void) = 0;
/* void clearScopedPref (in nsIScopedPrefs_Pref pref); */
NS_IMETHOD ClearScopedPref(nsIScopedPrefs::Pref pref) = 0;
/* void clearScopedByHost (in AUTF8String aHost); */
NS_IMETHOD ClearScopedByHost(const nsACString& aHost) = 0;
/* void clearScopedPrefByHost (in nsIScopedPrefs_Pref pref, in AUTF8String aHost); */
NS_IMETHOD ClearScopedPrefByHost(nsIScopedPrefs::Pref pref, const nsACString& aHost) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSISCOPEDPREFS \
NS_IMETHOD SetBoolPrefScoped(nsIScopedPrefs::Pref pref, mozilla::dom::BrowsingContext *bc, bool value) override; \
NS_IMETHOD GetBoolPrefScoped(nsIScopedPrefs::Pref pref, mozilla::dom::BrowsingContext *bc, bool *_retval) override; \
NS_IMETHOD ClearScoped(void) override; \
NS_IMETHOD ClearScopedPref(nsIScopedPrefs::Pref pref) override; \
NS_IMETHOD ClearScopedByHost(const nsACString& aHost) override; \
NS_IMETHOD ClearScopedPrefByHost(nsIScopedPrefs::Pref pref, const nsACString& aHost) 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_NSISCOPEDPREFS \
nsresult SetBoolPrefScoped(nsIScopedPrefs::Pref pref, mozilla::dom::BrowsingContext *bc, bool value); \
nsresult GetBoolPrefScoped(nsIScopedPrefs::Pref pref, mozilla::dom::BrowsingContext *bc, bool *_retval); \
nsresult ClearScoped(void); \
nsresult ClearScopedPref(nsIScopedPrefs::Pref pref); \
nsresult ClearScopedByHost(const nsACString& aHost); \
nsresult ClearScopedPrefByHost(nsIScopedPrefs::Pref pref, const nsACString& aHost);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSISCOPEDPREFS(_to) \
NS_IMETHOD SetBoolPrefScoped(nsIScopedPrefs::Pref pref, mozilla::dom::BrowsingContext *bc, bool value) override { return _to SetBoolPrefScoped(pref, bc, value); } \
NS_IMETHOD GetBoolPrefScoped(nsIScopedPrefs::Pref pref, mozilla::dom::BrowsingContext *bc, bool *_retval) override { return _to GetBoolPrefScoped(pref, bc, _retval); } \
NS_IMETHOD ClearScoped(void) override { return _to ClearScoped(); } \
NS_IMETHOD ClearScopedPref(nsIScopedPrefs::Pref pref) override { return _to ClearScopedPref(pref); } \
NS_IMETHOD ClearScopedByHost(const nsACString& aHost) override { return _to ClearScopedByHost(aHost); } \
NS_IMETHOD ClearScopedPrefByHost(nsIScopedPrefs::Pref pref, const nsACString& aHost) override { return _to ClearScopedPrefByHost(pref, aHost); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSISCOPEDPREFS(_to) \
NS_IMETHOD SetBoolPrefScoped(nsIScopedPrefs::Pref pref, mozilla::dom::BrowsingContext *bc, bool value) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetBoolPrefScoped(pref, bc, value); } \
NS_IMETHOD GetBoolPrefScoped(nsIScopedPrefs::Pref pref, mozilla::dom::BrowsingContext *bc, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBoolPrefScoped(pref, bc, _retval); } \
NS_IMETHOD ClearScoped(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearScoped(); } \
NS_IMETHOD ClearScopedPref(nsIScopedPrefs::Pref pref) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearScopedPref(pref); } \
NS_IMETHOD ClearScopedByHost(const nsACString& aHost) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearScopedByHost(aHost); } \
NS_IMETHOD ClearScopedPrefByHost(nsIScopedPrefs::Pref pref, const nsACString& aHost) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearScopedPrefByHost(pref, aHost); }
#endif /* __gen_nsIScopedPrefs_h__ */