/* -*- 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.0 (the "NPL"); you may not use this file except in
 * compliance with the NPL.  You may obtain a copy of the NPL at
 * http://www.mozilla.org/NPL/
 *
 * Software distributed under the NPL is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
 * for the specific language governing rights and limitations under the
 * NPL.
 *
 * The Initial Developer of this code under the NPL is Netscape
 * Communications Corporation.  Portions created by Netscape are
 * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
 * Reserved.
 */

#include "nsISupports.idl"
#include "nsrootidl.idl"
#include "nsIStreamListener.idl"

interface nsIOutputStream;
interface nsIURI;
interface nsIChannel;

%{C++
// {588595CB-2012-11d3-8EF0-00A024A7D144}
#define NS_STREAM_CONVERTER_CID  \
    { 0x588595cb, 0x2012, 0x11d3,   \
    { 0x8e, 0xf0, 0x0, 0xa0, 0x24, 0xa7, 0xd1, 0x44 } }
%}

[scriptable, uuid(C9CDF8E5-95FA-11d2-8807-00805F5A1FB8)]
interface nsIStreamConverter2 : nsIStreamListener {

    /* 
	 * right now anyway, we need to know the uri for the stream converter...
	 * the outlistener allows you to hook up the stream converter to another
	 * stream listener. As Data is converted, the listener is notified.
     */

	void Init(in nsIURI aURI, in nsIStreamListener outListener, in nsIChannel aChannel); 

	/* After initializing the converter you can ask for the output content type
	 * for the converter 
	 */

	void GetContentType(out string aOutputContentType);
};

