gecko/dom/cache/PCacheTypes.ipdlh

240 lines
3.8 KiB
Plaintext

/* 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 PCachePushStream;
include protocol PCacheStreamControl;
include PHeaders;
include InputStreamParams;
using HeadersGuardEnum from "mozilla/dom/FetchIPCUtils.h";
using RequestCredentials from "mozilla/dom/FetchIPCUtils.h";
using RequestMode from "mozilla/dom/FetchIPCUtils.h";
using RequestCache from "mozilla/dom/FetchIPCUtils.h";
using RequestContext from "mozilla/dom/FetchIPCUtils.h";
using mozilla::dom::ResponseType from "mozilla/dom/FetchIPCUtils.h";
using mozilla::void_t from "ipc/IPCMessageUtils.h";
using struct nsID from "nsID.h";
namespace mozilla {
namespace dom {
namespace cache {
struct PCacheQueryParams
{
bool ignoreSearch;
bool ignoreMethod;
bool ignoreVary;
bool cacheNameSet;
nsString cacheName;
};
struct PCacheReadStream
{
nsID id;
OptionalInputStreamParams params;
OptionalFileDescriptorSet fds;
nullable PCacheStreamControl control;
nullable PCachePushStream pushStream;
};
union PCacheReadStreamOrVoid
{
void_t;
PCacheReadStream;
};
struct PCacheRequest
{
nsCString method;
nsString url;
nsString urlWithoutQuery;
PHeadersEntry[] headers;
HeadersGuardEnum headersGuard;
nsString referrer;
RequestMode mode;
RequestCredentials credentials;
PCacheReadStreamOrVoid body;
uint32_t contentPolicyType;
RequestContext context;
RequestCache requestCache;
};
union PCacheRequestOrVoid
{
void_t;
PCacheRequest;
};
struct PCacheResponse
{
ResponseType type;
nsString url;
uint32_t status;
nsCString statusText;
PHeadersEntry[] headers;
HeadersGuardEnum headersGuard;
PCacheReadStreamOrVoid body;
nsCString securityInfo;
};
union PCacheResponseOrVoid
{
void_t;
PCacheResponse;
};
struct CacheRequestResponse
{
PCacheRequest request;
PCacheResponse response;
};
struct CacheMatchArgs
{
PCacheRequest request;
PCacheQueryParams params;
};
struct CacheMatchAllArgs
{
PCacheRequestOrVoid requestOrVoid;
PCacheQueryParams params;
};
struct CacheAddAllArgs
{
PCacheRequest[] requestList;
};
struct CachePutAllArgs
{
CacheRequestResponse[] requestResponseList;
};
struct CacheDeleteArgs
{
PCacheRequest request;
PCacheQueryParams params;
};
struct CacheKeysArgs
{
PCacheRequestOrVoid requestOrVoid;
PCacheQueryParams params;
};
struct StorageMatchArgs
{
PCacheRequest request;
PCacheQueryParams params;
};
struct StorageHasArgs
{
nsString key;
};
struct StorageOpenArgs
{
nsString key;
};
struct StorageDeleteArgs
{
nsString key;
};
struct StorageKeysArgs
{
};
union CacheOpArgs
{
CacheMatchArgs;
CacheMatchAllArgs;
CacheAddAllArgs;
CachePutAllArgs;
CacheDeleteArgs;
CacheKeysArgs;
StorageMatchArgs;
StorageHasArgs;
StorageOpenArgs;
StorageDeleteArgs;
StorageKeysArgs;
};
struct CacheMatchResult
{
PCacheResponseOrVoid responseOrVoid;
};
struct CacheMatchAllResult
{
PCacheResponse[] responseList;
};
struct CacheAddAllResult
{
};
struct CachePutAllResult
{
};
struct CacheDeleteResult
{
bool success;
};
struct CacheKeysResult
{
PCacheRequest[] requestList;
};
struct StorageMatchResult
{
PCacheResponseOrVoid responseOrVoid;
};
struct StorageHasResult
{
bool success;
};
struct StorageOpenResult
{
nullable PCache actor;
};
struct StorageDeleteResult
{
bool success;
};
struct StorageKeysResult
{
nsString[] keyList;
};
union CacheOpResult
{
void_t;
CacheMatchResult;
CacheMatchAllResult;
CacheAddAllResult;
CachePutAllResult;
CacheDeleteResult;
CacheKeysResult;
StorageMatchResult;
StorageHasResult;
StorageOpenResult;
StorageDeleteResult;
StorageKeysResult;
};
} // namespace cache
} // namespace dom
} // namespace mozilla