/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM e:/builds/moz2_slave/mozilla-central-win32-xulrunner/build/dom/indexedDB/nsIIDBRequest.idl
 */

#ifndef __gen_nsIIDBRequest_h__
#define __gen_nsIIDBRequest_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 nsIDOMEventListener; /* forward declaration */


/* starting interface:    nsIIDBRequest */
#define NS_IIDBREQUEST_IID_STR "2cff021d-e80e-48a7-bb45-00172df02c1c"

#define NS_IIDBREQUEST_IID \
  {0x2cff021d, 0xe80e, 0x48a7, \
    { 0xbb, 0x45, 0x00, 0x17, 0x2d, 0xf0, 0x2c, 0x1c }}

/**
 * IDBReqeust interface.  See
 * http://dev.w3.org/2006/webapi/WebSimpleDB/#idl-def-IDBRequest for more
 * information.
 */
class NS_NO_VTABLE NS_SCRIPTABLE nsIIDBRequest : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IIDBREQUEST_IID)

  /* void abort (); */
  NS_SCRIPTABLE NS_IMETHOD Abort(void) = 0;

  enum { INITIAL = 0U };

  enum { LOADING = 1U };

  enum { DONE = 2U };

  /* readonly attribute unsigned short readyState; */
  NS_SCRIPTABLE NS_IMETHOD GetReadyState(PRUint16 *aReadyState) = 0;

  /* attribute nsIDOMEventListener onsuccess; */
  NS_SCRIPTABLE NS_IMETHOD GetOnsuccess(nsIDOMEventListener **aOnsuccess) = 0;
  NS_SCRIPTABLE NS_IMETHOD SetOnsuccess(nsIDOMEventListener *aOnsuccess) = 0;

  /* attribute nsIDOMEventListener onerror; */
  NS_SCRIPTABLE NS_IMETHOD GetOnerror(nsIDOMEventListener **aOnerror) = 0;
  NS_SCRIPTABLE NS_IMETHOD SetOnerror(nsIDOMEventListener *aOnerror) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIIDBRequest, NS_IIDBREQUEST_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIIDBREQUEST \
  NS_SCRIPTABLE NS_IMETHOD Abort(void); \
  NS_SCRIPTABLE NS_IMETHOD GetReadyState(PRUint16 *aReadyState); \
  NS_SCRIPTABLE NS_IMETHOD GetOnsuccess(nsIDOMEventListener **aOnsuccess); \
  NS_SCRIPTABLE NS_IMETHOD SetOnsuccess(nsIDOMEventListener *aOnsuccess); \
  NS_SCRIPTABLE NS_IMETHOD GetOnerror(nsIDOMEventListener **aOnerror); \
  NS_SCRIPTABLE NS_IMETHOD SetOnerror(nsIDOMEventListener *aOnerror); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIIDBREQUEST(_to) \
  NS_SCRIPTABLE NS_IMETHOD Abort(void) { return _to Abort(); } \
  NS_SCRIPTABLE NS_IMETHOD GetReadyState(PRUint16 *aReadyState) { return _to GetReadyState(aReadyState); } \
  NS_SCRIPTABLE NS_IMETHOD GetOnsuccess(nsIDOMEventListener **aOnsuccess) { return _to GetOnsuccess(aOnsuccess); } \
  NS_SCRIPTABLE NS_IMETHOD SetOnsuccess(nsIDOMEventListener *aOnsuccess) { return _to SetOnsuccess(aOnsuccess); } \
  NS_SCRIPTABLE NS_IMETHOD GetOnerror(nsIDOMEventListener **aOnerror) { return _to GetOnerror(aOnerror); } \
  NS_SCRIPTABLE NS_IMETHOD SetOnerror(nsIDOMEventListener *aOnerror) { return _to SetOnerror(aOnerror); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIIDBREQUEST(_to) \
  NS_SCRIPTABLE NS_IMETHOD Abort(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Abort(); } \
  NS_SCRIPTABLE NS_IMETHOD GetReadyState(PRUint16 *aReadyState) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReadyState(aReadyState); } \
  NS_SCRIPTABLE NS_IMETHOD GetOnsuccess(nsIDOMEventListener **aOnsuccess) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOnsuccess(aOnsuccess); } \
  NS_SCRIPTABLE NS_IMETHOD SetOnsuccess(nsIDOMEventListener *aOnsuccess) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOnsuccess(aOnsuccess); } \
  NS_SCRIPTABLE NS_IMETHOD GetOnerror(nsIDOMEventListener **aOnerror) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOnerror(aOnerror); } \
  NS_SCRIPTABLE NS_IMETHOD SetOnerror(nsIDOMEventListener *aOnerror) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOnerror(aOnerror); } 

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

/* Header file */
class nsIDBRequest : public nsIIDBRequest
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIIDBREQUEST

  nsIDBRequest();

private:
  ~nsIDBRequest();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsIDBRequest, nsIIDBRequest)

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

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

/* void abort (); */
NS_IMETHODIMP nsIDBRequest::Abort()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute unsigned short readyState; */
NS_IMETHODIMP nsIDBRequest::GetReadyState(PRUint16 *aReadyState)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute nsIDOMEventListener onsuccess; */
NS_IMETHODIMP nsIDBRequest::GetOnsuccess(nsIDOMEventListener **aOnsuccess)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsIDBRequest::SetOnsuccess(nsIDOMEventListener *aOnsuccess)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute nsIDOMEventListener onerror; */
NS_IMETHODIMP nsIDBRequest::GetOnerror(nsIDOMEventListener **aOnerror)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsIDBRequest::SetOnerror(nsIDOMEventListener *aOnerror)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIIDBRequest_h__ */
