1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 include protocol PBackground;
7 include PBackgroundLSSharedTypes;
13 * Response to a `LSSimpleRequestPreloadedParams` request indicating whether the
14 * origin was preloaded.
16 struct LSSimpleRequestPreloadedResponse
21 struct LSSimpleRequestGetStateResponse
23 LSItemInfo[] itemInfos;
27 * Discriminated union which can contain an error code (`nsresult`) or
28 * particular simple request response.
30 union LSSimpleRequestResponse
33 LSSimpleRequestPreloadedResponse;
34 LSSimpleRequestGetStateResponse;
38 * Simple requests are async-only from both a protocol perspective and the
39 * manner in which they're used. In comparison, PBackgroundLSRequests are
40 * async only from a protocol perspective; they are used synchronously from the
41 * main thread via LSObject's RequestHelper mechanism. (With the caveat that
42 * nsILocalStorageManager does expose LSRequests asynchronously.)
44 * These requests use the common idiom where the arguments to the request are
45 * sent in the constructor and the result is sent in the __delete__ response.
46 * Request types are indicated by the Params variant used and those live in
47 * `PBackgroundLSSharedTypes.ipdlh`.
49 [ManualDealloc, ChildImpl=virtual, ParentImpl=virtual]
50 protocol PBackgroundLSSimpleRequest
55 async __delete__(LSSimpleRequestResponse response);
59 } // namespace mozilla