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
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
michael@0 | 3 | * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | include protocol PBlob; |
michael@0 | 6 | include protocol PIndexedDBCursor; |
michael@0 | 7 | include protocol PIndexedDBIndex; |
michael@0 | 8 | include protocol PIndexedDBRequest; |
michael@0 | 9 | include protocol PIndexedDBTransaction; |
michael@0 | 10 | |
michael@0 | 11 | include IndexedDBParams; |
michael@0 | 12 | |
michael@0 | 13 | using struct mozilla::dom::indexedDB::IndexInfo from "mozilla/dom/indexedDB/DatabaseInfo.h"; |
michael@0 | 14 | using struct mozilla::dom::indexedDB::IndexUpdateInfo from "mozilla/dom/indexedDB/DatabaseInfo.h"; |
michael@0 | 15 | using struct mozilla::dom::indexedDB::SerializedStructuredCloneWriteInfo from "mozilla/dom/indexedDB/IndexedDatabase.h"; |
michael@0 | 16 | |
michael@0 | 17 | namespace mozilla { |
michael@0 | 18 | namespace dom { |
michael@0 | 19 | namespace indexedDB { |
michael@0 | 20 | |
michael@0 | 21 | namespace ipc { |
michael@0 | 22 | |
michael@0 | 23 | struct AddPutParams |
michael@0 | 24 | { |
michael@0 | 25 | SerializedStructuredCloneWriteInfo cloneInfo; |
michael@0 | 26 | Key key; |
michael@0 | 27 | IndexUpdateInfo[] indexUpdateInfos; |
michael@0 | 28 | PBlob[] blobs; |
michael@0 | 29 | }; |
michael@0 | 30 | |
michael@0 | 31 | struct AddParams |
michael@0 | 32 | { |
michael@0 | 33 | AddPutParams commonParams; |
michael@0 | 34 | }; |
michael@0 | 35 | |
michael@0 | 36 | struct PutParams |
michael@0 | 37 | { |
michael@0 | 38 | AddPutParams commonParams; |
michael@0 | 39 | }; |
michael@0 | 40 | |
michael@0 | 41 | struct DeleteParams |
michael@0 | 42 | { |
michael@0 | 43 | KeyRange keyRange; |
michael@0 | 44 | }; |
michael@0 | 45 | |
michael@0 | 46 | struct ClearParams |
michael@0 | 47 | { |
michael@0 | 48 | }; |
michael@0 | 49 | |
michael@0 | 50 | union ObjectStoreRequestParams |
michael@0 | 51 | { |
michael@0 | 52 | GetParams; |
michael@0 | 53 | GetAllParams; |
michael@0 | 54 | GetAllKeysParams; |
michael@0 | 55 | AddParams; |
michael@0 | 56 | PutParams; |
michael@0 | 57 | DeleteParams; |
michael@0 | 58 | ClearParams; |
michael@0 | 59 | CountParams; |
michael@0 | 60 | OpenCursorParams; |
michael@0 | 61 | OpenKeyCursorParams; |
michael@0 | 62 | }; |
michael@0 | 63 | |
michael@0 | 64 | struct CreateIndexParams |
michael@0 | 65 | { |
michael@0 | 66 | IndexInfo info; |
michael@0 | 67 | }; |
michael@0 | 68 | |
michael@0 | 69 | struct GetIndexParams |
michael@0 | 70 | { |
michael@0 | 71 | nsString name; |
michael@0 | 72 | }; |
michael@0 | 73 | |
michael@0 | 74 | union IndexConstructorParams |
michael@0 | 75 | { |
michael@0 | 76 | CreateIndexParams; |
michael@0 | 77 | GetIndexParams; |
michael@0 | 78 | }; |
michael@0 | 79 | |
michael@0 | 80 | struct ObjectStoreCursorConstructorParams |
michael@0 | 81 | { |
michael@0 | 82 | PIndexedDBRequest request; |
michael@0 | 83 | Direction direction; |
michael@0 | 84 | Key key; |
michael@0 | 85 | OptionalStructuredCloneReadInfo optionalCloneInfo; |
michael@0 | 86 | PBlob[] blobs; |
michael@0 | 87 | }; |
michael@0 | 88 | |
michael@0 | 89 | } // namespace ipc |
michael@0 | 90 | |
michael@0 | 91 | protocol PIndexedDBObjectStore |
michael@0 | 92 | { |
michael@0 | 93 | manager PIndexedDBTransaction; |
michael@0 | 94 | |
michael@0 | 95 | manages PIndexedDBCursor; |
michael@0 | 96 | manages PIndexedDBIndex; |
michael@0 | 97 | manages PIndexedDBRequest; |
michael@0 | 98 | |
michael@0 | 99 | parent: |
michael@0 | 100 | __delete__(); |
michael@0 | 101 | |
michael@0 | 102 | PIndexedDBIndex(IndexConstructorParams params); |
michael@0 | 103 | PIndexedDBRequest(ObjectStoreRequestParams params); |
michael@0 | 104 | |
michael@0 | 105 | DeleteIndex(nsString name); |
michael@0 | 106 | |
michael@0 | 107 | child: |
michael@0 | 108 | PIndexedDBCursor(ObjectStoreCursorConstructorParams params); |
michael@0 | 109 | }; |
michael@0 | 110 | |
michael@0 | 111 | } // namespace indexedDB |
michael@0 | 112 | } // namespace dom |
michael@0 | 113 | } // namespace mozilla |