1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include
"nsIAlertsService.idl"
8 [scriptable
, uuid(a46c385b
-a45c
-4b48
-ab7c
-aaed1252bb83
)]
9 interface nsIWindowsAlertNotification
: nsIAlertNotification
12 * Boolean to signal that notification button actions will be handled, and the
13 * resulting action should be communicated back on clicks through the
16 attribute
boolean handleActions
;
19 * Image placements corresponding to placements in Windows Toast
22 cenum ImagePlacement
: 8 {
29 * Enum to specify image placement we want in the notification. n.b. in the
30 * future we could extend this to instead allow multiple images in differing
31 * placements in the same notification.
33 attribute nsIWindowsAlertNotification_ImagePlacement imagePlacement
;
36 [scriptable
, uuid(e01c8066
-fb4b
-4304-b9c9
-ab6ed4a8322c
)]
37 interface nsIWindowsAlertsService
: nsIAlertsService
40 * If callbacks for the given Windows-specific tag string will be handled by
41 * this Firefox process, set the associated event.
43 * @param {AString} aWindowsTag the tag
46 * Resolves with an Object, may contain the following optional
47 * properties if notification exists but wasn't registered with
48 * the WindowsAlertsService:
50 * `notificationData` {string} relaunch data, generally opaque to
51 * the Windows notification server DLL, for this relaunch.
53 * @rejects `nsresult` when there was an error retrieving the notification.
56 Promise handleWindowsTag
(in AString aWindowsTag
);
59 * Get the Windows-specific XML generated for the given alert.
61 * @note This method is intended for testing purposes.
63 * @param {nsIAlertNotification} aAlert the alert
64 * @param {AString} an optional Windows tag; default is generated
65 * @return {string} generated XML
67 AString getXmlStringForWindowsAlert
(in nsIAlertNotification aAlert
,
68 [optional] in AString aWindowsTag
);
71 * Removes all action center and snoozed notifications associated with this
72 * install. Note that this removes all notifications regardless of which profile
73 * they originated from.
75 void removeAllNotificationsForInstall
();