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

#ifndef __gen_nsIProgressEventSink_h__
#define __gen_nsIProgressEventSink_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

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

class nsIRequest; /* forward declaration */


/* starting interface:    nsIProgressEventSink */
#define NS_IPROGRESSEVENTSINK_IID_STR "dd47ee00-18c2-11d3-9337-00104ba0fd40"

#define NS_IPROGRESSEVENTSINK_IID \
  {0xdd47ee00, 0x18c2, 0x11d3, \
    { 0x93, 0x37, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 }}

/**
 * An instance of nsIFfpEventSink should be passed as the eventSink
 * argument of nsINetService::NewConnection for ftp URLs. It defines
 * the callbacks to the application program (the html parser).
 */
class NS_NO_VTABLE nsIProgressEventSink : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROGRESSEVENTSINK_IID)

  /**
     * Notify the EventSink that progress has occurred for the URL load.<BR>
     */
  /* void onProgress (in nsIRequest request, in nsISupports ctxt, in unsigned long aProgress, in unsigned long aProgressMax); */
  NS_IMETHOD OnProgress(nsIRequest *request, nsISupports *ctxt, PRUint32 aProgress, PRUint32 aProgressMax) = 0;

  /**
     * Notify the EventSink with a status message for the URL load.<BR>
     * @param status - A status code denoting the type of notification. This
     *          can be a message to be displayed (e.g. for file I/O, 
     *          STATUS_READ_FROM, or STATUS_WROTE_TO), or can be an event
     *          to be programmatically handled.
     * @param statusArg - An argument or arguments to the status notification.
     *          These arguments will be formatted into any status or error
     *          message. Multiple arguments can be passed by delimiting them 
     *          with newline ('\n') characters.
     */
  /* void onStatus (in nsIRequest request, in nsISupports ctxt, in nsresult status, in wstring statusArg); */
  NS_IMETHOD OnStatus(nsIRequest *request, nsISupports *ctxt, nsresult status, const PRUnichar *statusArg) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPROGRESSEVENTSINK \
  NS_IMETHOD OnProgress(nsIRequest *request, nsISupports *ctxt, PRUint32 aProgress, PRUint32 aProgressMax); \
  NS_IMETHOD OnStatus(nsIRequest *request, nsISupports *ctxt, nsresult status, const PRUnichar *statusArg); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPROGRESSEVENTSINK(_to) \
  NS_IMETHOD OnProgress(nsIRequest *request, nsISupports *ctxt, PRUint32 aProgress, PRUint32 aProgressMax) { return _to ## OnProgress(request, ctxt, aProgress, aProgressMax); } \
  NS_IMETHOD OnStatus(nsIRequest *request, nsISupports *ctxt, nsresult status, const PRUnichar *statusArg) { return _to ## OnStatus(request, ctxt, status, statusArg); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIPROGRESSEVENTSINK(_to) \
  NS_IMETHOD OnProgress(nsIRequest *request, nsISupports *ctxt, PRUint32 aProgress, PRUint32 aProgressMax) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##-> OnProgress(request, ctxt, aProgress, aProgressMax); } \
  NS_IMETHOD OnStatus(nsIRequest *request, nsISupports *ctxt, nsresult status, const PRUnichar *statusArg) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##-> OnStatus(request, ctxt, status, statusArg); } 

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

/* Header file */
class nsProgressEventSink : public nsIProgressEventSink
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIPROGRESSEVENTSINK

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsProgressEventSink, nsIProgressEventSink)

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

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

/* void onProgress (in nsIRequest request, in nsISupports ctxt, in unsigned long aProgress, in unsigned long aProgressMax); */
NS_IMETHODIMP nsProgressEventSink::OnProgress(nsIRequest *request, nsISupports *ctxt, PRUint32 aProgress, PRUint32 aProgressMax)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onStatus (in nsIRequest request, in nsISupports ctxt, in nsresult status, in wstring statusArg); */
NS_IMETHODIMP nsProgressEventSink::OnStatus(nsIRequest *request, nsISupports *ctxt, nsresult status, const PRUnichar *statusArg)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIProgressEventSink_h__ */
