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

#ifndef __gen_nsIDocumentLoaderObserver_h__
#define __gen_nsIDocumentLoaderObserver_h__

#include "nsISupports.h"

class nsIDocumentLoader; /* forward declaration */

class nsIURI; /* forward declaration */

class nsIChannel; /* forward declaration */

#include "nsString.h"

/* starting interface:    nsIDocumentLoaderObserver */
#define NS_IDOCUMENTLOADEROBSERVER_IID_STR "f6b4f550-317c-11d2-bd8c-00805f8ae3f4"

#define NS_IDOCUMENTLOADEROBSERVER_IID \
  {0xf6b4f550, 0x317c, 0x11d2, \
    { 0xbd, 0x8c, 0x00, 0x80, 0x5f, 0x8a, 0xe3, 0xf4 }}

class NS_NO_VTABLE nsIDocumentLoaderObserver : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOCUMENTLOADEROBSERVER_IID)

  /**
   * Notify the observer that a new document will be loaded.  
   *
   * This notification occurs before any DNS resolution occurs, or
   * a connection is established with the server...
   */
  /* void onStartDocumentLoad (in nsIDocumentLoader aLoader, in nsIURI aURL, in string aCommand); */
  NS_IMETHOD OnStartDocumentLoad(nsIDocumentLoader *aLoader, nsIURI *aURL, const char *aCommand) = 0;

  /**
   * Notify the observer that a document has been completely loaded.
   */
  /* void onEndDocumentLoad (in nsIDocumentLoader loader, in nsIChannel aChannel, in unsigned long aStatus); */
  NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader *loader, nsIChannel *aChannel, PRUint32 aStatus) = 0;

  /**
   * Notify the observer that the specified nsIURI has just started to load.
   *
   * This notification occurs after DNS resolution, and a connection to the
   * server has been established.
   */
  /* void onStartURLLoad (in nsIDocumentLoader aLoader, in nsIChannel channel); */
  NS_IMETHOD OnStartURLLoad(nsIDocumentLoader *aLoader, nsIChannel *channel) = 0;

  /**
   * Notify the observer that progress has occurred in the loading of the 
   * specified URL...
   */
  /* void onProgressURLLoad (in nsIDocumentLoader aLoader, in nsIChannel aChannel, in unsigned long aProgress, in unsigned long aProgressMax); */
  NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader *aLoader, nsIChannel *aChannel, PRUint32 aProgress, PRUint32 aProgressMax) = 0;

  /**
   * Notify the observer that status text is available regarding the URL
   * being loaded...
   */
  /* [noscript] void onStatusURLLoad (in nsIDocumentLoader loader, in nsIChannel channel, in nsStringRef aMsg); */
  NS_IMETHOD OnStatusURLLoad(nsIDocumentLoader *loader, nsIChannel *channel, nsString & aMsg) = 0;

  /**
   * Notify the observer that the specified nsIURI has finished loading.
   */
  /* void onEndURLLoad (in nsIDocumentLoader aLoader, in nsIChannel aChannel, in unsigned long aStatus); */
  NS_IMETHOD OnEndURLLoad(nsIDocumentLoader *aLoader, nsIChannel *aChannel, PRUint32 aStatus) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDOCUMENTLOADEROBSERVER \
  NS_IMETHOD OnStartDocumentLoad(nsIDocumentLoader *aLoader, nsIURI *aURL, const char *aCommand); \
  NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader *loader, nsIChannel *aChannel, PRUint32 aStatus); \
  NS_IMETHOD OnStartURLLoad(nsIDocumentLoader *aLoader, nsIChannel *channel); \
  NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader *aLoader, nsIChannel *aChannel, PRUint32 aProgress, PRUint32 aProgressMax); \
  NS_IMETHOD OnStatusURLLoad(nsIDocumentLoader *loader, nsIChannel *channel, nsString & aMsg); \
  NS_IMETHOD OnEndURLLoad(nsIDocumentLoader *aLoader, nsIChannel *aChannel, PRUint32 aStatus); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIDOCUMENTLOADEROBSERVER(_to) \
  NS_IMETHOD OnStartDocumentLoad(nsIDocumentLoader *aLoader, nsIURI *aURL, const char *aCommand) { return _to ## OnStartDocumentLoad(aLoader, aURL, aCommand); } \
  NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader *loader, nsIChannel *aChannel, PRUint32 aStatus) { return _to ## OnEndDocumentLoad(loader, aChannel, aStatus); } \
  NS_IMETHOD OnStartURLLoad(nsIDocumentLoader *aLoader, nsIChannel *channel) { return _to ## OnStartURLLoad(aLoader, channel); } \
  NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader *aLoader, nsIChannel *aChannel, PRUint32 aProgress, PRUint32 aProgressMax) { return _to ## OnProgressURLLoad(aLoader, aChannel, aProgress, aProgressMax); } \
  NS_IMETHOD OnStatusURLLoad(nsIDocumentLoader *loader, nsIChannel *channel, nsString & aMsg) { return _to ## OnStatusURLLoad(loader, channel, aMsg); } \
  NS_IMETHOD OnEndURLLoad(nsIDocumentLoader *aLoader, nsIChannel *aChannel, PRUint32 aStatus) { return _to ## OnEndURLLoad(aLoader, aChannel, aStatus); } 

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

/* Header file */
class nsDocumentLoaderObserver : public nsIDocumentLoaderObserver
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIDOCUMENTLOADEROBSERVER

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsDocumentLoaderObserver, nsIDocumentLoaderObserver)

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

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

/* void onStartDocumentLoad (in nsIDocumentLoader aLoader, in nsIURI aURL, in string aCommand); */
NS_IMETHODIMP nsDocumentLoaderObserver::OnStartDocumentLoad(nsIDocumentLoader *aLoader, nsIURI *aURL, const char *aCommand)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onEndDocumentLoad (in nsIDocumentLoader loader, in nsIChannel aChannel, in unsigned long aStatus); */
NS_IMETHODIMP nsDocumentLoaderObserver::OnEndDocumentLoad(nsIDocumentLoader *loader, nsIChannel *aChannel, PRUint32 aStatus)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onStartURLLoad (in nsIDocumentLoader aLoader, in nsIChannel channel); */
NS_IMETHODIMP nsDocumentLoaderObserver::OnStartURLLoad(nsIDocumentLoader *aLoader, nsIChannel *channel)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onProgressURLLoad (in nsIDocumentLoader aLoader, in nsIChannel aChannel, in unsigned long aProgress, in unsigned long aProgressMax); */
NS_IMETHODIMP nsDocumentLoaderObserver::OnProgressURLLoad(nsIDocumentLoader *aLoader, nsIChannel *aChannel, PRUint32 aProgress, PRUint32 aProgressMax)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void onStatusURLLoad (in nsIDocumentLoader loader, in nsIChannel channel, in nsStringRef aMsg); */
NS_IMETHODIMP nsDocumentLoaderObserver::OnStatusURLLoad(nsIDocumentLoader *loader, nsIChannel *channel, nsString & aMsg)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onEndURLLoad (in nsIDocumentLoader aLoader, in nsIChannel aChannel, in unsigned long aStatus); */
NS_IMETHODIMP nsDocumentLoaderObserver::OnEndURLLoad(nsIDocumentLoader *aLoader, nsIChannel *aChannel, PRUint32 aStatus)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

#define NS_IDOCUMENT_LOADER_OBSERVER_IID NS_IDOCUMENTLOADEROBSERVER_IID

#endif /* __gen_nsIDocumentLoaderObserver_h__ */
