Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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 PBlob;
6 include protocol PIndexedDBCursor;
7 include protocol PIndexedDBIndex;
8 include protocol PIndexedDBObjectStore;
10 include "mozilla/dom/indexedDB/SerializationHelpers.h";
12 using class mozilla::dom::indexedDB::Key from "mozilla/dom/indexedDB/Key.h";
13 using struct mozilla::dom::indexedDB::SerializedStructuredCloneReadInfo from "mozilla/dom/indexedDB/IndexedDatabase.h";
15 using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
17 namespace mozilla {
18 namespace dom {
19 namespace indexedDB {
21 namespace ipc {
23 struct GetResponse
24 {
25 SerializedStructuredCloneReadInfo cloneInfo;
26 PBlob[] blobs;
27 };
29 struct GetKeyResponse
30 {
31 Key key;
32 };
34 struct BlobArray
35 {
36 PBlob[] blobs;
37 };
39 struct GetAllResponse
40 {
41 SerializedStructuredCloneReadInfo[] cloneInfos;
42 BlobArray[] blobs;
43 };
45 struct GetAllKeysResponse
46 {
47 Key[] keys;
48 };
50 struct AddResponse
51 {
52 Key key;
53 };
55 struct PutResponse
56 {
57 Key key;
58 };
60 struct DeleteResponse
61 { };
63 struct ClearResponse
64 { };
66 struct CountResponse
67 {
68 uint64_t count;
69 };
71 union OpenCursorResponse
72 {
73 PIndexedDBCursor;
74 void_t;
75 };
77 struct ContinueResponse
78 {
79 Key key;
80 Key objectKey;
81 SerializedStructuredCloneReadInfo cloneInfo;
82 PBlob[] blobs;
83 };
85 union ResponseValue
86 {
87 nsresult;
88 GetResponse;
89 GetKeyResponse;
90 GetAllResponse;
91 GetAllKeysResponse;
92 AddResponse;
93 PutResponse;
94 DeleteResponse;
95 ClearResponse;
96 CountResponse;
97 OpenCursorResponse;
98 ContinueResponse;
99 };
101 } // namespace ipc
103 protocol PIndexedDBRequest
104 {
105 manager PIndexedDBObjectStore or PIndexedDBIndex or PIndexedDBCursor;
107 child:
108 __delete__(ResponseValue response);
109 };
111 } // namespace indexedDB
112 } // namespace dom
113 } // namespace mozilla