michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim: set sw=2 ts=8 et tw=80 ft=cpp : */ michael@0: michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: include protocol PNecko; michael@0: include InputStreamParams; michael@0: include URIParams; michael@0: michael@0: //FIXME: bug #792908 (NeckoChannelParams already included by PNecko) michael@0: include NeckoChannelParams; michael@0: include protocol PBlob; //FIXME: bug #792908 michael@0: michael@0: using PRTime from "prtime.h"; michael@0: michael@0: namespace mozilla { michael@0: namespace net { michael@0: michael@0: async protocol PFTPChannel michael@0: { michael@0: manager PNecko; michael@0: michael@0: parent: michael@0: // Note: channels are opened during construction, so no open method here: michael@0: // see PNecko.ipdl michael@0: michael@0: __delete__(); michael@0: michael@0: Cancel(nsresult status); michael@0: Suspend(); michael@0: Resume(); michael@0: michael@0: // Divert OnDataAvailable to the parent. michael@0: DivertOnDataAvailable(nsCString data, michael@0: uint64_t offset, michael@0: uint32_t count); michael@0: michael@0: // Divert OnStopRequest to the parent. michael@0: DivertOnStopRequest(nsresult statusCode); michael@0: michael@0: // Child has no more events/messages to divert to the parent. michael@0: DivertComplete(); michael@0: michael@0: child: michael@0: OnStartRequest(nsresult aChannelStatus, michael@0: int64_t aContentLength, michael@0: nsCString aContentType, michael@0: PRTime aLastModified, michael@0: nsCString aEntityID, michael@0: URIParams aURI); michael@0: OnDataAvailable(nsresult channelStatus, michael@0: nsCString data, michael@0: uint64_t offset, michael@0: uint32_t count); michael@0: OnStopRequest(nsresult channelStatus); michael@0: FailedAsyncOpen(nsresult statusCode); michael@0: michael@0: // Parent has been suspended for diversion; no more events to be enqueued. michael@0: FlushedForDiversion(); michael@0: michael@0: // Child should resume processing the ChannelEventQueue, i.e. diverting any michael@0: // OnDataAvailable and OnStopRequest messages in the queue back to the parent. michael@0: DivertMessages(); michael@0: michael@0: DeleteSelf(); michael@0: }; michael@0: michael@0: } // namespace net michael@0: } // namespace mozilla michael@0: