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 PBackgroundIDBTransaction;
6 include protocol PBackgroundIDBVersionChangeTransaction;
7 include protocol PBackgroundMutableFile;
8 include protocol PChildToParentStream; // FIXME: bug 792908
9 include protocol PFileDescriptorSet; // FIXME: bug 792908
10 include protocol PIPCBlobInputStream; // FIXME: bug 792908
11 include protocol PParentToChildStream; // FIXME: bug 792908
13 include PBackgroundIDBSharedTypes;
15 include "mozilla/dom/indexedDB/SerializationHelpers.h";
17 using struct mozilla::void_t
18 from "ipc/IPCMessageUtils.h";
20 using class mozilla::dom::indexedDB::Key
21 from "mozilla/dom/indexedDB/Key.h";
27 struct ObjectStoreAddResponse
32 struct ObjectStorePutResponse
37 struct ObjectStoreGetResponse
39 SerializedStructuredCloneReadInfo cloneInfo;
42 struct ObjectStoreGetKeyResponse
47 struct ObjectStoreGetAllResponse
49 SerializedStructuredCloneReadInfo[] cloneInfos;
52 struct ObjectStoreGetAllKeysResponse
57 struct ObjectStoreDeleteResponse
60 struct ObjectStoreClearResponse
63 struct ObjectStoreCountResponse
68 struct IndexGetResponse
70 SerializedStructuredCloneReadInfo cloneInfo;
73 struct IndexGetKeyResponse
78 struct IndexGetAllResponse
80 SerializedStructuredCloneReadInfo[] cloneInfos;
83 struct IndexGetAllKeysResponse
88 struct IndexCountResponse
96 ObjectStoreGetResponse;
97 ObjectStoreGetKeyResponse;
98 ObjectStoreAddResponse;
99 ObjectStorePutResponse;
100 ObjectStoreDeleteResponse;
101 ObjectStoreClearResponse;
102 ObjectStoreCountResponse;
103 ObjectStoreGetAllResponse;
104 ObjectStoreGetAllKeysResponse;
108 IndexGetAllKeysResponse;
112 struct PreprocessInfo
114 SerializedStructuredCloneFile[] files;
117 struct ObjectStoreGetPreprocessParams
119 PreprocessInfo preprocessInfo;
122 struct ObjectStoreGetAllPreprocessParams
124 PreprocessInfo[] preprocessInfos;
127 union PreprocessParams
129 ObjectStoreGetPreprocessParams;
130 ObjectStoreGetAllPreprocessParams;
133 struct ObjectStoreGetPreprocessResponse
137 struct ObjectStoreGetAllPreprocessResponse
141 // The nsresult is used if an error occurs for any preprocess request type.
142 // The specific response types are sent on success.
143 union PreprocessResponse
146 ObjectStoreGetPreprocessResponse;
147 ObjectStoreGetAllPreprocessResponse;
150 protocol PBackgroundIDBRequest
152 manager PBackgroundIDBTransaction or PBackgroundIDBVersionChangeTransaction;
155 async Continue(PreprocessResponse response);
158 async __delete__(RequestResponse response);
160 // Preprocess is used in cases where response processing needs to do something
161 // asynchronous off of the child actor's thread before returning the actual
162 // result to user code. This is necessary because RequestResponse processing
163 // occurs in __delete__ and the PBackgroundIDBRequest implementations'
164 // life-cycles are controlled by IPC and are not otherwise reference counted.
165 // By introducing the (optional) Preprocess/Continue steps reference counting
166 // or the introduction of additional runnables are avoided.
167 async Preprocess(PreprocessParams params);
170 } // namespace indexedDB
172 } // namespace mozilla