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 PBackgroundIDBDatabaseFile;
6 include protocol PBackgroundMutableFile;
7 include protocol PChildToParentStream; // FIXME: bug 792908
8 include protocol PFileDescriptorSet; // FIXME: bug 792908
9 include protocol PParentToChildStream; // FIXME: bug 792908
10 include protocol PRemoteLazyInputStream; // FIXME: bug 792908
14 include ProtocolTypes;
16 include "mozilla/dom/indexedDB/SerializationHelpers.h";
17 include "mozilla/dom/quota/SerializationHelpers.h";
19 using struct mozilla::null_t from "mozilla/ipc/IPCCore.h";
21 using struct mozilla::void_t from "mozilla/ipc/IPCCore.h";
23 using mozilla::dom::IDBCursor::Direction
24 from "mozilla/dom/IDBCursor.h";
26 using mozilla::dom::indexedDB::StructuredCloneFileBase::FileType
27 from "mozilla/dom/IndexedDatabase.h";
29 using class mozilla::dom::indexedDB::Key
30 from "mozilla/dom/indexedDB/Key.h";
32 using class mozilla::dom::indexedDB::KeyPath
33 from "mozilla/dom/indexedDB/KeyPath.h";
35 using mozilla::dom::quota::PersistenceType
36 from "mozilla/dom/quota/PersistenceType.h";
38 [MoveOnly=data] using mozilla::SerializedStructuredCloneBuffer
39 from "mozilla/ipc/SerializedStructuredCloneBuffer.h";
45 struct SerializedKeyRange
54 union BlobOrMutableFile
58 PBackgroundMutableFile;
61 struct SerializedStructuredCloneFile
63 BlobOrMutableFile file;
67 struct SerializedStructuredCloneReadInfo
69 SerializedStructuredCloneBuffer data;
70 SerializedStructuredCloneFile[] files;
71 bool hasPreprocessInfo;
74 struct SerializedStructuredCloneWriteInfo
76 SerializedStructuredCloneBuffer data;
77 uint64_t offsetToKeyProp;
80 struct IndexUpdateInfo
87 struct DatabaseMetadata
91 PersistenceType persistenceType;
94 struct ObjectStoreMetadata
115 DatabaseMetadata metadata;
116 ObjectStoreSpec[] objectStores;
119 struct ObjectStoreSpec
121 ObjectStoreMetadata metadata;
122 IndexMetadata[] indexes;
125 struct CommonOpenCursorParams
127 int64_t objectStoreId;
128 SerializedKeyRange? optionalKeyRange;
132 struct ObjectStoreOpenCursorParams
134 CommonOpenCursorParams commonParams;
137 struct ObjectStoreOpenKeyCursorParams
139 CommonOpenCursorParams commonParams;
142 struct CommonIndexOpenCursorParams
144 CommonOpenCursorParams commonParams;
148 struct IndexOpenCursorParams
150 CommonIndexOpenCursorParams commonIndexParams;
153 struct IndexOpenKeyCursorParams
155 CommonIndexOpenCursorParams commonIndexParams;
158 // TODO: Actually, using a union here is not very nice, unless IPDL supported
159 // struct inheritance. Alternatively, if IPDL supported enums, we could merge
160 // the subtypes into one. Using a plain integer for discriminating the
161 // subtypes would be too error-prone.
162 union OpenCursorParams
164 ObjectStoreOpenCursorParams;
165 ObjectStoreOpenKeyCursorParams;
166 IndexOpenCursorParams;
167 IndexOpenKeyCursorParams;
170 union DatabaseOrMutableFile
172 PBackgroundIDBDatabaseFile;
173 PBackgroundMutableFile;
178 DatabaseOrMutableFile file;
182 struct ObjectStoreAddPutParams
184 int64_t objectStoreId;
185 SerializedStructuredCloneWriteInfo cloneInfo;
187 IndexUpdateInfo[] indexUpdateInfos;
188 FileAddInfo[] fileAddInfos;
191 struct ObjectStoreAddParams
193 ObjectStoreAddPutParams commonParams;
196 struct ObjectStorePutParams
198 ObjectStoreAddPutParams commonParams;
201 struct ObjectStoreGetParams
203 int64_t objectStoreId;
204 SerializedKeyRange keyRange;
207 struct ObjectStoreGetKeyParams
209 int64_t objectStoreId;
210 SerializedKeyRange keyRange;
213 struct ObjectStoreGetAllParams
215 int64_t objectStoreId;
216 SerializedKeyRange? optionalKeyRange;
220 struct ObjectStoreGetAllKeysParams
222 int64_t objectStoreId;
223 SerializedKeyRange? optionalKeyRange;
227 struct ObjectStoreDeleteParams
229 int64_t objectStoreId;
230 SerializedKeyRange keyRange;
233 struct ObjectStoreClearParams
235 int64_t objectStoreId;
238 struct ObjectStoreCountParams
240 int64_t objectStoreId;
241 SerializedKeyRange? optionalKeyRange;
244 struct IndexGetParams
246 int64_t objectStoreId;
248 SerializedKeyRange keyRange;
251 struct IndexGetKeyParams
253 int64_t objectStoreId;
255 SerializedKeyRange keyRange;
258 struct IndexGetAllParams
260 int64_t objectStoreId;
262 SerializedKeyRange? optionalKeyRange;
266 struct IndexGetAllKeysParams
268 int64_t objectStoreId;
270 SerializedKeyRange? optionalKeyRange;
274 struct IndexCountParams
276 int64_t objectStoreId;
278 SerializedKeyRange? optionalKeyRange;
283 ObjectStoreAddParams;
284 ObjectStorePutParams;
285 ObjectStoreGetParams;
286 ObjectStoreGetKeyParams;
287 ObjectStoreGetAllParams;
288 ObjectStoreGetAllKeysParams;
289 ObjectStoreDeleteParams;
290 ObjectStoreClearParams;
291 ObjectStoreCountParams;
295 IndexGetAllKeysParams;
301 nsID backgroundChildLoggingId;
302 int64_t nextTransactionSerialNumber;
303 int64_t nextVersionChangeTransactionSerialNumber;
304 uint64_t nextRequestSerialNumber;
307 } // namespace indexedDB
309 } // namespace mozilla