зеркало из https://github.com/mozilla/gecko-dev.git
47 строки
1.5 KiB
Plaintext
47 строки
1.5 KiB
Plaintext
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
*
|
|
* The contents of this file are subject to the Netscape Public
|
|
* License Version 1.1 (the "License"); you may not use this file
|
|
* except in compliance with the License. You may obtain a copy of
|
|
* the License at http://www.mozilla.org/NPL/
|
|
*
|
|
* Software distributed under the License is distributed on an "AS
|
|
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
* implied. See the License for the specific language governing
|
|
* rights and limitations under the License.
|
|
*
|
|
* The Original Code is mozilla.org code.
|
|
*
|
|
* The Initial Developer of the Original Code is Netscape
|
|
* Communications Corporation. Portions created by Netscape are
|
|
* Copyright (C) 2001 Netscape Communications Corporation. All
|
|
* Rights Reserved.
|
|
*
|
|
* Contributor(s):
|
|
* Darin Fisher <darin@netscape.com> (original author)
|
|
*/
|
|
|
|
#include "nsIInputStream.idl"
|
|
|
|
interface nsIOutputStream;
|
|
|
|
/**
|
|
* A nsIInputStreamTee is a wrapper for an input stream, that when read
|
|
* reads the specified amount of data from its |source| and copies that
|
|
* data to its |sink|. |sink| must be a blocking output stream.
|
|
*/
|
|
[scriptable, uuid(44e8b2c8-1ecb-4a63-8b23-3e3500c34f32)]
|
|
interface nsIInputStreamTee : nsIInputStream
|
|
{
|
|
void init(in nsIInputStream source,
|
|
in nsIOutputStream sink);
|
|
};
|
|
|
|
%{C++
|
|
// factory method
|
|
extern NS_COM nsresult
|
|
NS_NewInputStreamTee(nsIInputStream **tee, // read from this input stream
|
|
nsIInputStream *source,
|
|
nsIOutputStream *sink);
|
|
%}
|