Bug 1869043 assert that graph set access is main thread only r=padenot
[gecko.git] / netwerk / cookie / nsICookieNotification.idl
blobb37ae6587363b646e7d33d5101d2a33f5cf29990
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsISupports.idl"
9 interface nsICookie;
10 interface nsIArray;
11 webidl BrowsingContext;
13 /**
14 * Meta object dispatched by cookie change notifications.
16 [builtinclass, scriptable, uuid(5b3490f2-75f0-4e36-9f3d-47c857ecdfbb)]
17 interface nsICookieNotification : nsISupports {
19 cenum Action : 8 {
20 // A cookie was deleted. cookie contains the deleted cookie.
21 COOKIE_DELETED,
22 // A cookie was added. cookie contains the added cookie.
23 COOKIE_ADDED,
24 // A cookie was altered. cookie contains the updated version of the
25 // cookie. Note that host, path, and name are invariant for a given
26 // cookie; other parameters may change.
27 COOKIE_CHANGED,
28 // the entire cookie list was cleared. cookie is null.
29 ALL_COOKIES_CLEARED,
30 // A set of cookies was purged. batchDeletedCookies contains the list of
31 // deleted cookies. cookie is null.
32 // Purging typically affects expired cookies or cases where the cookie
33 // list grows too large.
34 COOKIES_BATCH_DELETED,
37 /**
38 * Describes the cookie operation this notification is for. Cookies may be
39 * deleted, added or changed. See Action enum above for possible values.
41 [infallible] readonly attribute nsICookieNotification_Action action;
44 /**
45 * The cookie the notification is for, may be null depending on the action.
47 [infallible] readonly attribute nsICookie cookie;
49 /**
50 * Base domain of the cookie. May be empty if cookie is null.
52 readonly attribute ACString baseDomain;
54 /**
55 * List of cookies purged.
56 * Only set when action == COOKIES_BATCH_DELETED.
58 readonly attribute nsIArray batchDeletedCookies;
60 /**
61 * The id of the BrowsingContext the cookie change was triggered from. Set
62 * to 0 if there is not applicable BrowsingContext.
64 [infallible] readonly attribute unsigned long long browsingContextId;
66 /**
67 * BrowsingContext associated with browsingContextId. May be nullptr.
69 [infallible] readonly attribute BrowsingContext browsingContext;