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 : */ 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 8include protocol PNecko; 9 10namespace mozilla { 11namespace net { 12 13protocol PAltDataOutputStream 14{ 15 manager PNecko; 16 17parent: 18 // Sends data from the child to the parent that will be written to the cache. 19 async WriteData(nsCString data); 20 // Signals that writing to the output stream is done. 21 async Close(); 22 23 async __delete__(); 24 25child: 26 // The parent calls this method to signal that an error has ocurred. 27 // This may mean that opening the output stream has failed or that writing to 28 // the stream has returned an error. 29 async Error(nsresult err); 30 31both: 32 // After sending this message, the parent will respond by sending DeleteSelf 33 // back to the child, after which it is guaranteed to not send any more IPC 34 // messages. 35 // When receiving this message, the child will send __delete__ tearing down 36 // the IPC channel. 37 async DeleteSelf(); 38}; 39 40} // namespace net 41} // namespace mozilla 42