nsINotificationStorage

Interface for notification persistence layer.

Methods

put(origin, id, title, dir, lang, body, tag, icon, alertName, data, behavior)

Add/replace a notification to the persistence layer.

Parameters

origin: the origin/app of this notification
id: a uuid for this notification
title: the notification title
dir: the notification direction, possible values are "ltr", "rtl", "auto"
lang: the notification language
body: the notification body
tag: notification tag, will replace any existing notifications with same origin/tag pair
alertName: the alert identifier as used by system app. Stored in the database to avoid re-computing it. Built from origin and tag or id depending whether there is a tag defined.

get(origin, tag, aCallback)

Retrieve a list of notifications.

Parameters

origin: the origin/app for which to fetch notifications from
tag: used to fetch only a specific tag
callback: nsINotificationStorageCallback, used for returning notifications objects

delete(origin, id)

Remove a notification from storage.

Parameters

origin: the origin/app to delete the notification from
id: the uuid for the notification to delete