/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIInputStreamTee.idl
 */

#ifndef __gen_nsIInputStreamTee_h__
#define __gen_nsIInputStreamTee_h__


#ifndef __gen_nsIInputStream_h__
#include "nsIInputStream.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIOutputStream; /* forward declaration */


/* starting interface:    nsIInputStreamTee */
#define NS_IINPUTSTREAMTEE_IID_STR "44e8b2c8-1ecb-4a63-8b23-3e3500c34f32"

#define NS_IINPUTSTREAMTEE_IID \
  {0x44e8b2c8, 0x1ecb, 0x4a63, \
    { 0x8b, 0x23, 0x3e, 0x35, 0x00, 0xc3, 0x4f, 0x32 }}

/**
 * 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.
 */
class NS_NO_VTABLE nsIInputStreamTee : public nsIInputStream {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IINPUTSTREAMTEE_IID)

  /* void init (in nsIInputStream source, in nsIOutputStream sink); */
  NS_IMETHOD Init(nsIInputStream *source, nsIOutputStream *sink) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIINPUTSTREAMTEE \
  NS_IMETHOD Init(nsIInputStream *source, nsIOutputStream *sink); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIINPUTSTREAMTEE(_to) \
  NS_IMETHOD Init(nsIInputStream *source, nsIOutputStream *sink) { return _to Init(source, sink); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIINPUTSTREAMTEE(_to) \
  NS_IMETHOD Init(nsIInputStream *source, nsIOutputStream *sink) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(source, sink); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsInputStreamTee : public nsIInputStreamTee
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIINPUTSTREAMTEE

  nsInputStreamTee();
  virtual ~nsInputStreamTee();
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsInputStreamTee, nsIInputStreamTee)

nsInputStreamTee::nsInputStreamTee()
{
  NS_INIT_ISUPPORTS();
  /* member initializers and constructor code */
}

nsInputStreamTee::~nsInputStreamTee()
{
  /* destructor code */
}

/* void init (in nsIInputStream source, in nsIOutputStream sink); */
NS_IMETHODIMP nsInputStreamTee::Init(nsIInputStream *source, nsIOutputStream *sink)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif

// factory method
extern NS_COM nsresult
NS_NewInputStreamTee(nsIInputStream **tee, // read from this input stream
                     nsIInputStream *source,
                     nsIOutputStream *sink);

#endif /* __gen_nsIInputStreamTee_h__ */
