Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/netwerk/cookie/nsICookieNotification.idl
*/
#ifndef __gen_nsICookieNotification_h__
#define __gen_nsICookieNotification_h__
#include "nsISupports.h"
#include "mozilla/AlreadyAddRefed.h"
#include "mozilla/Assertions.h"
#include "mozilla/DebugOnly.h"
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsICookie; /* forward declaration */
class nsIArray; /* forward declaration */
namespace mozilla {
namespace dom {
class BrowsingContext; /* webidl BrowsingContext */
} // namespace dom
} // namespace mozilla
/* starting interface: nsICookieNotification */
#define NS_ICOOKIENOTIFICATION_IID_STR "5b3490f2-75f0-4e36-9f3d-47c857ecdfbb"
#define NS_ICOOKIENOTIFICATION_IID \
{0x5b3490f2, 0x75f0, 0x4e36, \
{ 0x9f, 0x3d, 0x47, 0xc8, 0x57, 0xec, 0xdf, 0xbb }}
class NS_NO_VTABLE nsICookieNotification : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICOOKIENOTIFICATION_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsICookieNotification;
enum Action : uint8_t {
COOKIE_DELETED = 0,
COOKIE_ADDED = 1,
COOKIE_CHANGED = 2,
ALL_COOKIES_CLEARED = 3,
COOKIES_BATCH_DELETED = 4,
};
/* [infallible] readonly attribute nsICookieNotification_Action action; */
NS_IMETHOD GetAction(nsICookieNotification::Action *aAction) = 0;
inline nsICookieNotification::Action GetAction()
{
nsICookieNotification::Action result;
mozilla::DebugOnly<nsresult> rv = GetAction(&result);
MOZ_ASSERT(NS_SUCCEEDED(rv));
return result;
}
/* [infallible] readonly attribute nsICookie cookie; */
NS_IMETHOD GetCookie(nsICookie **aCookie) = 0;
inline already_AddRefed<nsICookie> GetCookie()
{
nsICookie* result = nullptr;
mozilla::DebugOnly<nsresult> rv = GetCookie(&result);
MOZ_ASSERT(NS_SUCCEEDED(rv));
return already_AddRefed<nsICookie>(result);
}
/* readonly attribute ACString baseDomain; */
NS_IMETHOD GetBaseDomain(nsACString& aBaseDomain) = 0;
/* readonly attribute nsIArray batchDeletedCookies; */
NS_IMETHOD GetBatchDeletedCookies(nsIArray **aBatchDeletedCookies) = 0;
/* [infallible] readonly attribute unsigned long long browsingContextId; */
NS_IMETHOD GetBrowsingContextId(uint64_t *aBrowsingContextId) = 0;
inline uint64_t GetBrowsingContextId()
{
uint64_t result;
mozilla::DebugOnly<nsresult> rv = GetBrowsingContextId(&result);
MOZ_ASSERT(NS_SUCCEEDED(rv));
return result;
}
/* [infallible] readonly attribute BrowsingContext browsingContext; */
NS_IMETHOD GetBrowsingContext(mozilla::dom::BrowsingContext **aBrowsingContext) = 0;
inline already_AddRefed<mozilla::dom::BrowsingContext> GetBrowsingContext()
{
mozilla::dom::BrowsingContext* result = nullptr;
mozilla::DebugOnly<nsresult> rv = GetBrowsingContext(&result);
MOZ_ASSERT(NS_SUCCEEDED(rv));
return already_AddRefed<mozilla::dom::BrowsingContext>(result);
}
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsICookieNotification, NS_ICOOKIENOTIFICATION_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSICOOKIENOTIFICATION \
using nsICookieNotification::GetAction; \
NS_IMETHOD GetAction(nsICookieNotification::Action *aAction) override; \
using nsICookieNotification::GetCookie; \
NS_IMETHOD GetCookie(nsICookie **aCookie) override; \
NS_IMETHOD GetBaseDomain(nsACString& aBaseDomain) override; \
NS_IMETHOD GetBatchDeletedCookies(nsIArray **aBatchDeletedCookies) override; \
using nsICookieNotification::GetBrowsingContextId; \
NS_IMETHOD GetBrowsingContextId(uint64_t *aBrowsingContextId) override; \
using nsICookieNotification::GetBrowsingContext; \
NS_IMETHOD GetBrowsingContext(mozilla::dom::BrowsingContext **aBrowsingContext) 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_NSICOOKIENOTIFICATION \
using nsICookieNotification::GetAction; \
nsresult GetAction(nsICookieNotification::Action *aAction); \
using nsICookieNotification::GetCookie; \
nsresult GetCookie(nsICookie **aCookie); \
nsresult GetBaseDomain(nsACString& aBaseDomain); \
nsresult GetBatchDeletedCookies(nsIArray **aBatchDeletedCookies); \
using nsICookieNotification::GetBrowsingContextId; \
nsresult GetBrowsingContextId(uint64_t *aBrowsingContextId); \
using nsICookieNotification::GetBrowsingContext; \
nsresult GetBrowsingContext(mozilla::dom::BrowsingContext **aBrowsingContext);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSICOOKIENOTIFICATION(_to) \
using nsICookieNotification::GetAction; \
NS_IMETHOD GetAction(nsICookieNotification::Action *aAction) override { return _to GetAction(aAction); } \
using nsICookieNotification::GetCookie; \
NS_IMETHOD GetCookie(nsICookie **aCookie) override { return _to GetCookie(aCookie); } \
NS_IMETHOD GetBaseDomain(nsACString& aBaseDomain) override { return _to GetBaseDomain(aBaseDomain); } \
NS_IMETHOD GetBatchDeletedCookies(nsIArray **aBatchDeletedCookies) override { return _to GetBatchDeletedCookies(aBatchDeletedCookies); } \
using nsICookieNotification::GetBrowsingContextId; \
NS_IMETHOD GetBrowsingContextId(uint64_t *aBrowsingContextId) override { return _to GetBrowsingContextId(aBrowsingContextId); } \
using nsICookieNotification::GetBrowsingContext; \
NS_IMETHOD GetBrowsingContext(mozilla::dom::BrowsingContext **aBrowsingContext) override { return _to GetBrowsingContext(aBrowsingContext); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSICOOKIENOTIFICATION(_to) \
NS_IMETHOD GetAction(nsICookieNotification::Action *aAction) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAction(aAction); } \
NS_IMETHOD GetCookie(nsICookie **aCookie) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCookie(aCookie); } \
NS_IMETHOD GetBaseDomain(nsACString& aBaseDomain) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBaseDomain(aBaseDomain); } \
NS_IMETHOD GetBatchDeletedCookies(nsIArray **aBatchDeletedCookies) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBatchDeletedCookies(aBatchDeletedCookies); } \
NS_IMETHOD GetBrowsingContextId(uint64_t *aBrowsingContextId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBrowsingContextId(aBrowsingContextId); } \
NS_IMETHOD GetBrowsingContext(mozilla::dom::BrowsingContext **aBrowsingContext) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBrowsingContext(aBrowsingContext); }
#endif /* __gen_nsICookieNotification_h__ */