Source code

Revision control

Other Tools

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 PBackgroundIDBTransaction;
6
include protocol PBackgroundIDBVersionChangeTransaction;
7
include protocol PBackgroundMutableFile;
8
include protocol PChildToParentStream; // FIXME: bug 792908
9
include protocol PFileDescriptorSet; // FIXME: bug 792908
10
include protocol PIPCBlobInputStream; // FIXME: bug 792908
11
include protocol PParentToChildStream; // FIXME: bug 792908
12
13
include PBackgroundIDBSharedTypes;
14
15
include "mozilla/dom/indexedDB/SerializationHelpers.h";
16
17
using struct mozilla::void_t
18
from "ipc/IPCMessageUtils.h";
19
20
using class mozilla::dom::indexedDB::Key
21
from "mozilla/dom/indexedDB/Key.h";
22
23
namespace mozilla {
24
namespace dom {
25
namespace indexedDB {
26
27
struct ContinueParams
28
{
29
Key key;
30
};
31
32
struct ContinuePrimaryKeyParams
33
{
34
Key key;
35
Key primaryKey;
36
};
37
38
struct AdvanceParams
39
{
40
uint32_t count;
41
};
42
43
union CursorRequestParams
44
{
45
ContinueParams;
46
ContinuePrimaryKeyParams;
47
AdvanceParams;
48
};
49
50
struct ObjectStoreCursorResponse
51
{
52
Key key;
53
SerializedStructuredCloneReadInfo cloneInfo;
54
};
55
56
struct ObjectStoreKeyCursorResponse
57
{
58
Key key;
59
};
60
61
struct IndexCursorResponse
62
{
63
Key key;
64
Key sortKey;
65
Key objectKey;
66
SerializedStructuredCloneReadInfo cloneInfo;
67
};
68
69
struct IndexKeyCursorResponse
70
{
71
Key key;
72
Key sortKey;
73
Key objectKey;
74
};
75
76
// TODO: All cursor responses must be arrays!
77
union CursorResponse
78
{
79
void_t;
80
nsresult;
81
ObjectStoreCursorResponse[];
82
ObjectStoreKeyCursorResponse[];
83
IndexCursorResponse[];
84
IndexKeyCursorResponse[];
85
};
86
87
protocol PBackgroundIDBCursor
88
{
89
manager PBackgroundIDBTransaction or PBackgroundIDBVersionChangeTransaction;
90
91
parent:
92
async DeleteMe();
93
94
async Continue(CursorRequestParams params, Key currentKey,
95
Key currentObjectStoreKey);
96
97
child:
98
async __delete__();
99
100
async Response(CursorResponse response);
101
};
102
103
} // namespace indexedDB
104
} // namespace dom
105
} // namespace mozilla