|
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* vim: set sw=2 ts=8 et tw=80 ft=c: */ |
|
3 |
|
4 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
5 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
7 |
|
8 include protocol PHttpChannel; |
|
9 include protocol PFTPChannel; |
|
10 include protocol PRtspChannel; |
|
11 include URIParams; |
|
12 include InputStreamParams; |
|
13 |
|
14 using struct mozilla::void_t from "ipc/IPCMessageUtils.h"; |
|
15 using RequestHeaderTuples from "mozilla/net/PHttpChannelParams.h"; |
|
16 using struct nsHttpAtom from "nsHttp.h"; |
|
17 |
|
18 namespace mozilla { |
|
19 namespace net { |
|
20 |
|
21 //----------------------------------------------------------------------------- |
|
22 // HTTP IPDL structs |
|
23 //----------------------------------------------------------------------------- |
|
24 |
|
25 struct HttpChannelOpenArgs |
|
26 { |
|
27 URIParams uri; |
|
28 // - TODO: bug 571161: unclear if any HTTP channel clients ever |
|
29 // set originalURI != uri (about:credits?); also not clear if |
|
30 // chrome channel would ever need to know. Get rid of next arg? |
|
31 OptionalURIParams original; |
|
32 OptionalURIParams doc; |
|
33 OptionalURIParams referrer; |
|
34 OptionalURIParams apiRedirectTo; |
|
35 uint32_t loadFlags; |
|
36 RequestHeaderTuples requestHeaders; |
|
37 nsCString requestMethod; |
|
38 OptionalInputStreamParams uploadStream; |
|
39 bool uploadStreamHasHeaders; |
|
40 uint16_t priority; |
|
41 uint8_t redirectionLimit; |
|
42 bool allowPipelining; |
|
43 bool forceAllowThirdPartyCookie; |
|
44 bool resumeAt; |
|
45 uint64_t startPos; |
|
46 nsCString entityID; |
|
47 bool chooseApplicationCache; |
|
48 nsCString appCacheClientID; |
|
49 bool allowSpdy; |
|
50 OptionalFileDescriptorSet fds; |
|
51 }; |
|
52 |
|
53 struct HttpChannelConnectArgs |
|
54 { |
|
55 uint32_t channelId; |
|
56 }; |
|
57 |
|
58 union HttpChannelCreationArgs |
|
59 { |
|
60 HttpChannelOpenArgs; // For AsyncOpen: the common case. |
|
61 HttpChannelConnectArgs; // Used for redirected-to channels |
|
62 }; |
|
63 |
|
64 //----------------------------------------------------------------------------- |
|
65 // FTP IPDL structs |
|
66 //----------------------------------------------------------------------------- |
|
67 |
|
68 struct FTPChannelOpenArgs |
|
69 { |
|
70 URIParams uri; |
|
71 uint64_t startPos; |
|
72 nsCString entityID; |
|
73 OptionalInputStreamParams uploadStream; |
|
74 }; |
|
75 |
|
76 struct FTPChannelConnectArgs |
|
77 { |
|
78 uint32_t channelId; |
|
79 }; |
|
80 |
|
81 union FTPChannelCreationArgs |
|
82 { |
|
83 FTPChannelOpenArgs; // For AsyncOpen: the common case. |
|
84 FTPChannelConnectArgs; // Used for redirected-to channels |
|
85 }; |
|
86 |
|
87 union ChannelDiverterArgs |
|
88 { |
|
89 PHttpChannel; |
|
90 PFTPChannel; |
|
91 }; |
|
92 |
|
93 //----------------------------------------------------------------------------- |
|
94 // RTSP IPDL structs |
|
95 //----------------------------------------------------------------------------- |
|
96 |
|
97 struct RtspChannelConnectArgs |
|
98 { |
|
99 URIParams uri; |
|
100 uint32_t channelId; |
|
101 }; |
|
102 |
|
103 } // namespace ipc |
|
104 } // namespace mozilla |