2015-04-14 01:18:19 +03:00
|
|
|
/* 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/. */
|
|
|
|
|
2015-04-16 22:00:15 +03:00
|
|
|
include protocol PCache;
|
2015-04-14 01:18:19 +03:00
|
|
|
include protocol PCacheStreamControl;
|
2016-05-15 20:32:09 +03:00
|
|
|
include protocol PSendStream;
|
|
|
|
include IPCStream;
|
2015-05-25 21:21:05 +03:00
|
|
|
include ChannelInfo;
|
2015-06-05 07:39:34 +03:00
|
|
|
include PBackgroundSharedTypes;
|
2015-04-14 01:18:19 +03:00
|
|
|
|
2015-04-16 22:00:15 +03:00
|
|
|
using HeadersGuardEnum from "mozilla/dom/cache/IPCUtils.h";
|
2016-02-27 22:08:58 +03:00
|
|
|
using ReferrerPolicy from "mozilla/dom/cache/IPCUtils.h";
|
2015-04-16 22:00:15 +03:00
|
|
|
using RequestCredentials from "mozilla/dom/cache/IPCUtils.h";
|
|
|
|
using RequestMode from "mozilla/dom/cache/IPCUtils.h";
|
|
|
|
using RequestCache from "mozilla/dom/cache/IPCUtils.h";
|
2015-09-01 00:26:30 +03:00
|
|
|
using RequestRedirect from "mozilla/dom/cache/IPCUtils.h";
|
2015-04-16 22:00:15 +03:00
|
|
|
using ResponseType from "mozilla/dom/cache/IPCUtils.h";
|
2015-04-14 01:18:19 +03:00
|
|
|
using mozilla::void_t from "ipc/IPCMessageUtils.h";
|
|
|
|
using struct nsID from "nsID.h";
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
namespace cache {
|
|
|
|
|
2015-04-16 22:00:15 +03:00
|
|
|
struct CacheQueryParams
|
2015-04-14 01:18:19 +03:00
|
|
|
{
|
|
|
|
bool ignoreSearch;
|
|
|
|
bool ignoreMethod;
|
|
|
|
bool ignoreVary;
|
|
|
|
bool cacheNameSet;
|
|
|
|
nsString cacheName;
|
|
|
|
};
|
|
|
|
|
2015-04-16 22:00:15 +03:00
|
|
|
struct CacheReadStream
|
2015-04-14 01:18:19 +03:00
|
|
|
{
|
|
|
|
nsID id;
|
|
|
|
nullable PCacheStreamControl control;
|
2016-05-15 20:32:09 +03:00
|
|
|
IPCStream stream;
|
2015-04-14 01:18:19 +03:00
|
|
|
};
|
|
|
|
|
2015-04-16 22:00:15 +03:00
|
|
|
union CacheReadStreamOrVoid
|
2015-04-14 01:18:19 +03:00
|
|
|
{
|
|
|
|
void_t;
|
2015-04-16 22:00:15 +03:00
|
|
|
CacheReadStream;
|
2015-04-14 01:18:19 +03:00
|
|
|
};
|
|
|
|
|
2015-04-16 22:00:15 +03:00
|
|
|
struct HeadersEntry
|
|
|
|
{
|
|
|
|
nsCString name;
|
|
|
|
nsCString value;
|
|
|
|
};
|
|
|
|
|
2015-04-16 22:00:15 +03:00
|
|
|
struct CacheRequest
|
2015-04-14 01:18:19 +03:00
|
|
|
{
|
|
|
|
nsCString method;
|
2015-06-17 03:39:05 +03:00
|
|
|
nsCString urlWithoutQuery;
|
2015-06-17 03:39:05 +03:00
|
|
|
nsCString urlQuery;
|
2015-04-16 22:00:15 +03:00
|
|
|
HeadersEntry[] headers;
|
2015-04-14 01:18:19 +03:00
|
|
|
HeadersGuardEnum headersGuard;
|
|
|
|
nsString referrer;
|
2016-02-27 22:08:58 +03:00
|
|
|
ReferrerPolicy referrerPolicy;
|
2015-04-14 01:18:19 +03:00
|
|
|
RequestMode mode;
|
|
|
|
RequestCredentials credentials;
|
2015-04-16 22:00:15 +03:00
|
|
|
CacheReadStreamOrVoid body;
|
2015-04-14 01:18:19 +03:00
|
|
|
uint32_t contentPolicyType;
|
|
|
|
RequestCache requestCache;
|
2015-09-01 00:26:30 +03:00
|
|
|
RequestRedirect requestRedirect;
|
2015-04-14 01:18:19 +03:00
|
|
|
};
|
|
|
|
|
2015-04-16 22:00:15 +03:00
|
|
|
union CacheRequestOrVoid
|
2015-04-14 01:18:19 +03:00
|
|
|
{
|
|
|
|
void_t;
|
2015-04-16 22:00:15 +03:00
|
|
|
CacheRequest;
|
2015-04-14 01:18:19 +03:00
|
|
|
};
|
|
|
|
|
2015-04-16 22:00:15 +03:00
|
|
|
struct CacheResponse
|
2015-04-14 01:18:19 +03:00
|
|
|
{
|
|
|
|
ResponseType type;
|
2016-05-03 04:48:40 +03:00
|
|
|
nsCString[] urlList;
|
2015-04-14 01:18:19 +03:00
|
|
|
uint32_t status;
|
|
|
|
nsCString statusText;
|
2015-04-16 22:00:15 +03:00
|
|
|
HeadersEntry[] headers;
|
2015-04-14 01:18:19 +03:00
|
|
|
HeadersGuardEnum headersGuard;
|
2015-04-16 22:00:15 +03:00
|
|
|
CacheReadStreamOrVoid body;
|
2015-05-25 21:21:05 +03:00
|
|
|
IPCChannelInfo channelInfo;
|
2015-06-05 07:39:34 +03:00
|
|
|
OptionalPrincipalInfo principalInfo;
|
2015-04-14 01:18:19 +03:00
|
|
|
};
|
|
|
|
|
2015-04-16 22:00:15 +03:00
|
|
|
union CacheResponseOrVoid
|
2015-04-14 01:18:19 +03:00
|
|
|
{
|
|
|
|
void_t;
|
2015-04-16 22:00:15 +03:00
|
|
|
CacheResponse;
|
2015-04-14 01:18:19 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct CacheRequestResponse
|
|
|
|
{
|
2015-04-16 22:00:15 +03:00
|
|
|
CacheRequest request;
|
|
|
|
CacheResponse response;
|
2015-04-14 01:18:19 +03:00
|
|
|
};
|
|
|
|
|
2015-04-16 22:00:15 +03:00
|
|
|
struct CacheMatchArgs
|
|
|
|
{
|
2015-04-16 22:00:15 +03:00
|
|
|
CacheRequest request;
|
|
|
|
CacheQueryParams params;
|
2015-04-16 22:00:15 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct CacheMatchAllArgs
|
|
|
|
{
|
2015-04-16 22:00:15 +03:00
|
|
|
CacheRequestOrVoid requestOrVoid;
|
|
|
|
CacheQueryParams params;
|
2015-04-16 22:00:15 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct CachePutAllArgs
|
|
|
|
{
|
|
|
|
CacheRequestResponse[] requestResponseList;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct CacheDeleteArgs
|
|
|
|
{
|
2015-04-16 22:00:15 +03:00
|
|
|
CacheRequest request;
|
|
|
|
CacheQueryParams params;
|
2015-04-16 22:00:15 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct CacheKeysArgs
|
|
|
|
{
|
2015-04-16 22:00:15 +03:00
|
|
|
CacheRequestOrVoid requestOrVoid;
|
|
|
|
CacheQueryParams params;
|
2015-04-16 22:00:15 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct StorageMatchArgs
|
|
|
|
{
|
2015-04-16 22:00:15 +03:00
|
|
|
CacheRequest request;
|
|
|
|
CacheQueryParams params;
|
2015-04-16 22:00:15 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
|
{
|
2015-04-16 22:00:15 +03:00
|
|
|
CacheResponseOrVoid responseOrVoid;
|
2015-04-16 22:00:15 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct CacheMatchAllResult
|
|
|
|
{
|
2015-04-16 22:00:15 +03:00
|
|
|
CacheResponse[] responseList;
|
2015-04-16 22:00:15 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct CachePutAllResult
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
struct CacheDeleteResult
|
|
|
|
{
|
|
|
|
bool success;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct CacheKeysResult
|
|
|
|
{
|
2015-04-16 22:00:15 +03:00
|
|
|
CacheRequest[] requestList;
|
2015-04-16 22:00:15 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct StorageMatchResult
|
|
|
|
{
|
2015-04-16 22:00:15 +03:00
|
|
|
CacheResponseOrVoid responseOrVoid;
|
2015-04-16 22:00:15 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct StorageHasResult
|
|
|
|
{
|
|
|
|
bool success;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct StorageOpenResult
|
|
|
|
{
|
|
|
|
nullable PCache actor;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct StorageDeleteResult
|
|
|
|
{
|
|
|
|
bool success;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct StorageKeysResult
|
|
|
|
{
|
|
|
|
nsString[] keyList;
|
|
|
|
};
|
|
|
|
|
|
|
|
union CacheOpResult
|
|
|
|
{
|
|
|
|
void_t;
|
|
|
|
CacheMatchResult;
|
|
|
|
CacheMatchAllResult;
|
|
|
|
CachePutAllResult;
|
|
|
|
CacheDeleteResult;
|
|
|
|
CacheKeysResult;
|
|
|
|
StorageMatchResult;
|
|
|
|
StorageHasResult;
|
|
|
|
StorageOpenResult;
|
|
|
|
StorageDeleteResult;
|
|
|
|
StorageKeysResult;
|
|
|
|
};
|
|
|
|
|
2015-04-14 01:18:19 +03:00
|
|
|
} // namespace cache
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|