diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /netwerk/base/nsIStreamListenerTee.idl | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'netwerk/base/nsIStreamListenerTee.idl')
-rw-r--r-- | netwerk/base/nsIStreamListenerTee.idl | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/netwerk/base/nsIStreamListenerTee.idl b/netwerk/base/nsIStreamListenerTee.idl new file mode 100644 index 000000000..b7c3ae676 --- /dev/null +++ b/netwerk/base/nsIStreamListenerTee.idl @@ -0,0 +1,50 @@ +/* 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/. */ + +#include "nsIStreamListener.idl" + +interface nsIOutputStream; +interface nsIRequestObserver; +interface nsIEventTarget; + +/** + * As data "flows" into a stream listener tee, it is copied to the output stream + * and then forwarded to the real listener. + */ +[scriptable, uuid(62b27fc1-6e8c-4225-8ad0-b9d44252973a)] +interface nsIStreamListenerTee : nsIStreamListener +{ + /** + * Initalize the tee. + * + * @param listener + * the original listener the tee will propagate onStartRequest, + * onDataAvailable and onStopRequest notifications to, exceptions from + * the listener will be propagated back to the channel + * @param sink + * the stream the data coming from the channel will be written to, + * should be blocking + * @param requestObserver + * optional parameter, listener that gets only onStartRequest and + * onStopRequest notifications; exceptions threw within this optional + * observer are also propagated to the channel, but exceptions from + * the original listener (listener parameter) are privileged + */ + void init(in nsIStreamListener listener, + in nsIOutputStream sink, + [optional] in nsIRequestObserver requestObserver); + + /** + * Initalize the tee like above, but with the extra parameter to make it + * possible to copy the output asynchronously + * @param anEventTarget + * if set, this event-target is used to copy data to the output stream, + * giving an asynchronous tee + */ + void initAsync(in nsIStreamListener listener, + in nsIEventTarget eventTarget, + in nsIOutputStream sink, + [optional] in nsIRequestObserver requestObserver); + +}; |