2013-06-22 20:09:19 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set sw=2 ts=8 et tw=80 ft=c: */
|
|
|
|
|
|
|
|
/* 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/. */
|
|
|
|
|
2014-03-11 02:04:28 +04:00
|
|
|
include protocol PHttpChannel;
|
|
|
|
include protocol PFTPChannel;
|
2014-04-03 15:08:34 +04:00
|
|
|
include protocol PRtspChannel;
|
2013-06-22 20:09:19 +04:00
|
|
|
include URIParams;
|
|
|
|
include InputStreamParams;
|
2014-09-21 20:40:27 +04:00
|
|
|
include PBackgroundSharedTypes;
|
2013-06-22 20:09:19 +04:00
|
|
|
|
2013-10-01 23:25:07 +04:00
|
|
|
using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
|
|
|
|
using RequestHeaderTuples from "mozilla/net/PHttpChannelParams.h";
|
|
|
|
using struct nsHttpAtom from "nsHttp.h";
|
2015-04-18 01:59:10 +03:00
|
|
|
using class nsHttpResponseHead from "nsHttpResponseHead.h";
|
2013-06-22 20:09:19 +04:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace net {
|
|
|
|
|
2015-06-19 01:37:20 +03:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// LoadInfo IPDL structs
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
struct LoadInfoArgs
|
|
|
|
{
|
2015-07-20 05:11:03 +03:00
|
|
|
PrincipalInfo requestingPrincipalInfo;
|
|
|
|
PrincipalInfo triggeringPrincipalInfo;
|
|
|
|
uint32_t securityFlags;
|
|
|
|
uint32_t contentPolicyType;
|
|
|
|
bool upgradeInsecureRequests;
|
|
|
|
uint64_t innerWindowID;
|
|
|
|
uint64_t outerWindowID;
|
|
|
|
uint64_t parentOuterWindowID;
|
2015-07-20 05:11:57 +03:00
|
|
|
bool enforceSecurity;
|
|
|
|
bool initialSecurityCheckDone;
|
2015-07-20 05:11:03 +03:00
|
|
|
PrincipalInfo[] redirectChain;
|
2015-06-19 01:37:20 +03:00
|
|
|
};
|
|
|
|
|
2015-07-14 08:43:13 +03:00
|
|
|
/**
|
|
|
|
* Not every channel necessarily has a loadInfo attached.
|
|
|
|
*/
|
|
|
|
union OptionalLoadInfoArgs
|
|
|
|
{
|
|
|
|
void_t;
|
|
|
|
LoadInfoArgs;
|
|
|
|
};
|
|
|
|
|
2013-06-22 20:09:19 +04:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// HTTP IPDL structs
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2015-04-18 01:59:10 +03:00
|
|
|
union OptionalHttpResponseHead
|
|
|
|
{
|
|
|
|
void_t;
|
|
|
|
nsHttpResponseHead;
|
|
|
|
};
|
|
|
|
|
2015-08-31 23:36:22 +03:00
|
|
|
struct CorsPreflightArgs
|
|
|
|
{
|
|
|
|
bool withCredentials;
|
|
|
|
PrincipalInfo preflightPrincipal;
|
|
|
|
nsCString[] unsafeHeaders;
|
|
|
|
};
|
|
|
|
|
|
|
|
union OptionalCorsPreflightArgs
|
|
|
|
{
|
|
|
|
void_t;
|
|
|
|
CorsPreflightArgs;
|
|
|
|
};
|
|
|
|
|
2013-06-22 20:09:19 +04:00
|
|
|
struct HttpChannelOpenArgs
|
|
|
|
{
|
|
|
|
URIParams uri;
|
|
|
|
// - TODO: bug 571161: unclear if any HTTP channel clients ever
|
|
|
|
// set originalURI != uri (about:credits?); also not clear if
|
|
|
|
// chrome channel would ever need to know. Get rid of next arg?
|
|
|
|
OptionalURIParams original;
|
|
|
|
OptionalURIParams doc;
|
|
|
|
OptionalURIParams referrer;
|
2014-11-18 16:46:35 +03:00
|
|
|
uint32_t referrerPolicy;
|
2013-06-22 20:09:19 +04:00
|
|
|
OptionalURIParams apiRedirectTo;
|
2014-10-30 03:22:22 +03:00
|
|
|
OptionalURIParams topWindowURI;
|
2013-06-22 20:09:19 +04:00
|
|
|
uint32_t loadFlags;
|
|
|
|
RequestHeaderTuples requestHeaders;
|
2014-03-18 20:36:18 +04:00
|
|
|
nsCString requestMethod;
|
2013-06-22 20:09:19 +04:00
|
|
|
OptionalInputStreamParams uploadStream;
|
|
|
|
bool uploadStreamHasHeaders;
|
|
|
|
uint16_t priority;
|
2014-12-06 22:26:50 +03:00
|
|
|
uint32_t classOfService;
|
2013-06-22 20:09:19 +04:00
|
|
|
uint8_t redirectionLimit;
|
|
|
|
bool allowPipelining;
|
2014-06-04 20:57:15 +04:00
|
|
|
bool allowSTS;
|
2014-10-28 16:23:00 +03:00
|
|
|
uint32_t thirdPartyFlags;
|
2013-06-22 20:09:19 +04:00
|
|
|
bool resumeAt;
|
|
|
|
uint64_t startPos;
|
|
|
|
nsCString entityID;
|
|
|
|
bool chooseApplicationCache;
|
|
|
|
nsCString appCacheClientID;
|
|
|
|
bool allowSpdy;
|
2015-04-13 19:59:34 +03:00
|
|
|
bool allowAltSvc;
|
2014-03-25 22:37:28 +04:00
|
|
|
OptionalFileDescriptorSet fds;
|
2015-07-14 08:43:13 +03:00
|
|
|
OptionalLoadInfoArgs loadInfo;
|
2015-04-18 01:59:10 +03:00
|
|
|
OptionalHttpResponseHead synthesizedResponseHead;
|
2015-08-20 00:50:34 +03:00
|
|
|
nsCString synthesizedSecurityInfoSerialization;
|
2015-05-14 20:05:34 +03:00
|
|
|
uint32_t cacheKey;
|
2015-07-31 23:50:08 +03:00
|
|
|
nsCString schedulingContextID;
|
2015-08-31 23:36:22 +03:00
|
|
|
OptionalCorsPreflightArgs preflightArgs;
|
2013-06-22 20:09:19 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct HttpChannelConnectArgs
|
|
|
|
{
|
|
|
|
uint32_t channelId;
|
2015-05-28 17:47:35 +03:00
|
|
|
bool shouldIntercept;
|
2013-06-22 20:09:19 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
union HttpChannelCreationArgs
|
|
|
|
{
|
|
|
|
HttpChannelOpenArgs; // For AsyncOpen: the common case.
|
|
|
|
HttpChannelConnectArgs; // Used for redirected-to channels
|
|
|
|
};
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// FTP IPDL structs
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
struct FTPChannelOpenArgs
|
|
|
|
{
|
2014-09-21 20:40:27 +04:00
|
|
|
URIParams uri;
|
|
|
|
uint64_t startPos;
|
|
|
|
nsCString entityID;
|
2013-06-22 20:09:19 +04:00
|
|
|
OptionalInputStreamParams uploadStream;
|
2015-07-14 08:43:13 +03:00
|
|
|
OptionalLoadInfoArgs loadInfo;
|
2013-06-22 20:09:19 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct FTPChannelConnectArgs
|
|
|
|
{
|
|
|
|
uint32_t channelId;
|
|
|
|
};
|
|
|
|
|
|
|
|
union FTPChannelCreationArgs
|
|
|
|
{
|
|
|
|
FTPChannelOpenArgs; // For AsyncOpen: the common case.
|
|
|
|
FTPChannelConnectArgs; // Used for redirected-to channels
|
|
|
|
};
|
|
|
|
|
2014-10-22 03:40:08 +04:00
|
|
|
struct HttpChannelDiverterArgs
|
|
|
|
{
|
|
|
|
PHttpChannel mChannel;
|
|
|
|
bool mApplyConversion;
|
|
|
|
};
|
|
|
|
|
2014-03-11 02:04:28 +04:00
|
|
|
union ChannelDiverterArgs
|
|
|
|
{
|
2014-10-22 03:40:08 +04:00
|
|
|
HttpChannelDiverterArgs;
|
2014-03-11 02:04:28 +04:00
|
|
|
PFTPChannel;
|
|
|
|
};
|
|
|
|
|
2014-04-03 15:08:34 +04:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// RTSP IPDL structs
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
struct RtspChannelConnectArgs
|
|
|
|
{
|
|
|
|
URIParams uri;
|
|
|
|
uint32_t channelId;
|
|
|
|
};
|
|
|
|
|
2013-06-22 20:09:19 +04:00
|
|
|
} // namespace ipc
|
|
|
|
} // namespace mozilla
|