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 "nsIStreamListener.idl" michael@0: michael@0: interface nsIOutputStream; michael@0: michael@0: /** michael@0: * A simple stream listener can be used with AsyncRead to supply data to michael@0: * a output stream. michael@0: */ michael@0: [scriptable, uuid(a9b84f6a-0824-4278-bae6-bfca0570a26e)] michael@0: interface nsISimpleStreamListener : nsIStreamListener michael@0: { michael@0: /** michael@0: * Initialize the simple stream listener. michael@0: * michael@0: * @param aSink data will be read from the channel to this output stream. michael@0: * Must implement writeFrom. michael@0: * @param aObserver optional stream observer (can be NULL) michael@0: */ michael@0: void init(in nsIOutputStream aSink, michael@0: in nsIRequestObserver aObserver); michael@0: };