|
1 /* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */ |
|
2 /* vim: set sw=4 ts=8 et tw=80 ft=cpp : */ |
|
3 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
4 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
6 |
|
7 include protocol PBlob; |
|
8 include InputStreamParams; |
|
9 |
|
10 using struct mozilla::SerializedStructuredCloneBuffer from "ipc/IPCMessageUtils.h"; |
|
11 |
|
12 namespace mozilla { |
|
13 namespace dom { |
|
14 |
|
15 struct ClonedMessageData |
|
16 { |
|
17 SerializedStructuredCloneBuffer data; |
|
18 PBlob[] blobs; |
|
19 }; |
|
20 |
|
21 struct NormalBlobConstructorParams |
|
22 { |
|
23 nsString contentType; |
|
24 uint64_t length; |
|
25 }; |
|
26 |
|
27 struct FileBlobConstructorParams |
|
28 { |
|
29 nsString name; |
|
30 nsString contentType; |
|
31 uint64_t length; |
|
32 uint64_t modDate; |
|
33 }; |
|
34 |
|
35 struct SlicedBlobConstructorParams |
|
36 { |
|
37 PBlob source; |
|
38 uint64_t begin; |
|
39 uint64_t end; |
|
40 nsString contentType; |
|
41 }; |
|
42 |
|
43 struct MysteryBlobConstructorParams |
|
44 { |
|
45 // Nothing is known about this type of blob. |
|
46 }; |
|
47 |
|
48 union ChildBlobConstructorParams |
|
49 { |
|
50 NormalBlobConstructorParams; |
|
51 FileBlobConstructorParams; |
|
52 SlicedBlobConstructorParams; |
|
53 MysteryBlobConstructorParams; |
|
54 }; |
|
55 |
|
56 struct ParentBlobConstructorParams |
|
57 { |
|
58 ChildBlobConstructorParams blobParams; |
|
59 OptionalInputStreamParams optionalInputStreamParams; |
|
60 }; |
|
61 |
|
62 union BlobConstructorParams |
|
63 { |
|
64 ChildBlobConstructorParams; |
|
65 ParentBlobConstructorParams; |
|
66 }; |
|
67 |
|
68 } // namespace dom |
|
69 } // namespace mozilla |