1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/protocol/ftp/PFTPChannel.ipdl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,72 @@ 1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* vim: set sw=2 ts=8 et tw=80 ft=cpp : */ 1.6 + 1.7 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.8 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.9 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.10 + 1.11 +include protocol PNecko; 1.12 +include InputStreamParams; 1.13 +include URIParams; 1.14 + 1.15 +//FIXME: bug #792908 (NeckoChannelParams already included by PNecko) 1.16 +include NeckoChannelParams; 1.17 +include protocol PBlob; //FIXME: bug #792908 1.18 + 1.19 +using PRTime from "prtime.h"; 1.20 + 1.21 +namespace mozilla { 1.22 +namespace net { 1.23 + 1.24 +async protocol PFTPChannel 1.25 +{ 1.26 + manager PNecko; 1.27 + 1.28 +parent: 1.29 + // Note: channels are opened during construction, so no open method here: 1.30 + // see PNecko.ipdl 1.31 + 1.32 + __delete__(); 1.33 + 1.34 + Cancel(nsresult status); 1.35 + Suspend(); 1.36 + Resume(); 1.37 + 1.38 + // Divert OnDataAvailable to the parent. 1.39 + DivertOnDataAvailable(nsCString data, 1.40 + uint64_t offset, 1.41 + uint32_t count); 1.42 + 1.43 + // Divert OnStopRequest to the parent. 1.44 + DivertOnStopRequest(nsresult statusCode); 1.45 + 1.46 + // Child has no more events/messages to divert to the parent. 1.47 + DivertComplete(); 1.48 + 1.49 +child: 1.50 + OnStartRequest(nsresult aChannelStatus, 1.51 + int64_t aContentLength, 1.52 + nsCString aContentType, 1.53 + PRTime aLastModified, 1.54 + nsCString aEntityID, 1.55 + URIParams aURI); 1.56 + OnDataAvailable(nsresult channelStatus, 1.57 + nsCString data, 1.58 + uint64_t offset, 1.59 + uint32_t count); 1.60 + OnStopRequest(nsresult channelStatus); 1.61 + FailedAsyncOpen(nsresult statusCode); 1.62 + 1.63 + // Parent has been suspended for diversion; no more events to be enqueued. 1.64 + FlushedForDiversion(); 1.65 + 1.66 + // Child should resume processing the ChannelEventQueue, i.e. diverting any 1.67 + // OnDataAvailable and OnStopRequest messages in the queue back to the parent. 1.68 + DivertMessages(); 1.69 + 1.70 + DeleteSelf(); 1.71 +}; 1.72 + 1.73 +} // namespace net 1.74 +} // namespace mozilla 1.75 +