Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/components/cookiebanners/nsICookieBannerRule.idl
*/
#ifndef __gen_nsICookieBannerRule_h__
#define __gen_nsICookieBannerRule_h__
#include "nsISupports.h"
#include "nsIClickRule.h"
#include "nsICookieRule.h"
#include "nsTArray.h"
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
/* starting interface: nsICookieBannerRule */
#define NS_ICOOKIEBANNERRULE_IID_STR "eb1904db-e0d1-4760-a721-db76b1ca3e94"
#define NS_ICOOKIEBANNERRULE_IID \
{0xeb1904db, 0xe0d1, 0x4760, \
{ 0xa7, 0x21, 0xdb, 0x76, 0xb1, 0xca, 0x3e, 0x94 }}
class NS_NO_VTABLE nsICookieBannerRule : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICOOKIEBANNERRULE_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsICookieBannerRule;
/* attribute ACString id; */
NS_IMETHOD GetId(nsACString& aId) = 0;
NS_IMETHOD SetId(const nsACString& aId) = 0;
/* attribute Array<ACString> domains; */
NS_IMETHOD GetDomains(nsTArray<nsCString >& aDomains) = 0;
NS_IMETHOD SetDomains(const nsTArray<nsCString >& aDomains) = 0;
/* readonly attribute Array<nsICookieRule> cookiesOptOut; */
NS_IMETHOD GetCookiesOptOut(nsTArray<RefPtr<nsICookieRule>>& aCookiesOptOut) = 0;
/* readonly attribute Array<nsICookieRule> cookiesOptIn; */
NS_IMETHOD GetCookiesOptIn(nsTArray<RefPtr<nsICookieRule>>& aCookiesOptIn) = 0;
/* [noscript] Array<nsICookieRule> getCookies (in boolean aIsOptOut, [optional] in ACString aDomain); */
NS_IMETHOD GetCookies(bool aIsOptOut, const nsACString& aDomain, nsTArray<RefPtr<nsICookieRule>>& _retval) = 0;
/* void clearCookies (); */
NS_IMETHOD ClearCookies(void) = 0;
/* void addCookie (in boolean aIsOptOut, in ACString aName, in AUTF8String aValue, in AUTF8String aHost, in AUTF8String aPath, in int64_t aExpiryRelative, in AUTF8String aUnsetValue, in boolean aIsSecure, in boolean aIsHttpOnly, in boolean aIsSession, in int32_t aSameSite, in nsICookie_schemeType aSchemeMap); */
NS_IMETHOD AddCookie(bool aIsOptOut, const nsACString& aName, const nsACString& aValue, const nsACString& aHost, const nsACString& aPath, int64_t aExpiryRelative, const nsACString& aUnsetValue, bool aIsSecure, bool aIsHttpOnly, bool aIsSession, int32_t aSameSite, nsICookie::schemeType aSchemeMap) = 0;
/* readonly attribute nsIClickRule clickRule; */
NS_IMETHOD GetClickRule(nsIClickRule **aClickRule) = 0;
/* void addClickRule (in ACString aPresence, [optional] in boolean aSkipPresenceVisibilityCheck, [optional] in nsIClickRule_RunContext aRunContext, [optional] in ACString aHide, [optional] in ACString aOptOut, [optional] in ACString aOptIn); */
NS_IMETHOD AddClickRule(const nsACString& aPresence, bool aSkipPresenceVisibilityCheck, nsIClickRule::RunContext aRunContext, const nsACString& aHide, const nsACString& aOptOut, const nsACString& aOptIn) = 0;
/* void clearClickRule (); */
NS_IMETHOD ClearClickRule(void) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsICookieBannerRule, NS_ICOOKIEBANNERRULE_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSICOOKIEBANNERRULE \
NS_IMETHOD GetId(nsACString& aId) override; \
NS_IMETHOD SetId(const nsACString& aId) override; \
NS_IMETHOD GetDomains(nsTArray<nsCString >& aDomains) override; \
NS_IMETHOD SetDomains(const nsTArray<nsCString >& aDomains) override; \
NS_IMETHOD GetCookiesOptOut(nsTArray<RefPtr<nsICookieRule>>& aCookiesOptOut) override; \
NS_IMETHOD GetCookiesOptIn(nsTArray<RefPtr<nsICookieRule>>& aCookiesOptIn) override; \
NS_IMETHOD GetCookies(bool aIsOptOut, const nsACString& aDomain, nsTArray<RefPtr<nsICookieRule>>& _retval) override; \
NS_IMETHOD ClearCookies(void) override; \
NS_IMETHOD AddCookie(bool aIsOptOut, const nsACString& aName, const nsACString& aValue, const nsACString& aHost, const nsACString& aPath, int64_t aExpiryRelative, const nsACString& aUnsetValue, bool aIsSecure, bool aIsHttpOnly, bool aIsSession, int32_t aSameSite, nsICookie::schemeType aSchemeMap) override; \
NS_IMETHOD GetClickRule(nsIClickRule **aClickRule) override; \
NS_IMETHOD AddClickRule(const nsACString& aPresence, bool aSkipPresenceVisibilityCheck, nsIClickRule::RunContext aRunContext, const nsACString& aHide, const nsACString& aOptOut, const nsACString& aOptIn) override; \
NS_IMETHOD ClearClickRule(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_NSICOOKIEBANNERRULE \
nsresult GetId(nsACString& aId); \
nsresult SetId(const nsACString& aId); \
nsresult GetDomains(nsTArray<nsCString >& aDomains); \
nsresult SetDomains(const nsTArray<nsCString >& aDomains); \
nsresult GetCookiesOptOut(nsTArray<RefPtr<nsICookieRule>>& aCookiesOptOut); \
nsresult GetCookiesOptIn(nsTArray<RefPtr<nsICookieRule>>& aCookiesOptIn); \
nsresult GetCookies(bool aIsOptOut, const nsACString& aDomain, nsTArray<RefPtr<nsICookieRule>>& _retval); \
nsresult ClearCookies(void); \
nsresult AddCookie(bool aIsOptOut, const nsACString& aName, const nsACString& aValue, const nsACString& aHost, const nsACString& aPath, int64_t aExpiryRelative, const nsACString& aUnsetValue, bool aIsSecure, bool aIsHttpOnly, bool aIsSession, int32_t aSameSite, nsICookie::schemeType aSchemeMap); \
nsresult GetClickRule(nsIClickRule **aClickRule); \
nsresult AddClickRule(const nsACString& aPresence, bool aSkipPresenceVisibilityCheck, nsIClickRule::RunContext aRunContext, const nsACString& aHide, const nsACString& aOptOut, const nsACString& aOptIn); \
nsresult ClearClickRule(void);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSICOOKIEBANNERRULE(_to) \
NS_IMETHOD GetId(nsACString& aId) override { return _to GetId(aId); } \
NS_IMETHOD SetId(const nsACString& aId) override { return _to SetId(aId); } \
NS_IMETHOD GetDomains(nsTArray<nsCString >& aDomains) override { return _to GetDomains(aDomains); } \
NS_IMETHOD SetDomains(const nsTArray<nsCString >& aDomains) override { return _to SetDomains(aDomains); } \
NS_IMETHOD GetCookiesOptOut(nsTArray<RefPtr<nsICookieRule>>& aCookiesOptOut) override { return _to GetCookiesOptOut(aCookiesOptOut); } \
NS_IMETHOD GetCookiesOptIn(nsTArray<RefPtr<nsICookieRule>>& aCookiesOptIn) override { return _to GetCookiesOptIn(aCookiesOptIn); } \
NS_IMETHOD GetCookies(bool aIsOptOut, const nsACString& aDomain, nsTArray<RefPtr<nsICookieRule>>& _retval) override { return _to GetCookies(aIsOptOut, aDomain, _retval); } \
NS_IMETHOD ClearCookies(void) override { return _to ClearCookies(); } \
NS_IMETHOD AddCookie(bool aIsOptOut, const nsACString& aName, const nsACString& aValue, const nsACString& aHost, const nsACString& aPath, int64_t aExpiryRelative, const nsACString& aUnsetValue, bool aIsSecure, bool aIsHttpOnly, bool aIsSession, int32_t aSameSite, nsICookie::schemeType aSchemeMap) override { return _to AddCookie(aIsOptOut, aName, aValue, aHost, aPath, aExpiryRelative, aUnsetValue, aIsSecure, aIsHttpOnly, aIsSession, aSameSite, aSchemeMap); } \
NS_IMETHOD GetClickRule(nsIClickRule **aClickRule) override { return _to GetClickRule(aClickRule); } \
NS_IMETHOD AddClickRule(const nsACString& aPresence, bool aSkipPresenceVisibilityCheck, nsIClickRule::RunContext aRunContext, const nsACString& aHide, const nsACString& aOptOut, const nsACString& aOptIn) override { return _to AddClickRule(aPresence, aSkipPresenceVisibilityCheck, aRunContext, aHide, aOptOut, aOptIn); } \
NS_IMETHOD ClearClickRule(void) override { return _to ClearClickRule(); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSICOOKIEBANNERRULE(_to) \
NS_IMETHOD GetId(nsACString& aId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetId(aId); } \
NS_IMETHOD SetId(const nsACString& aId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetId(aId); } \
NS_IMETHOD GetDomains(nsTArray<nsCString >& aDomains) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDomains(aDomains); } \
NS_IMETHOD SetDomains(const nsTArray<nsCString >& aDomains) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDomains(aDomains); } \
NS_IMETHOD GetCookiesOptOut(nsTArray<RefPtr<nsICookieRule>>& aCookiesOptOut) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCookiesOptOut(aCookiesOptOut); } \
NS_IMETHOD GetCookiesOptIn(nsTArray<RefPtr<nsICookieRule>>& aCookiesOptIn) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCookiesOptIn(aCookiesOptIn); } \
NS_IMETHOD GetCookies(bool aIsOptOut, const nsACString& aDomain, nsTArray<RefPtr<nsICookieRule>>& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCookies(aIsOptOut, aDomain, _retval); } \
NS_IMETHOD ClearCookies(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearCookies(); } \
NS_IMETHOD AddCookie(bool aIsOptOut, const nsACString& aName, const nsACString& aValue, const nsACString& aHost, const nsACString& aPath, int64_t aExpiryRelative, const nsACString& aUnsetValue, bool aIsSecure, bool aIsHttpOnly, bool aIsSession, int32_t aSameSite, nsICookie::schemeType aSchemeMap) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddCookie(aIsOptOut, aName, aValue, aHost, aPath, aExpiryRelative, aUnsetValue, aIsSecure, aIsHttpOnly, aIsSession, aSameSite, aSchemeMap); } \
NS_IMETHOD GetClickRule(nsIClickRule **aClickRule) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClickRule(aClickRule); } \
NS_IMETHOD AddClickRule(const nsACString& aPresence, bool aSkipPresenceVisibilityCheck, nsIClickRule::RunContext aRunContext, const nsACString& aHide, const nsACString& aOptOut, const nsACString& aOptIn) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddClickRule(aPresence, aSkipPresenceVisibilityCheck, aRunContext, aHide, aOptOut, aOptIn); } \
NS_IMETHOD ClearClickRule(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearClickRule(); }
#endif /* __gen_nsICookieBannerRule_h__ */