|
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/. */ |
|
4 |
|
5 include protocol PBlob; |
|
6 include protocol PIndexedDBCursor; |
|
7 include protocol PIndexedDBIndex; |
|
8 include protocol PIndexedDBObjectStore; |
|
9 |
|
10 include "mozilla/dom/indexedDB/SerializationHelpers.h"; |
|
11 |
|
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"; |
|
14 |
|
15 using struct mozilla::void_t from "ipc/IPCMessageUtils.h"; |
|
16 |
|
17 namespace mozilla { |
|
18 namespace dom { |
|
19 namespace indexedDB { |
|
20 |
|
21 namespace ipc { |
|
22 |
|
23 struct GetResponse |
|
24 { |
|
25 SerializedStructuredCloneReadInfo cloneInfo; |
|
26 PBlob[] blobs; |
|
27 }; |
|
28 |
|
29 struct GetKeyResponse |
|
30 { |
|
31 Key key; |
|
32 }; |
|
33 |
|
34 struct BlobArray |
|
35 { |
|
36 PBlob[] blobs; |
|
37 }; |
|
38 |
|
39 struct GetAllResponse |
|
40 { |
|
41 SerializedStructuredCloneReadInfo[] cloneInfos; |
|
42 BlobArray[] blobs; |
|
43 }; |
|
44 |
|
45 struct GetAllKeysResponse |
|
46 { |
|
47 Key[] keys; |
|
48 }; |
|
49 |
|
50 struct AddResponse |
|
51 { |
|
52 Key key; |
|
53 }; |
|
54 |
|
55 struct PutResponse |
|
56 { |
|
57 Key key; |
|
58 }; |
|
59 |
|
60 struct DeleteResponse |
|
61 { }; |
|
62 |
|
63 struct ClearResponse |
|
64 { }; |
|
65 |
|
66 struct CountResponse |
|
67 { |
|
68 uint64_t count; |
|
69 }; |
|
70 |
|
71 union OpenCursorResponse |
|
72 { |
|
73 PIndexedDBCursor; |
|
74 void_t; |
|
75 }; |
|
76 |
|
77 struct ContinueResponse |
|
78 { |
|
79 Key key; |
|
80 Key objectKey; |
|
81 SerializedStructuredCloneReadInfo cloneInfo; |
|
82 PBlob[] blobs; |
|
83 }; |
|
84 |
|
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 }; |
|
100 |
|
101 } // namespace ipc |
|
102 |
|
103 protocol PIndexedDBRequest |
|
104 { |
|
105 manager PIndexedDBObjectStore or PIndexedDBIndex or PIndexedDBCursor; |
|
106 |
|
107 child: |
|
108 __delete__(ResponseValue response); |
|
109 }; |
|
110 |
|
111 } // namespace indexedDB |
|
112 } // namespace dom |
|
113 } // namespace mozilla |