Copy as Markdown
Other Tools
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/dom/interfaces/notification/nsINotificationStorage.idl
*/
#ifndef __gen_nsINotificationStorage_h__
#define __gen_nsINotificationStorage_h__
#include "domstubs.h"
#include "nsTArray.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: nsINotificationActionStorageEntry */
#define NS_INOTIFICATIONACTIONSTORAGEENTRY_IID_STR "6b782346-49ec-41dd-8165-171506f8d4f4"
#define NS_INOTIFICATIONACTIONSTORAGEENTRY_IID \
{0x6b782346, 0x49ec, 0x41dd, \
{ 0x81, 0x65, 0x17, 0x15, 0x06, 0xf8, 0xd4, 0xf4 }}
class NS_NO_VTABLE nsINotificationActionStorageEntry : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_INOTIFICATIONACTIONSTORAGEENTRY_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsINotificationActionStorageEntry;
/* readonly attribute AString name; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetName(nsAString& aName) = 0;
/* readonly attribute AString title; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetTitle(nsAString& aTitle) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsINotificationActionStorageEntry, NS_INOTIFICATIONACTIONSTORAGEENTRY_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSINOTIFICATIONACTIONSTORAGEENTRY \
NS_IMETHOD GetName(nsAString& aName) override; \
NS_IMETHOD GetTitle(nsAString& aTitle) 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_NSINOTIFICATIONACTIONSTORAGEENTRY \
nsresult GetName(nsAString& aName); \
nsresult GetTitle(nsAString& aTitle);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSINOTIFICATIONACTIONSTORAGEENTRY(_to) \
NS_IMETHOD GetName(nsAString& aName) override { return _to GetName(aName); } \
NS_IMETHOD GetTitle(nsAString& aTitle) override { return _to GetTitle(aTitle); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSINOTIFICATIONACTIONSTORAGEENTRY(_to) \
NS_IMETHOD GetName(nsAString& aName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
NS_IMETHOD GetTitle(nsAString& aTitle) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTitle(aTitle); }
/* starting interface: nsINotificationStorageEntry */
#define NS_INOTIFICATIONSTORAGEENTRY_IID_STR "c772e1b9-d4b0-4e23-8481-4a8b7dbbfe92"
#define NS_INOTIFICATIONSTORAGEENTRY_IID \
{0xc772e1b9, 0xd4b0, 0x4e23, \
{ 0x84, 0x81, 0x4a, 0x8b, 0x7d, 0xbb, 0xfe, 0x92 }}
class NS_NO_VTABLE nsINotificationStorageEntry : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_INOTIFICATIONSTORAGEENTRY_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsINotificationStorageEntry;
/* readonly attribute AString id; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetId(nsAString& aId) = 0;
/* readonly attribute AString title; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetTitle(nsAString& aTitle) = 0;
/* readonly attribute ACString dir; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDir(nsACString& aDir) = 0;
/* readonly attribute AString lang; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetLang(nsAString& aLang) = 0;
/* readonly attribute AString body; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetBody(nsAString& aBody) = 0;
/* readonly attribute AString tag; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetTag(nsAString& aTag) = 0;
/* readonly attribute AString icon; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetIcon(nsAString& aIcon) = 0;
/* readonly attribute boolean requireInteraction; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetRequireInteraction(bool *aRequireInteraction) = 0;
/* readonly attribute boolean silent; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetSilent(bool *aSilent) = 0;
/* readonly attribute AString dataSerialized; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDataSerialized(nsAString& aDataSerialized) = 0;
/* readonly attribute Array<nsINotificationActionStorageEntry> actions; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetActions(nsTArray<RefPtr<nsINotificationActionStorageEntry>>& aActions) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsINotificationStorageEntry, NS_INOTIFICATIONSTORAGEENTRY_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSINOTIFICATIONSTORAGEENTRY \
NS_IMETHOD GetId(nsAString& aId) override; \
NS_IMETHOD GetTitle(nsAString& aTitle) override; \
NS_IMETHOD GetDir(nsACString& aDir) override; \
NS_IMETHOD GetLang(nsAString& aLang) override; \
NS_IMETHOD GetBody(nsAString& aBody) override; \
NS_IMETHOD GetTag(nsAString& aTag) override; \
NS_IMETHOD GetIcon(nsAString& aIcon) override; \
NS_IMETHOD GetRequireInteraction(bool *aRequireInteraction) override; \
NS_IMETHOD GetSilent(bool *aSilent) override; \
NS_IMETHOD GetDataSerialized(nsAString& aDataSerialized) override; \
NS_IMETHOD GetActions(nsTArray<RefPtr<nsINotificationActionStorageEntry>>& aActions) 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_NSINOTIFICATIONSTORAGEENTRY \
nsresult GetId(nsAString& aId); \
nsresult GetTitle(nsAString& aTitle); \
nsresult GetDir(nsACString& aDir); \
nsresult GetLang(nsAString& aLang); \
nsresult GetBody(nsAString& aBody); \
nsresult GetTag(nsAString& aTag); \
nsresult GetIcon(nsAString& aIcon); \
nsresult GetRequireInteraction(bool *aRequireInteraction); \
nsresult GetSilent(bool *aSilent); \
nsresult GetDataSerialized(nsAString& aDataSerialized); \
nsresult GetActions(nsTArray<RefPtr<nsINotificationActionStorageEntry>>& aActions);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSINOTIFICATIONSTORAGEENTRY(_to) \
NS_IMETHOD GetId(nsAString& aId) override { return _to GetId(aId); } \
NS_IMETHOD GetTitle(nsAString& aTitle) override { return _to GetTitle(aTitle); } \
NS_IMETHOD GetDir(nsACString& aDir) override { return _to GetDir(aDir); } \
NS_IMETHOD GetLang(nsAString& aLang) override { return _to GetLang(aLang); } \
NS_IMETHOD GetBody(nsAString& aBody) override { return _to GetBody(aBody); } \
NS_IMETHOD GetTag(nsAString& aTag) override { return _to GetTag(aTag); } \
NS_IMETHOD GetIcon(nsAString& aIcon) override { return _to GetIcon(aIcon); } \
NS_IMETHOD GetRequireInteraction(bool *aRequireInteraction) override { return _to GetRequireInteraction(aRequireInteraction); } \
NS_IMETHOD GetSilent(bool *aSilent) override { return _to GetSilent(aSilent); } \
NS_IMETHOD GetDataSerialized(nsAString& aDataSerialized) override { return _to GetDataSerialized(aDataSerialized); } \
NS_IMETHOD GetActions(nsTArray<RefPtr<nsINotificationActionStorageEntry>>& aActions) override { return _to GetActions(aActions); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSINOTIFICATIONSTORAGEENTRY(_to) \
NS_IMETHOD GetId(nsAString& aId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetId(aId); } \
NS_IMETHOD GetTitle(nsAString& aTitle) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTitle(aTitle); } \
NS_IMETHOD GetDir(nsACString& aDir) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDir(aDir); } \
NS_IMETHOD GetLang(nsAString& aLang) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLang(aLang); } \
NS_IMETHOD GetBody(nsAString& aBody) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBody(aBody); } \
NS_IMETHOD GetTag(nsAString& aTag) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTag(aTag); } \
NS_IMETHOD GetIcon(nsAString& aIcon) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIcon(aIcon); } \
NS_IMETHOD GetRequireInteraction(bool *aRequireInteraction) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequireInteraction(aRequireInteraction); } \
NS_IMETHOD GetSilent(bool *aSilent) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSilent(aSilent); } \
NS_IMETHOD GetDataSerialized(nsAString& aDataSerialized) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDataSerialized(aDataSerialized); } \
NS_IMETHOD GetActions(nsTArray<RefPtr<nsINotificationActionStorageEntry>>& aActions) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetActions(aActions); }
/* starting interface: nsINotificationStorageCallback */
#define NS_INOTIFICATIONSTORAGECALLBACK_IID_STR "c1622232-259c-43b0-b52e-89c39dcd9796"
#define NS_INOTIFICATIONSTORAGECALLBACK_IID \
{0xc1622232, 0x259c, 0x43b0, \
{ 0xb5, 0x2e, 0x89, 0xc3, 0x9d, 0xcd, 0x97, 0x96 }}
class NS_NO_VTABLE nsINotificationStorageCallback : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_INOTIFICATIONSTORAGECALLBACK_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsINotificationStorageCallback;
/* void done (in Array<nsINotificationStorageEntry> aEntries); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Done(const nsTArray<RefPtr<nsINotificationStorageEntry>>& aEntries) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsINotificationStorageCallback, NS_INOTIFICATIONSTORAGECALLBACK_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSINOTIFICATIONSTORAGECALLBACK \
NS_IMETHOD Done(const nsTArray<RefPtr<nsINotificationStorageEntry>>& aEntries) 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_NSINOTIFICATIONSTORAGECALLBACK \
nsresult Done(const nsTArray<RefPtr<nsINotificationStorageEntry>>& aEntries);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSINOTIFICATIONSTORAGECALLBACK(_to) \
NS_IMETHOD Done(const nsTArray<RefPtr<nsINotificationStorageEntry>>& aEntries) override { return _to Done(aEntries); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSINOTIFICATIONSTORAGECALLBACK(_to) \
NS_IMETHOD Done(const nsTArray<RefPtr<nsINotificationStorageEntry>>& aEntries) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Done(aEntries); }
/* starting interface: nsINotificationStorage */
#define NS_INOTIFICATIONSTORAGE_IID_STR "17f85e52-fe57-440e-9ba1-5c312ca02b95"
#define NS_INOTIFICATIONSTORAGE_IID \
{0x17f85e52, 0xfe57, 0x440e, \
{ 0x9b, 0xa1, 0x5c, 0x31, 0x2c, 0xa0, 0x2b, 0x95 }}
class NS_NO_VTABLE nsINotificationStorage : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_INOTIFICATIONSTORAGE_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsINotificationStorage;
/* void put (in AString aOrigin, in nsINotificationStorageEntry aEntry, in AString aScope); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Put(const nsAString& aOrigin, nsINotificationStorageEntry *aEntry, const nsAString& aScope) = 0;
/* void get (in AString origin, in AString scope, in AString tag, in nsINotificationStorageCallback aCallback); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Get(const nsAString& origin, const nsAString& scope, const nsAString& tag, nsINotificationStorageCallback *aCallback) = 0;
/* void delete (in AString origin, in AString id); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Delete(const nsAString& origin, const nsAString& id) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsINotificationStorage, NS_INOTIFICATIONSTORAGE_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSINOTIFICATIONSTORAGE \
NS_IMETHOD Put(const nsAString& aOrigin, nsINotificationStorageEntry *aEntry, const nsAString& aScope) override; \
NS_IMETHOD Get(const nsAString& origin, const nsAString& scope, const nsAString& tag, nsINotificationStorageCallback *aCallback) override; \
NS_IMETHOD Delete(const nsAString& origin, const nsAString& id) 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_NSINOTIFICATIONSTORAGE \
nsresult Put(const nsAString& aOrigin, nsINotificationStorageEntry *aEntry, const nsAString& aScope); \
nsresult Get(const nsAString& origin, const nsAString& scope, const nsAString& tag, nsINotificationStorageCallback *aCallback); \
nsresult Delete(const nsAString& origin, const nsAString& id);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSINOTIFICATIONSTORAGE(_to) \
NS_IMETHOD Put(const nsAString& aOrigin, nsINotificationStorageEntry *aEntry, const nsAString& aScope) override { return _to Put(aOrigin, aEntry, aScope); } \
NS_IMETHOD Get(const nsAString& origin, const nsAString& scope, const nsAString& tag, nsINotificationStorageCallback *aCallback) override { return _to Get(origin, scope, tag, aCallback); } \
NS_IMETHOD Delete(const nsAString& origin, const nsAString& id) override { return _to Delete(origin, id); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSINOTIFICATIONSTORAGE(_to) \
NS_IMETHOD Put(const nsAString& aOrigin, nsINotificationStorageEntry *aEntry, const nsAString& aScope) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Put(aOrigin, aEntry, aScope); } \
NS_IMETHOD Get(const nsAString& origin, const nsAString& scope, const nsAString& tag, nsINotificationStorageCallback *aCallback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Get(origin, scope, tag, aCallback); } \
NS_IMETHOD Delete(const nsAString& origin, const nsAString& id) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Delete(origin, id); }
#define NS_NOTIFICATION_STORAGE_CONTRACTID "@mozilla.org/notificationStorage;1"
#define NS_MEMORY_NOTIFICATION_STORAGE_CONTRACTID "@mozilla.org/memoryNotificationStorage;1"
#endif /* __gen_nsINotificationStorage_h__ */