2010-08-10 11:47:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set sw=2 ts=8 et tw=80 ft=cpp : */
|
|
|
|
|
2012-05-21 04:12:37 -07:00
|
|
|
/* 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/. */
|
2010-08-10 11:47:00 -07:00
|
|
|
|
|
|
|
include protocol PNecko;
|
2012-08-23 12:33:46 -07:00
|
|
|
include InputStreamParams;
|
|
|
|
include URIParams;
|
2010-08-10 11:47:00 -07:00
|
|
|
|
2013-06-22 09:09:19 -07:00
|
|
|
//FIXME: bug #792908 (NeckoChannelParams already included by PNecko)
|
|
|
|
include NeckoChannelParams;
|
2012-09-21 10:26:13 -07:00
|
|
|
include protocol PBlob; //FIXME: bug #792908
|
|
|
|
|
2013-10-01 12:25:07 -07:00
|
|
|
using PRTime from "prtime.h";
|
2010-08-10 11:47:00 -07:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace net {
|
|
|
|
|
|
|
|
async protocol PFTPChannel
|
|
|
|
{
|
|
|
|
manager PNecko;
|
|
|
|
|
|
|
|
parent:
|
2013-06-22 09:09:19 -07:00
|
|
|
// Note: channels are opened during construction, so no open method here:
|
|
|
|
// see PNecko.ipdl
|
2010-08-10 11:47:00 -07:00
|
|
|
|
2013-06-22 09:09:19 -07:00
|
|
|
__delete__();
|
2012-08-06 21:47:48 -07:00
|
|
|
|
2010-08-10 11:47:00 -07:00
|
|
|
Cancel(nsresult status);
|
|
|
|
Suspend();
|
|
|
|
Resume();
|
|
|
|
|
2014-03-10 15:04:28 -07:00
|
|
|
// Divert OnDataAvailable to the parent.
|
|
|
|
DivertOnDataAvailable(nsCString data,
|
|
|
|
uint64_t offset,
|
|
|
|
uint32_t count);
|
|
|
|
|
|
|
|
// Divert OnStopRequest to the parent.
|
|
|
|
DivertOnStopRequest(nsresult statusCode);
|
|
|
|
|
|
|
|
// Child has no more events/messages to divert to the parent.
|
|
|
|
DivertComplete();
|
|
|
|
|
2010-08-10 11:47:00 -07:00
|
|
|
child:
|
2014-04-07 11:26:22 -07:00
|
|
|
OnStartRequest(nsresult aChannelStatus,
|
|
|
|
int64_t aContentLength,
|
|
|
|
nsCString aContentType,
|
|
|
|
PRTime aLastModified,
|
|
|
|
nsCString aEntityID,
|
|
|
|
URIParams aURI);
|
|
|
|
OnDataAvailable(nsresult channelStatus,
|
|
|
|
nsCString data,
|
|
|
|
uint64_t offset,
|
|
|
|
uint32_t count);
|
|
|
|
OnStopRequest(nsresult channelStatus);
|
2012-01-10 23:19:17 -08:00
|
|
|
FailedAsyncOpen(nsresult statusCode);
|
2014-03-10 15:04:28 -07:00
|
|
|
|
|
|
|
// Parent has been suspended for diversion; no more events to be enqueued.
|
|
|
|
FlushedForDiversion();
|
|
|
|
|
|
|
|
// Child should resume processing the ChannelEventQueue, i.e. diverting any
|
|
|
|
// OnDataAvailable and OnStopRequest messages in the queue back to the parent.
|
|
|
|
DivertMessages();
|
|
|
|
|
2010-11-23 14:56:06 -08:00
|
|
|
DeleteSelf();
|
2010-08-10 11:47:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace net
|
|
|
|
} // namespace mozilla
|
|
|
|
|