/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ include protocol PCache; include protocol PCacheStreamControl; include protocol PChildToParentStream; include IPCStream; include ChannelInfo; include PBackgroundSharedTypes; using HeadersGuardEnum from "mozilla/dom/FetchIPCTypes.h"; using Namespace from "mozilla/dom/cache/IPCUtils.h"; using OpenMode from "mozilla/dom/cache/IPCUtils.h"; using ReferrerPolicy from "mozilla/dom/FetchIPCTypes.h"; using RequestCredentials from "mozilla/dom/FetchIPCTypes.h"; using RequestMode from "mozilla/dom/FetchIPCTypes.h"; using RequestCache from "mozilla/dom/FetchIPCTypes.h"; using RequestRedirect from "mozilla/dom/FetchIPCTypes.h"; using ResponseType from "mozilla/dom/FetchIPCTypes.h"; using mozilla::void_t from "ipc/IPCMessageUtils.h"; using struct nsID from "nsID.h"; namespace mozilla { namespace dom { namespace cache { struct CacheQueryParams { bool ignoreSearch; bool ignoreMethod; bool ignoreVary; bool cacheNameSet; nsString cacheName; }; struct CacheReadStream { nsID id; nullable PCacheStreamControl control; IPCStream? stream; }; struct HeadersEntry { nsCString name; nsCString value; }; struct CacheRequest { nsCString method; nsCString urlWithoutQuery; nsCString urlQuery; nsCString urlFragment; HeadersEntry[] headers; HeadersGuardEnum headersGuard; nsString referrer; ReferrerPolicy referrerPolicy; RequestMode mode; RequestCredentials credentials; CacheReadStream? body; uint32_t contentPolicyType; RequestCache requestCache; RequestRedirect requestRedirect; nsString integrity; }; struct CacheResponse { ResponseType type; nsCString[] urlList; uint32_t status; nsCString statusText; HeadersEntry[] headers; HeadersGuardEnum headersGuard; CacheReadStream? body; IPCChannelInfo channelInfo; PrincipalInfo? principalInfo; uint32_t paddingInfo; int64_t paddingSize; }; struct CacheRequestResponse { CacheRequest request; CacheResponse response; }; struct CacheMatchArgs { CacheRequest request; CacheQueryParams params; OpenMode openMode; }; struct CacheMatchAllArgs { CacheRequest? maybeRequest; CacheQueryParams params; OpenMode openMode; }; struct CachePutAllArgs { CacheRequestResponse[] requestResponseList; }; struct CacheDeleteArgs { CacheRequest request; CacheQueryParams params; }; struct CacheKeysArgs { CacheRequest? maybeRequest; CacheQueryParams params; OpenMode openMode; }; struct StorageMatchArgs { CacheRequest request; CacheQueryParams params; OpenMode openMode; }; struct StorageHasArgs { nsString key; }; struct StorageOpenArgs { nsString key; }; struct StorageDeleteArgs { nsString key; }; struct StorageKeysArgs { }; union CacheOpArgs { CacheMatchArgs; CacheMatchAllArgs; CachePutAllArgs; CacheDeleteArgs; CacheKeysArgs; StorageMatchArgs; StorageHasArgs; StorageOpenArgs; StorageDeleteArgs; StorageKeysArgs; }; struct CacheMatchResult { CacheResponse? maybeResponse; }; struct CacheMatchAllResult { CacheResponse[] responseList; }; struct CachePutAllResult { }; struct CacheDeleteResult { bool success; }; struct CacheKeysResult { CacheRequest[] requestList; }; struct StorageMatchResult { CacheResponse? maybeResponse; }; struct StorageHasResult { bool success; }; struct StorageOpenResult { nullable PCache actor; Namespace ns; }; struct StorageDeleteResult { bool success; }; struct StorageKeysResult { nsString[] keyList; }; union CacheOpResult { void_t; CacheMatchResult; CacheMatchAllResult; CachePutAllResult; CacheDeleteResult; CacheKeysResult; StorageMatchResult; StorageHasResult; StorageOpenResult; StorageDeleteResult; StorageKeysResult; }; } // namespace cache } // namespace dom } // namespace mozilla