summaryrefslogtreecommitdiff
path: root/dom/fetch/FetchTypes.ipdlh
blob: 8944252fd7e84abe3c1769c4441e6a0ad723a184 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* 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 IPCStream;
include ChannelInfo;
include PBackgroundSharedTypes;

using HeadersGuardEnum from "mozilla/dom/FetchIPCTypes.h";
using ReferrerPolicy from "mozilla/dom/FetchIPCTypes.h";
using RequestCredentials from "mozilla/dom/FetchIPCTypes.h";
using RequestMode from "mozilla/dom/FetchIPCTypes.h";
using ResponseType from "mozilla/dom/FetchIPCTypes.h";
using RequestRedirect from "mozilla/dom/FetchIPCTypes.h";
using RequestCache from "mozilla/dom/FetchIPCTypes.h";

namespace mozilla {
namespace dom {

struct HeadersEntry
{
  nsCString name;
  nsCString value;
};

// Note, this does not yet serialize *all* of InternalRequest
// Make sure that it contains the fields that you care about
struct IPCInternalRequest
{
  nsCString[] urls;
  nsCString method;
  HeadersEntry[] headers;
  HeadersGuardEnum headersGuard;
  nsString referrer;
  ReferrerPolicy referrerPolicy;
  RequestMode mode;
  RequestCredentials credentials;
  uint32_t contentPolicyType;
  RequestCache requestCache;
  RequestRedirect requestRedirect;
};

// Note, this does not yet serialize *all* of InternalResponse
// Make sure that it contains the fields that you care about
struct IPCInternalResponse
{
  ResponseType type;
  nsCString[] urlList;
  uint32_t status;
  nsCString statusText;
  HeadersEntry[] headers;
  HeadersGuardEnum headersGuard;
  IPCChannelInfo channelInfo;
  OptionalPrincipalInfo principalInfo;
  OptionalIPCStream body;
  int64_t bodySize;
};


} // namespace ipc
} // namespace mozilla