/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Linux_2.6.18-8.el5_Depend/mozilla/uriloader/prefetch/nsIOfflineCacheUpdate.idl
 */

#ifndef __gen_nsIOfflineCacheUpdate_h__
#define __gen_nsIOfflineCacheUpdate_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 nsIDOMNode; /* forward declaration */

class nsIDOMDocument; /* forward declaration */

class nsIDOMLoadStatus; /* forward declaration */


/* starting interface:    nsIOfflineCacheUpdateObserver */
#define NS_IOFFLINECACHEUPDATEOBSERVER_IID_STR "e0785ebb-b3a1-426a-a70e-be2b923e973e"

#define NS_IOFFLINECACHEUPDATEOBSERVER_IID \
  {0xe0785ebb, 0xb3a1, 0x426a, \
    { 0xa7, 0x0e, 0xbe, 0x2b, 0x92, 0x3e, 0x97, 0x3e }}

class NS_NO_VTABLE nsIOfflineCacheUpdateObserver : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IOFFLINECACHEUPDATEOBSERVER_IID)

  /**
   * An item has finished loading.
   *
   * @param aItem load status for the item that completed.
   */
  /* void itemCompleted (in nsIDOMLoadStatus aItem); */
  NS_IMETHOD ItemCompleted(nsIDOMLoadStatus *aItem) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIOfflineCacheUpdateObserver, NS_IOFFLINECACHEUPDATEOBSERVER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIOFFLINECACHEUPDATEOBSERVER \
  NS_IMETHOD ItemCompleted(nsIDOMLoadStatus *aItem); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIOFFLINECACHEUPDATEOBSERVER(_to) \
  NS_IMETHOD ItemCompleted(nsIDOMLoadStatus *aItem) { return _to ItemCompleted(aItem); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIOFFLINECACHEUPDATEOBSERVER(_to) \
  NS_IMETHOD ItemCompleted(nsIDOMLoadStatus *aItem) { return !_to ? NS_ERROR_NULL_POINTER : _to->ItemCompleted(aItem); } 

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

/* Header file */
class nsOfflineCacheUpdateObserver : public nsIOfflineCacheUpdateObserver
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIOFFLINECACHEUPDATEOBSERVER

  nsOfflineCacheUpdateObserver();

private:
  ~nsOfflineCacheUpdateObserver();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsOfflineCacheUpdateObserver, nsIOfflineCacheUpdateObserver)

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

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

/* void itemCompleted (in nsIDOMLoadStatus aItem); */
NS_IMETHODIMP nsOfflineCacheUpdateObserver::ItemCompleted(nsIDOMLoadStatus *aItem)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIOfflineCacheUpdate */
#define NS_IOFFLINECACHEUPDATE_IID_STR "7dc06ede-1098-4384-b95e-65525ab254c9"

#define NS_IOFFLINECACHEUPDATE_IID \
  {0x7dc06ede, 0x1098, 0x4384, \
    { 0xb9, 0x5e, 0x65, 0x52, 0x5a, 0xb2, 0x54, 0xc9 }}

/**
 * An nsIOfflineCacheUpdate is used to update a domain's offline resources.
 * It can be used to perform partial or complete updates.
 *
 * Each update object maintains a list of nsIDOMLoadStatus items for the
 * resources it is updating.  The list of these items will be available
 * after the object is scheduled.
 *
 * One update object will be updating at a time.  The active object will
 * load its items one by one, sending itemCompleted() to any registered
 * observers.
 */
class NS_NO_VTABLE nsIOfflineCacheUpdate : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IOFFLINECACHEUPDATE_IID)

  /**
   * The domain being updated, and the domain that will own any URIs added
   * with this update.
   */
  /* readonly attribute ACString updateDomain; */
  NS_IMETHOD GetUpdateDomain(nsACString & aUpdateDomain) = 0;

  /**
   * The URI that will own any URIs added by this update
   */
  /* readonly attribute ACString ownerURI; */
  NS_IMETHOD GetOwnerURI(nsACString & aOwnerURI) = 0;

  /**
   * Initialize the update.
   *
   * @param aPartialUpdate
   *        TRUE if the update should just update the URIs given to it,
   *        FALSE if all URLs for the owner domain should be added.
   * @param aUpdateDomain
   *        The domain which is being updated, and which will own any
   *        URIs added.
   * @param aOwnerURI
   *        The owner URI for any URIs added.
   * @param aReferrerURI
   *        The page that is requesting the update.
   */
  /* void init (in boolean aPartialUpdate, in ACString aUpdateDomain, in ACString aOwnerURI, in nsIURI aReferrerURI); */
  NS_IMETHOD Init(PRBool aPartialUpdate, const nsACString & aUpdateDomain, const nsACString & aOwnerURI, nsIURI *aReferrerURI) = 0;

  /**
   * Add a URI to the offline cache as part of the update.
   *
   * @param aURI
   *        The URI to add.
   * @param aSource
   *        The DOM node (<link> tag) associated with this node (for
   *        implementing nsIDOMLoadStatus).
   */
  /* void addURI (in nsIURI aURI, in nsIDOMNode aSource); */
  NS_IMETHOD AddURI(nsIURI *aURI, nsIDOMNode *aSource) = 0;

  /**
   * Add the update to the offline update queue.  An offline-cache-update-added
   * event will be sent to the observer service.
   */
  /* void schedule (); */
  NS_IMETHOD Schedule(void) = 0;

  /**
   * Request that the update be scheduled when a document finishes loading.
   *
   * @param aDocument
   *        When this document finishes loading, the update will be scheduled.
   */
  /* void scheduleOnDocumentStop (in nsIDOMDocument aDocument); */
  NS_IMETHOD ScheduleOnDocumentStop(nsIDOMDocument *aDocument) = 0;

  /**
   * Access to the list of items in the update.
   */
  /* readonly attribute unsigned long count; */
  NS_IMETHOD GetCount(PRUint32 *aCount) = 0;

  /* nsIDOMLoadStatus item (in unsigned long index); */
  NS_IMETHOD Item(PRUint32 index, nsIDOMLoadStatus **_retval) = 0;

  /**
   * Observe loads that are added to the update.
   *
   * @param aObserver
   *        object that notifications will be sent to.
   * @param aHoldWeak
   *        TRUE if you want the update to hold a weak reference to the
   *        observer, FALSE for a strong reference.
   */
  /* void addObserver (in nsIOfflineCacheUpdateObserver aObserver, in boolean aHoldWeak); */
  NS_IMETHOD AddObserver(nsIOfflineCacheUpdateObserver *aObserver, PRBool aHoldWeak) = 0;

  /**
   * Remove an observer from the update.
   *
   * @param aObserver
   *        the observer to remove.
   */
  /* void removeObserver (in nsIOfflineCacheUpdateObserver aObserver); */
  NS_IMETHOD RemoveObserver(nsIOfflineCacheUpdateObserver *aObserver) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIOfflineCacheUpdate, NS_IOFFLINECACHEUPDATE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIOFFLINECACHEUPDATE \
  NS_IMETHOD GetUpdateDomain(nsACString & aUpdateDomain); \
  NS_IMETHOD GetOwnerURI(nsACString & aOwnerURI); \
  NS_IMETHOD Init(PRBool aPartialUpdate, const nsACString & aUpdateDomain, const nsACString & aOwnerURI, nsIURI *aReferrerURI); \
  NS_IMETHOD AddURI(nsIURI *aURI, nsIDOMNode *aSource); \
  NS_IMETHOD Schedule(void); \
  NS_IMETHOD ScheduleOnDocumentStop(nsIDOMDocument *aDocument); \
  NS_IMETHOD GetCount(PRUint32 *aCount); \
  NS_IMETHOD Item(PRUint32 index, nsIDOMLoadStatus **_retval); \
  NS_IMETHOD AddObserver(nsIOfflineCacheUpdateObserver *aObserver, PRBool aHoldWeak); \
  NS_IMETHOD RemoveObserver(nsIOfflineCacheUpdateObserver *aObserver); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIOFFLINECACHEUPDATE(_to) \
  NS_IMETHOD GetUpdateDomain(nsACString & aUpdateDomain) { return _to GetUpdateDomain(aUpdateDomain); } \
  NS_IMETHOD GetOwnerURI(nsACString & aOwnerURI) { return _to GetOwnerURI(aOwnerURI); } \
  NS_IMETHOD Init(PRBool aPartialUpdate, const nsACString & aUpdateDomain, const nsACString & aOwnerURI, nsIURI *aReferrerURI) { return _to Init(aPartialUpdate, aUpdateDomain, aOwnerURI, aReferrerURI); } \
  NS_IMETHOD AddURI(nsIURI *aURI, nsIDOMNode *aSource) { return _to AddURI(aURI, aSource); } \
  NS_IMETHOD Schedule(void) { return _to Schedule(); } \
  NS_IMETHOD ScheduleOnDocumentStop(nsIDOMDocument *aDocument) { return _to ScheduleOnDocumentStop(aDocument); } \
  NS_IMETHOD GetCount(PRUint32 *aCount) { return _to GetCount(aCount); } \
  NS_IMETHOD Item(PRUint32 index, nsIDOMLoadStatus **_retval) { return _to Item(index, _retval); } \
  NS_IMETHOD AddObserver(nsIOfflineCacheUpdateObserver *aObserver, PRBool aHoldWeak) { return _to AddObserver(aObserver, aHoldWeak); } \
  NS_IMETHOD RemoveObserver(nsIOfflineCacheUpdateObserver *aObserver) { return _to RemoveObserver(aObserver); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIOFFLINECACHEUPDATE(_to) \
  NS_IMETHOD GetUpdateDomain(nsACString & aUpdateDomain) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUpdateDomain(aUpdateDomain); } \
  NS_IMETHOD GetOwnerURI(nsACString & aOwnerURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOwnerURI(aOwnerURI); } \
  NS_IMETHOD Init(PRBool aPartialUpdate, const nsACString & aUpdateDomain, const nsACString & aOwnerURI, nsIURI *aReferrerURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aPartialUpdate, aUpdateDomain, aOwnerURI, aReferrerURI); } \
  NS_IMETHOD AddURI(nsIURI *aURI, nsIDOMNode *aSource) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddURI(aURI, aSource); } \
  NS_IMETHOD Schedule(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Schedule(); } \
  NS_IMETHOD ScheduleOnDocumentStop(nsIDOMDocument *aDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->ScheduleOnDocumentStop(aDocument); } \
  NS_IMETHOD GetCount(PRUint32 *aCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCount(aCount); } \
  NS_IMETHOD Item(PRUint32 index, nsIDOMLoadStatus **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Item(index, _retval); } \
  NS_IMETHOD AddObserver(nsIOfflineCacheUpdateObserver *aObserver, PRBool aHoldWeak) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddObserver(aObserver, aHoldWeak); } \
  NS_IMETHOD RemoveObserver(nsIOfflineCacheUpdateObserver *aObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveObserver(aObserver); } 

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

/* Header file */
class nsOfflineCacheUpdate : public nsIOfflineCacheUpdate
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIOFFLINECACHEUPDATE

  nsOfflineCacheUpdate();

private:
  ~nsOfflineCacheUpdate();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsOfflineCacheUpdate, nsIOfflineCacheUpdate)

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

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

/* readonly attribute ACString updateDomain; */
NS_IMETHODIMP nsOfflineCacheUpdate::GetUpdateDomain(nsACString & aUpdateDomain)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute ACString ownerURI; */
NS_IMETHODIMP nsOfflineCacheUpdate::GetOwnerURI(nsACString & aOwnerURI)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void init (in boolean aPartialUpdate, in ACString aUpdateDomain, in ACString aOwnerURI, in nsIURI aReferrerURI); */
NS_IMETHODIMP nsOfflineCacheUpdate::Init(PRBool aPartialUpdate, const nsACString & aUpdateDomain, const nsACString & aOwnerURI, nsIURI *aReferrerURI)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void addURI (in nsIURI aURI, in nsIDOMNode aSource); */
NS_IMETHODIMP nsOfflineCacheUpdate::AddURI(nsIURI *aURI, nsIDOMNode *aSource)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void schedule (); */
NS_IMETHODIMP nsOfflineCacheUpdate::Schedule()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void scheduleOnDocumentStop (in nsIDOMDocument aDocument); */
NS_IMETHODIMP nsOfflineCacheUpdate::ScheduleOnDocumentStop(nsIDOMDocument *aDocument)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute unsigned long count; */
NS_IMETHODIMP nsOfflineCacheUpdate::GetCount(PRUint32 *aCount)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIDOMLoadStatus item (in unsigned long index); */
NS_IMETHODIMP nsOfflineCacheUpdate::Item(PRUint32 index, nsIDOMLoadStatus **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void addObserver (in nsIOfflineCacheUpdateObserver aObserver, in boolean aHoldWeak); */
NS_IMETHODIMP nsOfflineCacheUpdate::AddObserver(nsIOfflineCacheUpdateObserver *aObserver, PRBool aHoldWeak)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removeObserver (in nsIOfflineCacheUpdateObserver aObserver); */
NS_IMETHODIMP nsOfflineCacheUpdate::RemoveObserver(nsIOfflineCacheUpdateObserver *aObserver)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIOfflineCacheUpdateService */
#define NS_IOFFLINECACHEUPDATESERVICE_IID_STR "f99ca10f-5cde-4966-b845-433f2921a201"

#define NS_IOFFLINECACHEUPDATESERVICE_IID \
  {0xf99ca10f, 0x5cde, 0x4966, \
    { 0xb8, 0x45, 0x43, 0x3f, 0x29, 0x21, 0xa2, 0x01 }}

class NS_NO_VTABLE nsIOfflineCacheUpdateService : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IOFFLINECACHEUPDATESERVICE_IID)

  /**
     * Access to the list of cache updates that have been scheduled.
     */
  /* readonly attribute unsigned long numUpdates; */
  NS_IMETHOD GetNumUpdates(PRUint32 *aNumUpdates) = 0;

  /* nsIOfflineCacheUpdate getUpdate (in unsigned long index); */
  NS_IMETHOD GetUpdate(PRUint32 index, nsIOfflineCacheUpdate **_retval) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIOfflineCacheUpdateService, NS_IOFFLINECACHEUPDATESERVICE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIOFFLINECACHEUPDATESERVICE \
  NS_IMETHOD GetNumUpdates(PRUint32 *aNumUpdates); \
  NS_IMETHOD GetUpdate(PRUint32 index, nsIOfflineCacheUpdate **_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIOFFLINECACHEUPDATESERVICE(_to) \
  NS_IMETHOD GetNumUpdates(PRUint32 *aNumUpdates) { return _to GetNumUpdates(aNumUpdates); } \
  NS_IMETHOD GetUpdate(PRUint32 index, nsIOfflineCacheUpdate **_retval) { return _to GetUpdate(index, _retval); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIOFFLINECACHEUPDATESERVICE(_to) \
  NS_IMETHOD GetNumUpdates(PRUint32 *aNumUpdates) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNumUpdates(aNumUpdates); } \
  NS_IMETHOD GetUpdate(PRUint32 index, nsIOfflineCacheUpdate **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUpdate(index, _retval); } 

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

/* Header file */
class nsOfflineCacheUpdateService : public nsIOfflineCacheUpdateService
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIOFFLINECACHEUPDATESERVICE

  nsOfflineCacheUpdateService();

private:
  ~nsOfflineCacheUpdateService();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsOfflineCacheUpdateService, nsIOfflineCacheUpdateService)

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

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

/* readonly attribute unsigned long numUpdates; */
NS_IMETHODIMP nsOfflineCacheUpdateService::GetNumUpdates(PRUint32 *aNumUpdates)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIOfflineCacheUpdate getUpdate (in unsigned long index); */
NS_IMETHODIMP nsOfflineCacheUpdateService::GetUpdate(PRUint32 index, nsIOfflineCacheUpdate **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIOfflineCacheUpdate_h__ */
