dom/cache/CacheTypes.ipdlh
author Mike Hommey <mh+mozilla@glandium.org>
Fri, 11 Jan 2019 16:01:15 +0000
changeset 453570 daf50f25895db073e44d50fecf2e4f6fe873865d
parent 381271 7650e58c8b52d3e4384073b3fd794c715bf76a04
child 460639 0dacb4dc82e565e4ea8bfc206c0b1c1bf9de6e70
permissions -rw-r--r--
Bug 1519307 - Add a new project to build useful parts of breakpad independently. r=froydnj With `ac_add_options --enable-project=tools/crashreporter` in a mozconfig, `./mach build` builds minidump_stackwalk, dump_syms and fileid. One caveat is that due to limitation in how the build system works currently, it's cumbersome to keep dump_syms as a host program for Gecko, and to make it a target program for this project. For now, keep it as a host program. We're not going to use it on automation, but it's still convenient to have for quick local builds (I've had to resort to awful hacks downstream). Differential Revision: https://phabricator.services.mozilla.com/D16299

/* 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;
  OptionalIPCStream stream;
};

union CacheReadStreamOrVoid
{
  void_t;
  CacheReadStream;
};

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;
  CacheReadStreamOrVoid body;
  uint32_t contentPolicyType;
  RequestCache requestCache;
  RequestRedirect requestRedirect;
  nsString integrity;
};

union CacheRequestOrVoid
{
  void_t;
  CacheRequest;
};

struct CacheResponse
{
  ResponseType type;
  nsCString[] urlList;
  uint32_t status;
  nsCString statusText;
  HeadersEntry[] headers;
  HeadersGuardEnum headersGuard;
  CacheReadStreamOrVoid body;
  IPCChannelInfo channelInfo;
  OptionalPrincipalInfo principalInfo;
  uint32_t paddingInfo;
  int64_t paddingSize;
};

union CacheResponseOrVoid
{
  void_t;
  CacheResponse;
};

struct CacheRequestResponse
{
  CacheRequest request;
  CacheResponse response;
};

struct CacheMatchArgs
{
  CacheRequest request;
  CacheQueryParams params;
  OpenMode openMode;
};

struct CacheMatchAllArgs
{
  CacheRequestOrVoid requestOrVoid;
  CacheQueryParams params;
  OpenMode openMode;
};

struct CachePutAllArgs
{
  CacheRequestResponse[] requestResponseList;
};

struct CacheDeleteArgs
{
  CacheRequest request;
  CacheQueryParams params;
};

struct CacheKeysArgs
{
  CacheRequestOrVoid requestOrVoid;
  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
{
  CacheResponseOrVoid responseOrVoid;
};

struct CacheMatchAllResult
{
  CacheResponse[] responseList;
};

struct CachePutAllResult
{
};

struct CacheDeleteResult
{
  bool success;
};

struct CacheKeysResult
{
  CacheRequest[] requestList;
};

struct StorageMatchResult
{
  CacheResponseOrVoid responseOrVoid;
};

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