/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl\nsICacheEntryOpenCallback.idl
 */

#ifndef __gen_nsICacheEntryOpenCallback_h__
#define __gen_nsICacheEntryOpenCallback_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 nsICacheEntry; /* forward declaration */

class nsIApplicationCache; /* forward declaration */


/* starting interface:    nsICacheEntryOpenCallback */
#define NS_ICACHEENTRYOPENCALLBACK_IID_STR "cdd8b9be-71f0-4b0a-a7f4-626fbb3d2e9b"

#define NS_ICACHEENTRYOPENCALLBACK_IID \
  {0xcdd8b9be, 0x71f0, 0x4b0a, \
    { 0xa7, 0xf4, 0x62, 0x6f, 0xbb, 0x3d, 0x2e, 0x9b }}

class NS_NO_VTABLE nsICacheEntryOpenCallback : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICACHEENTRYOPENCALLBACK_IID)

  enum {
    ENTRY_WANTED = 0U,
    ENTRY_NEEDS_REVALIDATION = 1U,
    ENTRY_NOT_WANTED = 2U
  };

  /* unsigned long onCacheEntryCheck (in nsICacheEntry aEntry, in nsIApplicationCache aApplicationCache); */
  NS_IMETHOD OnCacheEntryCheck(nsICacheEntry *aEntry, nsIApplicationCache *aApplicationCache, uint32_t *_retval) = 0;

  /* void onCacheEntryAvailable (in nsICacheEntry aEntry, in boolean aNew, in nsIApplicationCache aApplicationCache, in nsresult aResult); */
  NS_IMETHOD OnCacheEntryAvailable(nsICacheEntry *aEntry, bool aNew, nsIApplicationCache *aApplicationCache, nsresult aResult) = 0;

  /* readonly attribute boolean mainThreadOnly; */
  NS_IMETHOD GetMainThreadOnly(bool *aMainThreadOnly) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsICacheEntryOpenCallback, NS_ICACHEENTRYOPENCALLBACK_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSICACHEENTRYOPENCALLBACK \
  NS_IMETHOD OnCacheEntryCheck(nsICacheEntry *aEntry, nsIApplicationCache *aApplicationCache, uint32_t *_retval); \
  NS_IMETHOD OnCacheEntryAvailable(nsICacheEntry *aEntry, bool aNew, nsIApplicationCache *aApplicationCache, nsresult aResult); \
  NS_IMETHOD GetMainThreadOnly(bool *aMainThreadOnly); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSICACHEENTRYOPENCALLBACK(_to) \
  NS_IMETHOD OnCacheEntryCheck(nsICacheEntry *aEntry, nsIApplicationCache *aApplicationCache, uint32_t *_retval) { return _to OnCacheEntryCheck(aEntry, aApplicationCache, _retval); } \
  NS_IMETHOD OnCacheEntryAvailable(nsICacheEntry *aEntry, bool aNew, nsIApplicationCache *aApplicationCache, nsresult aResult) { return _to OnCacheEntryAvailable(aEntry, aNew, aApplicationCache, aResult); } \
  NS_IMETHOD GetMainThreadOnly(bool *aMainThreadOnly) { return _to GetMainThreadOnly(aMainThreadOnly); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSICACHEENTRYOPENCALLBACK(_to) \
  NS_IMETHOD OnCacheEntryCheck(nsICacheEntry *aEntry, nsIApplicationCache *aApplicationCache, uint32_t *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnCacheEntryCheck(aEntry, aApplicationCache, _retval); } \
  NS_IMETHOD OnCacheEntryAvailable(nsICacheEntry *aEntry, bool aNew, nsIApplicationCache *aApplicationCache, nsresult aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnCacheEntryAvailable(aEntry, aNew, aApplicationCache, aResult); } \
  NS_IMETHOD GetMainThreadOnly(bool *aMainThreadOnly) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMainThreadOnly(aMainThreadOnly); } 

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

/* Header file */
class nsCacheEntryOpenCallback : public nsICacheEntryOpenCallback
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSICACHEENTRYOPENCALLBACK

  nsCacheEntryOpenCallback();

private:
  ~nsCacheEntryOpenCallback();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsCacheEntryOpenCallback, nsICacheEntryOpenCallback)

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

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

/* unsigned long onCacheEntryCheck (in nsICacheEntry aEntry, in nsIApplicationCache aApplicationCache); */
NS_IMETHODIMP nsCacheEntryOpenCallback::OnCacheEntryCheck(nsICacheEntry *aEntry, nsIApplicationCache *aApplicationCache, uint32_t *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onCacheEntryAvailable (in nsICacheEntry aEntry, in boolean aNew, in nsIApplicationCache aApplicationCache, in nsresult aResult); */
NS_IMETHODIMP nsCacheEntryOpenCallback::OnCacheEntryAvailable(nsICacheEntry *aEntry, bool aNew, nsIApplicationCache *aApplicationCache, nsresult aResult)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute boolean mainThreadOnly; */
NS_IMETHODIMP nsCacheEntryOpenCallback::GetMainThreadOnly(bool *aMainThreadOnly)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsICacheEntryOpenCallback_h__ */
