Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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=cpp : */
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/. */
8 include protocol PNecko;
9 include InputStreamParams;
10 include URIParams;
12 //FIXME: bug #792908 (NeckoChannelParams already included by PNecko)
13 include NeckoChannelParams;
14 include protocol PBlob; //FIXME: bug #792908
16 using PRTime from "prtime.h";
18 namespace mozilla {
19 namespace net {
21 async protocol PFTPChannel
22 {
23 manager PNecko;
25 parent:
26 // Note: channels are opened during construction, so no open method here:
27 // see PNecko.ipdl
29 __delete__();
31 Cancel(nsresult status);
32 Suspend();
33 Resume();
35 // Divert OnDataAvailable to the parent.
36 DivertOnDataAvailable(nsCString data,
37 uint64_t offset,
38 uint32_t count);
40 // Divert OnStopRequest to the parent.
41 DivertOnStopRequest(nsresult statusCode);
43 // Child has no more events/messages to divert to the parent.
44 DivertComplete();
46 child:
47 OnStartRequest(nsresult aChannelStatus,
48 int64_t aContentLength,
49 nsCString aContentType,
50 PRTime aLastModified,
51 nsCString aEntityID,
52 URIParams aURI);
53 OnDataAvailable(nsresult channelStatus,
54 nsCString data,
55 uint64_t offset,
56 uint32_t count);
57 OnStopRequest(nsresult channelStatus);
58 FailedAsyncOpen(nsresult statusCode);
60 // Parent has been suspended for diversion; no more events to be enqueued.
61 FlushedForDiversion();
63 // Child should resume processing the ChannelEventQueue, i.e. diverting any
64 // OnDataAvailable and OnStopRequest messages in the queue back to the parent.
65 DivertMessages();
67 DeleteSelf();
68 };
70 } // namespace net
71 } // namespace mozilla