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

#ifndef __gen_nsIHTTPEventSink_h__
#define __gen_nsIHTTPEventSink_h__

#include "nsISupports.h"

class nsIURI; /* forward declaration */


/* starting interface:    nsIHTTPEventSink */
#define NS_IHTTPEVENTSINK_IID_STR "e5cf0c64-1dd1-11b2-b704-c889f2be4793"

#define NS_IHTTPEVENTSINK_IID \
  {0xe5cf0c64, 0x1dd1, 0x11b2, \
    { 0xb7, 0x04, 0xc8, 0x89, 0xf2, 0xbe, 0x47, 0x93 }}

class NS_NO_VTABLE nsIHTTPEventSink : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IHTTPEVENTSINK_IID)

  /**
      * Fired when all the headers have been parsed and are ready
      * for a consumer to use. 
      */
  /* void onHeadersAvailable (in nsISupports i_Context); */
  NS_IMETHOD OnHeadersAvailable(nsISupports *i_Context) = 0;

  /**
      * Fired when a redirect occurs due to a HTTP response (like 302)
      */
  /* void onRedirect (in nsISupports i_Context, in nsIURI i_NewLocation); */
  NS_IMETHOD OnRedirect(nsISupports *i_Context, nsIURI *i_NewLocation) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIHTTPEVENTSINK \
  NS_IMETHOD OnHeadersAvailable(nsISupports *i_Context); \
  NS_IMETHOD OnRedirect(nsISupports *i_Context, nsIURI *i_NewLocation); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIHTTPEVENTSINK(_to) \
  NS_IMETHOD OnHeadersAvailable(nsISupports *i_Context) { return _to ## OnHeadersAvailable(i_Context); } \
  NS_IMETHOD OnRedirect(nsISupports *i_Context, nsIURI *i_NewLocation) { return _to ## OnRedirect(i_Context, i_NewLocation); } 

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

/* Header file */
class nsHTTPEventSink : public nsIHTTPEventSink
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIHTTPEVENTSINK

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsHTTPEventSink, nsIHTTPEventSink)

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

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

/* void onHeadersAvailable (in nsISupports i_Context); */
NS_IMETHODIMP nsHTTPEventSink::OnHeadersAvailable(nsISupports *i_Context)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onRedirect (in nsISupports i_Context, in nsIURI i_NewLocation); */
NS_IMETHODIMP nsHTTPEventSink::OnRedirect(nsISupports *i_Context, nsIURI *i_NewLocation)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIHTTPEventSink_h__ */
