Backed out changeset 1d9301697aa0 (bug 1887752) for causing failures on browser_all_f...
[gecko.git] / dom / cache / CacheTypes.ipdlh
blob5a0bafc737323e5905f684b97a308adb24802a46
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
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 include protocol PCache;
6 include protocol PCacheStreamControl;
7 include IPCStream;
8 include PBackgroundSharedTypes;
10 include "mozilla/dom/cache/IPCUtils.h";
11 include "mozilla/dom/FetchIPCTypes.h";
12 include "mozilla/ipc/TransportSecurityInfoUtils.h";
14 using mozilla::dom::HeadersGuardEnum from "mozilla/dom/HeadersBinding.h";
15 using mozilla::dom::cache::Namespace from "mozilla/dom/cache/Types.h";
16 using mozilla::dom::cache::OpenMode from "mozilla/dom/cache/Types.h";
17 using mozilla::dom::ReferrerPolicy from "mozilla/dom/ReferrerPolicyBinding.h";
18 using mozilla::dom::RequestCredentials from "mozilla/dom/RequestBinding.h";
19 using mozilla::dom::RequestMode from "mozilla/dom/RequestBinding.h";
20 using mozilla::dom::RequestCache from "mozilla/dom/RequestBinding.h";
21 using mozilla::dom::RequestRedirect from "mozilla/dom/RequestBinding.h";
22 using mozilla::dom::ResponseType from "mozilla/dom/ResponseBinding.h";
23 using mozilla::void_t from "mozilla/ipc/IPCCore.h";
24 using nsContentPolicyType from "nsIContentPolicy.h";
25 using struct nsID from "nsID.h";
26 using nsILoadInfo::CrossOriginEmbedderPolicy from "nsILoadInfo.h";
27 [RefCounted] using class nsITransportSecurityInfo from "nsITransportSecurityInfo.h";
29 namespace mozilla {
30 namespace dom {
31 namespace cache {
33 struct CacheQueryParams
35   bool ignoreSearch;
36   bool ignoreMethod;
37   bool ignoreVary;
38   bool cacheNameSet;
39   nsString cacheName;
42 struct CacheReadStream
44   nsID id;
45   nullable PCacheStreamControl control;
46   IPCStream? stream;
49 struct HeadersEntry
51   nsCString name;
52   nsCString value;
54 struct CacheRequest
56   nsCString method;
57   nsCString urlWithoutQuery;
58   nsCString urlQuery;
59   nsCString urlFragment;
60   HeadersEntry[] headers;
61   HeadersGuardEnum headersGuard;
62   nsCString referrer;
63   ReferrerPolicy referrerPolicy;
64   RequestMode mode;
65   RequestCredentials credentials;
66   CacheReadStream? body;
67   int64_t bodyDiskSize;
68   nsContentPolicyType contentPolicyType;
69   RequestCache requestCache;
70   RequestRedirect requestRedirect;
71   nsString integrity;
72   CrossOriginEmbedderPolicy loadingEmbedderPolicy;
73   PrincipalInfo? principalInfo;
76 struct CacheResponse
78   ResponseType type;
79   nsCString[] urlList;
80   uint32_t status;
81   nsCString statusText;
82   HeadersEntry[] headers;
83   HeadersGuardEnum headersGuard;
84   CacheReadStream? body;
85   int64_t bodyDiskSize;
86   nullable nsITransportSecurityInfo securityInfo;
87   PrincipalInfo? principalInfo;
88   uint32_t paddingInfo;
89   int64_t paddingSize;
90   RequestCredentials credentials;
93 struct CacheRequestResponse
95   CacheRequest request;
96   CacheResponse response;
99 struct CacheMatchArgs
101   CacheRequest request;
102   CacheQueryParams params;
103   OpenMode openMode;
106 struct CacheMatchAllArgs
108   CacheRequest? maybeRequest;
109   CacheQueryParams params;
110   OpenMode openMode;
113 struct CachePutAllArgs
115   CacheRequestResponse[] requestResponseList;
118 struct CacheDeleteArgs
120   CacheRequest request;
121   CacheQueryParams params;
124 struct CacheKeysArgs
126   CacheRequest? maybeRequest;
127   CacheQueryParams params;
128   OpenMode openMode;
131 struct StorageMatchArgs
133   CacheRequest request;
134   CacheQueryParams params;
135   OpenMode openMode;
138 struct StorageHasArgs
140   nsString key;
143 struct StorageOpenArgs
145   nsString key;
148 struct StorageDeleteArgs
150   nsString key;
153 struct StorageKeysArgs
157 union CacheOpArgs
159   CacheMatchArgs;
160   CacheMatchAllArgs;
161   CachePutAllArgs;
162   CacheDeleteArgs;
163   CacheKeysArgs;
164   StorageMatchArgs;
165   StorageHasArgs;
166   StorageOpenArgs;
167   StorageDeleteArgs;
168   StorageKeysArgs;
171 struct CacheMatchResult
173   CacheResponse? maybeResponse;
176 struct CacheMatchAllResult
178   CacheResponse[] responseList;
181 struct CachePutAllResult
185 struct CacheDeleteResult
187   bool success;
190 struct CacheKeysResult
192   CacheRequest[] requestList;
195 struct StorageMatchResult
197   CacheResponse? maybeResponse;
200 struct StorageHasResult
202   bool success;
205 struct StorageOpenResult
207   nullable PCache actor;
208   Namespace ns;
211 struct StorageDeleteResult
213   bool success;
216 struct StorageKeysResult
218   nsString[] keyList;
221 union CacheOpResult
223   void_t;
224   CacheMatchResult;
225   CacheMatchAllResult;
226   CachePutAllResult;
227   CacheDeleteResult;
228   CacheKeysResult;
229   StorageMatchResult;
230   StorageHasResult;
231   StorageOpenResult;
232   StorageDeleteResult;
233   StorageKeysResult;
236 } // namespace cache
237 } // namespace dom
238 } // namespace mozilla