/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/slave/mozilla-central-macosx-xulrunner/build/dom/indexedDB/nsIIDBTransaction.idl
 */

#ifndef __gen_nsIIDBTransaction_h__
#define __gen_nsIIDBTransaction_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 nsIIDBDatabase; /* forward declaration */

class nsIDOMDOMStringList; /* forward declaration */


/* starting interface:    nsIIDBTransaction */
#define NS_IIDBTRANSACTION_IID_STR "00c3f651-f4bf-416b-9dc4-759135a35fa9"

#define NS_IIDBTRANSACTION_IID \
  {0x00c3f651, 0xf4bf, 0x416b, \
    { 0x9d, 0xc4, 0x75, 0x91, 0x35, 0xa3, 0x5f, 0xa9 }}

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

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IIDBTRANSACTION_IID)

  /* readonly attribute nsIIDBDatabase db; */
  NS_SCRIPTABLE NS_IMETHOD GetDb(nsIIDBDatabase * *aDb) = 0;

  enum { INITIAL = 0U };

  enum { LOADING = 1U };

  enum { DONE = 2U };

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

  enum { READ_WRITE = 0U };

  enum { READ_ONLY = 1U };

  enum { SNAPSHOT_READ = 2U };

  /* readonly attribute unsigned short mode; */
  NS_SCRIPTABLE NS_IMETHOD GetMode(PRUint16 *aMode) = 0;

  /* readonly attribute nsIDOMDOMStringList objectStoreNames; */
  NS_SCRIPTABLE NS_IMETHOD GetObjectStoreNames(nsIDOMDOMStringList * *aObjectStoreNames) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIIDBTransaction, NS_IIDBTRANSACTION_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIIDBTRANSACTION \
  NS_SCRIPTABLE NS_IMETHOD GetDb(nsIIDBDatabase * *aDb); \
  NS_SCRIPTABLE NS_IMETHOD GetReadyState(PRUint16 *aReadyState); \
  NS_SCRIPTABLE NS_IMETHOD GetMode(PRUint16 *aMode); \
  NS_SCRIPTABLE NS_IMETHOD GetObjectStoreNames(nsIDOMDOMStringList * *aObjectStoreNames); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIIDBTRANSACTION(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetDb(nsIIDBDatabase * *aDb) { return _to GetDb(aDb); } \
  NS_SCRIPTABLE NS_IMETHOD GetReadyState(PRUint16 *aReadyState) { return _to GetReadyState(aReadyState); } \
  NS_SCRIPTABLE NS_IMETHOD GetMode(PRUint16 *aMode) { return _to GetMode(aMode); } \
  NS_SCRIPTABLE NS_IMETHOD GetObjectStoreNames(nsIDOMDOMStringList * *aObjectStoreNames) { return _to GetObjectStoreNames(aObjectStoreNames); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIIDBTRANSACTION(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetDb(nsIIDBDatabase * *aDb) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDb(aDb); } \
  NS_SCRIPTABLE NS_IMETHOD GetReadyState(PRUint16 *aReadyState) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReadyState(aReadyState); } \
  NS_SCRIPTABLE NS_IMETHOD GetMode(PRUint16 *aMode) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMode(aMode); } \
  NS_SCRIPTABLE NS_IMETHOD GetObjectStoreNames(nsIDOMDOMStringList * *aObjectStoreNames) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetObjectStoreNames(aObjectStoreNames); } 

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

/* Header file */
class nsIDBTransaction : public nsIIDBTransaction
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIIDBTRANSACTION

  nsIDBTransaction();

private:
  ~nsIDBTransaction();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsIDBTransaction, nsIIDBTransaction)

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

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

/* readonly attribute nsIIDBDatabase db; */
NS_IMETHODIMP nsIDBTransaction::GetDb(nsIIDBDatabase * *aDb)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

/* readonly attribute unsigned short mode; */
NS_IMETHODIMP nsIDBTransaction::GetMode(PRUint16 *aMode)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIDOMDOMStringList objectStoreNames; */
NS_IMETHODIMP nsIDBTransaction::GetObjectStoreNames(nsIDOMDOMStringList * *aObjectStoreNames)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIIDBTransaction_h__ */
