Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/dom/notification/nsINotificationHandler.idl
*/
#ifndef __gen_nsINotificationHandler_h__
#define __gen_nsINotificationHandler_h__
#include "nsISupports.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
class nsIPrincipal; /* forward declaration */
/* starting interface: nsINotificationHandler */
#define NS_INOTIFICATIONHANDLER_IID_STR "55051271-52a2-48c6-9a47-2aff6baf1d7b"
#define NS_INOTIFICATIONHANDLER_IID \
{0x55051271, 0x52a2, 0x48c6, \
{ 0x9a, 0x47, 0x2a, 0xff, 0x6b, 0xaf, 0x1d, 0x7b }}
class NS_NO_VTABLE nsINotificationHandler : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(NS_INOTIFICATIONHANDLER_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsINotificationHandler;
/* Promise respondOnClick (in nsIPrincipal aPrincipal, in AString aNotificationId, in AString aActionName, in boolean aAutoClosed); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RespondOnClick(nsIPrincipal *aPrincipal, const nsAString& aNotificationId, const nsAString& aActionName, bool aAutoClosed, ::mozilla::dom::Promise * * _retval) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSINOTIFICATIONHANDLER \
NS_IMETHOD RespondOnClick(nsIPrincipal *aPrincipal, const nsAString& aNotificationId, const nsAString& aActionName, bool aAutoClosed, ::mozilla::dom::Promise * * _retval) 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_NSINOTIFICATIONHANDLER \
nsresult RespondOnClick(nsIPrincipal *aPrincipal, const nsAString& aNotificationId, const nsAString& aActionName, bool aAutoClosed, ::mozilla::dom::Promise * * _retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSINOTIFICATIONHANDLER(_to) \
NS_IMETHOD RespondOnClick(nsIPrincipal *aPrincipal, const nsAString& aNotificationId, const nsAString& aActionName, bool aAutoClosed, ::mozilla::dom::Promise * * _retval) override { return _to RespondOnClick(aPrincipal, aNotificationId, aActionName, aAutoClosed, _retval); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSINOTIFICATIONHANDLER(_to) \
NS_IMETHOD RespondOnClick(nsIPrincipal *aPrincipal, const nsAString& aNotificationId, const nsAString& aActionName, bool aAutoClosed, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RespondOnClick(aPrincipal, aNotificationId, aActionName, aAutoClosed, _retval); }
#endif /* __gen_nsINotificationHandler_h__ */