|
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 PIndexedDB; |
|
6 include protocol PIndexedDBTransaction; |
|
7 |
|
8 include "mozilla/dom/indexedDB/SerializationHelpers.h"; |
|
9 |
|
10 using struct mozilla::dom::indexedDB::DatabaseInfoGuts from "mozilla/dom/indexedDB/DatabaseInfo.h"; |
|
11 using struct mozilla::dom::indexedDB::ObjectStoreInfoGuts from "mozilla/dom/indexedDB/DatabaseInfo.h"; |
|
12 using mozilla::dom::indexedDB::IDBTransaction::Mode from "mozilla/dom/indexedDB/IDBTransaction.h"; |
|
13 |
|
14 namespace mozilla { |
|
15 namespace dom { |
|
16 namespace indexedDB { |
|
17 |
|
18 namespace ipc { |
|
19 |
|
20 struct NormalTransactionParams |
|
21 { |
|
22 nsString[] names; |
|
23 Mode mode; |
|
24 }; |
|
25 |
|
26 struct VersionChangeTransactionParams |
|
27 { |
|
28 DatabaseInfoGuts dbInfo; |
|
29 ObjectStoreInfoGuts[] osInfo; |
|
30 uint64_t oldVersion; |
|
31 }; |
|
32 |
|
33 union TransactionParams |
|
34 { |
|
35 NormalTransactionParams; |
|
36 VersionChangeTransactionParams; |
|
37 }; |
|
38 |
|
39 } // namespace ipc |
|
40 |
|
41 protocol PIndexedDBDatabase |
|
42 { |
|
43 manager PIndexedDB; |
|
44 |
|
45 manages PIndexedDBTransaction; |
|
46 |
|
47 parent: |
|
48 __delete__(); |
|
49 |
|
50 Close(bool unlinked); |
|
51 |
|
52 child: |
|
53 Success(DatabaseInfoGuts dbInfo, ObjectStoreInfoGuts[] osInfo); |
|
54 |
|
55 Error(nsresult rv); |
|
56 |
|
57 Blocked(uint64_t oldVersion); |
|
58 |
|
59 VersionChange(uint64_t oldVersion, uint64_t newVersion); |
|
60 |
|
61 Invalidate(); |
|
62 |
|
63 both: |
|
64 PIndexedDBTransaction(TransactionParams params); |
|
65 }; |
|
66 |
|
67 } // namespace indexedDB |
|
68 } // namespace dom |
|
69 } // namespace mozilla |