Bug 1850460 - Removed file build/build-clang/revert-llvmorg-18-init-3787-gb6a1473f97d...
[gecko.git] / dom / cache / CacheTypes.ipdlh
blobdee420e2119f2dc7c397369174ab45e18b06635e
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   nsString referrer;
63   ReferrerPolicy referrerPolicy;
64   RequestMode mode;
65   RequestCredentials credentials;
66   CacheReadStream? body;
67   nsContentPolicyType contentPolicyType;
68   RequestCache requestCache;
69   RequestRedirect requestRedirect;
70   nsString integrity;
71   CrossOriginEmbedderPolicy loadingEmbedderPolicy;
72   PrincipalInfo? principalInfo;
75 struct CacheResponse
77   ResponseType type;
78   nsCString[] urlList;
79   uint32_t status;
80   nsCString statusText;
81   HeadersEntry[] headers;
82   HeadersGuardEnum headersGuard;
83   CacheReadStream? body;
84   nullable nsITransportSecurityInfo securityInfo;
85   PrincipalInfo? principalInfo;
86   uint32_t paddingInfo;
87   int64_t paddingSize;
88   RequestCredentials credentials;
91 struct CacheRequestResponse
93   CacheRequest request;
94   CacheResponse response;
97 struct CacheMatchArgs
99   CacheRequest request;
100   CacheQueryParams params;
101   OpenMode openMode;
104 struct CacheMatchAllArgs
106   CacheRequest? maybeRequest;
107   CacheQueryParams params;
108   OpenMode openMode;
111 struct CachePutAllArgs
113   CacheRequestResponse[] requestResponseList;
116 struct CacheDeleteArgs
118   CacheRequest request;
119   CacheQueryParams params;
122 struct CacheKeysArgs
124   CacheRequest? maybeRequest;
125   CacheQueryParams params;
126   OpenMode openMode;
129 struct StorageMatchArgs
131   CacheRequest request;
132   CacheQueryParams params;
133   OpenMode openMode;
136 struct StorageHasArgs
138   nsString key;
141 struct StorageOpenArgs
143   nsString key;
146 struct StorageDeleteArgs
148   nsString key;
151 struct StorageKeysArgs
155 union CacheOpArgs
157   CacheMatchArgs;
158   CacheMatchAllArgs;
159   CachePutAllArgs;
160   CacheDeleteArgs;
161   CacheKeysArgs;
162   StorageMatchArgs;
163   StorageHasArgs;
164   StorageOpenArgs;
165   StorageDeleteArgs;
166   StorageKeysArgs;
169 struct CacheMatchResult
171   CacheResponse? maybeResponse;
174 struct CacheMatchAllResult
176   CacheResponse[] responseList;
179 struct CachePutAllResult
183 struct CacheDeleteResult
185   bool success;
188 struct CacheKeysResult
190   CacheRequest[] requestList;
193 struct StorageMatchResult
195   CacheResponse? maybeResponse;
198 struct StorageHasResult
200   bool success;
203 struct StorageOpenResult
205   nullable PCache actor;
206   Namespace ns;
209 struct StorageDeleteResult
211   bool success;
214 struct StorageKeysResult
216   nsString[] keyList;
219 union CacheOpResult
221   void_t;
222   CacheMatchResult;
223   CacheMatchAllResult;
224   CachePutAllResult;
225   CacheDeleteResult;
226   CacheKeysResult;
227   StorageMatchResult;
228   StorageHasResult;
229   StorageOpenResult;
230   StorageDeleteResult;
231   StorageKeysResult;
234 } // namespace cache
235 } // namespace dom
236 } // namespace mozilla