|
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
|
4 * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 |
|
6 include protocol PBlob; |
|
7 include protocol PContent; |
|
8 |
|
9 namespace mozilla { |
|
10 namespace dom { |
|
11 namespace devicestorage { |
|
12 |
|
13 |
|
14 struct ErrorResponse |
|
15 { |
|
16 nsString error; |
|
17 }; |
|
18 |
|
19 struct SuccessResponse |
|
20 { |
|
21 }; |
|
22 |
|
23 struct FileDescriptorResponse |
|
24 { |
|
25 FileDescriptor fileDescriptor; |
|
26 }; |
|
27 |
|
28 struct BlobResponse |
|
29 { |
|
30 PBlob blob; |
|
31 }; |
|
32 |
|
33 struct DeviceStorageFileValue |
|
34 { |
|
35 nsString storageName; |
|
36 nsString name; |
|
37 }; |
|
38 |
|
39 struct EnumerationResponse |
|
40 { |
|
41 nsString type; |
|
42 nsString rootdir; |
|
43 DeviceStorageFileValue[] paths; |
|
44 }; |
|
45 |
|
46 struct FreeSpaceStorageResponse |
|
47 { |
|
48 uint64_t freeBytes; |
|
49 }; |
|
50 |
|
51 struct UsedSpaceStorageResponse |
|
52 { |
|
53 uint64_t usedBytes; |
|
54 }; |
|
55 |
|
56 struct AvailableStorageResponse |
|
57 { |
|
58 nsString mountState; |
|
59 }; |
|
60 |
|
61 struct StorageStatusResponse |
|
62 { |
|
63 nsString storageStatus; |
|
64 }; |
|
65 |
|
66 struct FormatStorageResponse |
|
67 { |
|
68 nsString mountState; |
|
69 }; |
|
70 |
|
71 struct MountStorageResponse |
|
72 { |
|
73 nsString storageStatus; |
|
74 }; |
|
75 |
|
76 struct UnmountStorageResponse |
|
77 { |
|
78 nsString storageStatus; |
|
79 }; |
|
80 |
|
81 union DeviceStorageResponseValue |
|
82 { |
|
83 ErrorResponse; |
|
84 SuccessResponse; |
|
85 FileDescriptorResponse; |
|
86 BlobResponse; |
|
87 EnumerationResponse; |
|
88 FreeSpaceStorageResponse; |
|
89 UsedSpaceStorageResponse; |
|
90 AvailableStorageResponse; |
|
91 StorageStatusResponse; |
|
92 FormatStorageResponse; |
|
93 MountStorageResponse; |
|
94 UnmountStorageResponse; |
|
95 }; |
|
96 |
|
97 sync protocol PDeviceStorageRequest { |
|
98 manager PContent; |
|
99 child: |
|
100 __delete__(DeviceStorageResponseValue response); |
|
101 }; |
|
102 |
|
103 } // namespace devicestorage |
|
104 } // namespace dom |
|
105 } // namespace mozilla |