/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM e:/builds/moz2_slave/cen-w32-xr/build/uriloader/base/nsIWebProgressListener2.idl
 */

#ifndef __gen_nsIWebProgressListener2_h__
#define __gen_nsIWebProgressListener2_h__


#ifndef __gen_nsIWebProgressListener_h__
#include "nsIWebProgressListener.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif

/* starting interface:    nsIWebProgressListener2 */
#define NS_IWEBPROGRESSLISTENER2_IID_STR "9fad5966-62ea-11e0-966c-001320257da5"

#define NS_IWEBPROGRESSLISTENER2_IID \
  {0x9fad5966, 0x62ea, 0x11e0, \
    { 0x96, 0x6c, 0x00, 0x13, 0x20, 0x25, 0x7d, 0xa5 }}

/**
 * An extended version of nsIWebProgressListener.
 */
class NS_NO_VTABLE NS_SCRIPTABLE nsIWebProgressListener2 : public nsIWebProgressListener {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWEBPROGRESSLISTENER2_IID)

  /**
   * Notification that the progress has changed for one of the requests
   * associated with aWebProgress.  Progress totals are reset to zero when all
   * requests in aWebProgress complete (corresponding to onStateChange being
   * called with aStateFlags including the STATE_STOP and STATE_IS_WINDOW
   * flags).
   *
   * This function is identical to nsIWebProgressListener::onProgressChange,
   * except that this function supports 64-bit values.
   *
   * @param aWebProgress
   *        The nsIWebProgress instance that fired the notification.
   * @param aRequest
   *        The nsIRequest that has new progress.
   * @param aCurSelfProgress
   *        The current progress for aRequest.
   * @param aMaxSelfProgress
   *        The maximum progress for aRequest.
   * @param aCurTotalProgress
   *        The current progress for all requests associated with aWebProgress.
   * @param aMaxTotalProgress
   *        The total progress for all requests associated with aWebProgress.
   *
   * NOTE: If any progress value is unknown, then its value is replaced with -1.
   *
   * @see nsIWebProgressListener2::onProgressChange64
   */
  /* void onProgressChange64 (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long long aCurSelfProgress, in long long aMaxSelfProgress, in long long aCurTotalProgress, in long long aMaxTotalProgress); */
  NS_SCRIPTABLE NS_IMETHOD OnProgressChange64(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRInt64 aCurSelfProgress, PRInt64 aMaxSelfProgress, PRInt64 aCurTotalProgress, PRInt64 aMaxTotalProgress) = 0;

  /**
   * Notification that a refresh or redirect has been requested in aWebProgress
   * For example, via a <meta http-equiv="refresh"> or an HTTP Refresh: header
   *
   * @param aWebProgress
   *        The nsIWebProgress instance that fired the notification.
   * @param aRefreshURI
   *        The new URI that aWebProgress has requested redirecting to.
   * @param aMillis
   *        The delay (in milliseconds) before refresh.
   * @param aSameURI
   *        True if aWebProgress is requesting a refresh of the
   *        current URI.
   *        False if aWebProgress is requesting a redirection to
   *        a different URI.
   *
   * @return True if the refresh may proceed.
   *         False if the refresh should be aborted.
   */
  /* boolean onRefreshAttempted (in nsIWebProgress aWebProgress, in nsIURI aRefreshURI, in long aMillis, in boolean aSameURI); */
  NS_SCRIPTABLE NS_IMETHOD OnRefreshAttempted(nsIWebProgress *aWebProgress, nsIURI *aRefreshURI, PRInt32 aMillis, PRBool aSameURI, PRBool *_retval NS_OUTPARAM) = 0;

  /**
    * Flags for onLocationChange2
    *
    * LOCATION_CHANGE_NORMAL
    *   Nothing special.
    *
    * LOCATION_CHANGE_SAME_DOCUMENT
    *   This flag is on when |aWebProgress| did not load a new document. 
    *   For example,
    *     1. The user clicks that anchor in a document which is linking to 
    *        [1.a.] the document itself.
    *        [1.b.] a location only <#hash> portion changed.
    *     2. The user inputs [1.b.]'s URI in the location bar.
    *     3. Session history navigation.
    *        [3.a.] history.pushState(...), history.replaceState(...) or
    *               history.popState(...) is called and |aWebProgress| wants to
    *               update the UI.
    *        [3.b.] Back/Forward/Go to URI of [1.a.], [1.b.] or [3.a.].
    *        [3.c.] After session history is cleared.
    */
  enum { LOCATION_CHANGE_NORMAL = 1U };

  enum { LOCATION_CHANGE_SAME_DOCUMENT = 2U };

  /**
   * This function is identical to nsIWebProgressListener::onLocationChange,
   * except for aFlags argument.
   *
   * @param aFlags
   *        This is a value which explains the situation or the reason why
   *        the location has changed.
   */
  /* void onLocationChange2 (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI aLocation, in unsigned long aFlags); */
  NS_SCRIPTABLE NS_IMETHOD OnLocationChange2(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsIURI *aLocation, PRUint32 aFlags) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIWebProgressListener2, NS_IWEBPROGRESSLISTENER2_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIWEBPROGRESSLISTENER2 \
  NS_SCRIPTABLE NS_IMETHOD OnProgressChange64(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRInt64 aCurSelfProgress, PRInt64 aMaxSelfProgress, PRInt64 aCurTotalProgress, PRInt64 aMaxTotalProgress); \
  NS_SCRIPTABLE NS_IMETHOD OnRefreshAttempted(nsIWebProgress *aWebProgress, nsIURI *aRefreshURI, PRInt32 aMillis, PRBool aSameURI, PRBool *_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD OnLocationChange2(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsIURI *aLocation, PRUint32 aFlags); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIWEBPROGRESSLISTENER2(_to) \
  NS_SCRIPTABLE NS_IMETHOD OnProgressChange64(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRInt64 aCurSelfProgress, PRInt64 aMaxSelfProgress, PRInt64 aCurTotalProgress, PRInt64 aMaxTotalProgress) { return _to OnProgressChange64(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress); } \
  NS_SCRIPTABLE NS_IMETHOD OnRefreshAttempted(nsIWebProgress *aWebProgress, nsIURI *aRefreshURI, PRInt32 aMillis, PRBool aSameURI, PRBool *_retval NS_OUTPARAM) { return _to OnRefreshAttempted(aWebProgress, aRefreshURI, aMillis, aSameURI, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD OnLocationChange2(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsIURI *aLocation, PRUint32 aFlags) { return _to OnLocationChange2(aWebProgress, aRequest, aLocation, aFlags); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIWEBPROGRESSLISTENER2(_to) \
  NS_SCRIPTABLE NS_IMETHOD OnProgressChange64(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRInt64 aCurSelfProgress, PRInt64 aMaxSelfProgress, PRInt64 aCurTotalProgress, PRInt64 aMaxTotalProgress) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnProgressChange64(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress); } \
  NS_SCRIPTABLE NS_IMETHOD OnRefreshAttempted(nsIWebProgress *aWebProgress, nsIURI *aRefreshURI, PRInt32 aMillis, PRBool aSameURI, PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnRefreshAttempted(aWebProgress, aRefreshURI, aMillis, aSameURI, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD OnLocationChange2(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsIURI *aLocation, PRUint32 aFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnLocationChange2(aWebProgress, aRequest, aLocation, aFlags); } 

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

/* Header file */
class nsWebProgressListener2 : public nsIWebProgressListener2
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIWEBPROGRESSLISTENER2

  nsWebProgressListener2();

private:
  ~nsWebProgressListener2();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsWebProgressListener2, nsIWebProgressListener2)

nsWebProgressListener2::nsWebProgressListener2()
{
  /* member initializers and constructor code */
}

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

/* void onProgressChange64 (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long long aCurSelfProgress, in long long aMaxSelfProgress, in long long aCurTotalProgress, in long long aMaxTotalProgress); */
NS_IMETHODIMP nsWebProgressListener2::OnProgressChange64(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRInt64 aCurSelfProgress, PRInt64 aMaxSelfProgress, PRInt64 aCurTotalProgress, PRInt64 aMaxTotalProgress)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean onRefreshAttempted (in nsIWebProgress aWebProgress, in nsIURI aRefreshURI, in long aMillis, in boolean aSameURI); */
NS_IMETHODIMP nsWebProgressListener2::OnRefreshAttempted(nsIWebProgress *aWebProgress, nsIURI *aRefreshURI, PRInt32 aMillis, PRBool aSameURI, PRBool *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onLocationChange2 (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI aLocation, in unsigned long aFlags); */
NS_IMETHODIMP nsWebProgressListener2::OnLocationChange2(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsIURI *aLocation, PRUint32 aFlags)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIWebProgressListener2_h__ */
