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

#ifndef __gen_nsIIDBFactory_h__
#define __gen_nsIIDBFactory_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 nsIIDBKeyRange; /* forward declaration */

class nsIIDBRequest; /* forward declaration */

class nsIVariant; /* forward declaration */

#include "jsapi.h"

/* starting interface:    nsIIDBFactory */
#define NS_IIDBFACTORY_IID_STR "a1e1dbd1-53a7-490a-ab6f-aa55809dd867"

#define NS_IIDBFACTORY_IID \
  {0xa1e1dbd1, 0x53a7, 0x490a, \
    { 0xab, 0x6f, 0xaa, 0x55, 0x80, 0x9d, 0xd8, 0x67 }}

/**
 * Interface that defines the indexedDB property on a window.  See
 * http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBFactory
 * for more information.
 */
class NS_NO_VTABLE NS_SCRIPTABLE nsIIDBFactory : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IIDBFACTORY_IID)

  /* [implicit_jscontext] nsIIDBRequest open (in AString name, in AString description); */
  NS_SCRIPTABLE NS_IMETHOD Open(const nsAString & name, const nsAString & description, JSContext *cx, nsIIDBRequest **_retval NS_OUTPARAM) = 0;

  /* nsIIDBKeyRange makeSingleKeyRange (in nsIVariant value); */
  NS_SCRIPTABLE NS_IMETHOD MakeSingleKeyRange(nsIVariant *value, nsIIDBKeyRange **_retval NS_OUTPARAM) = 0;

  /* nsIIDBKeyRange makeLeftBoundKeyRange (in nsIVariant bound, [optional] in boolean open); */
  NS_SCRIPTABLE NS_IMETHOD MakeLeftBoundKeyRange(nsIVariant *bound, PRBool open, nsIIDBKeyRange **_retval NS_OUTPARAM) = 0;

  /* nsIIDBKeyRange makeRightBoundKeyRange (in nsIVariant bound, [optional] in boolean open); */
  NS_SCRIPTABLE NS_IMETHOD MakeRightBoundKeyRange(nsIVariant *bound, PRBool open, nsIIDBKeyRange **_retval NS_OUTPARAM) = 0;

  /* nsIIDBKeyRange makeBoundKeyRange (in nsIVariant left, in nsIVariant right, [optional] in boolean openLeft, [optional] in boolean openRight); */
  NS_SCRIPTABLE NS_IMETHOD MakeBoundKeyRange(nsIVariant *left, nsIVariant *right, PRBool openLeft, PRBool openRight, nsIIDBKeyRange **_retval NS_OUTPARAM) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIIDBFactory, NS_IIDBFACTORY_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIIDBFACTORY \
  NS_SCRIPTABLE NS_IMETHOD Open(const nsAString & name, const nsAString & description, JSContext *cx, nsIIDBRequest **_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD MakeSingleKeyRange(nsIVariant *value, nsIIDBKeyRange **_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD MakeLeftBoundKeyRange(nsIVariant *bound, PRBool open, nsIIDBKeyRange **_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD MakeRightBoundKeyRange(nsIVariant *bound, PRBool open, nsIIDBKeyRange **_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD MakeBoundKeyRange(nsIVariant *left, nsIVariant *right, PRBool openLeft, PRBool openRight, nsIIDBKeyRange **_retval NS_OUTPARAM); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIIDBFACTORY(_to) \
  NS_SCRIPTABLE NS_IMETHOD Open(const nsAString & name, const nsAString & description, JSContext *cx, nsIIDBRequest **_retval NS_OUTPARAM) { return _to Open(name, description, cx, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD MakeSingleKeyRange(nsIVariant *value, nsIIDBKeyRange **_retval NS_OUTPARAM) { return _to MakeSingleKeyRange(value, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD MakeLeftBoundKeyRange(nsIVariant *bound, PRBool open, nsIIDBKeyRange **_retval NS_OUTPARAM) { return _to MakeLeftBoundKeyRange(bound, open, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD MakeRightBoundKeyRange(nsIVariant *bound, PRBool open, nsIIDBKeyRange **_retval NS_OUTPARAM) { return _to MakeRightBoundKeyRange(bound, open, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD MakeBoundKeyRange(nsIVariant *left, nsIVariant *right, PRBool openLeft, PRBool openRight, nsIIDBKeyRange **_retval NS_OUTPARAM) { return _to MakeBoundKeyRange(left, right, openLeft, openRight, _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_NSIIDBFACTORY(_to) \
  NS_SCRIPTABLE NS_IMETHOD Open(const nsAString & name, const nsAString & description, JSContext *cx, nsIIDBRequest **_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Open(name, description, cx, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD MakeSingleKeyRange(nsIVariant *value, nsIIDBKeyRange **_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->MakeSingleKeyRange(value, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD MakeLeftBoundKeyRange(nsIVariant *bound, PRBool open, nsIIDBKeyRange **_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->MakeLeftBoundKeyRange(bound, open, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD MakeRightBoundKeyRange(nsIVariant *bound, PRBool open, nsIIDBKeyRange **_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->MakeRightBoundKeyRange(bound, open, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD MakeBoundKeyRange(nsIVariant *left, nsIVariant *right, PRBool openLeft, PRBool openRight, nsIIDBKeyRange **_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->MakeBoundKeyRange(left, right, openLeft, openRight, _retval); } 

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

/* Header file */
class nsIDBFactory : public nsIIDBFactory
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIIDBFACTORY

  nsIDBFactory();

private:
  ~nsIDBFactory();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsIDBFactory, nsIIDBFactory)

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

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

/* [implicit_jscontext] nsIIDBRequest open (in AString name, in AString description); */
NS_IMETHODIMP nsIDBFactory::Open(const nsAString & name, const nsAString & description, JSContext *cx, nsIIDBRequest **_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIIDBKeyRange makeSingleKeyRange (in nsIVariant value); */
NS_IMETHODIMP nsIDBFactory::MakeSingleKeyRange(nsIVariant *value, nsIIDBKeyRange **_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIIDBKeyRange makeLeftBoundKeyRange (in nsIVariant bound, [optional] in boolean open); */
NS_IMETHODIMP nsIDBFactory::MakeLeftBoundKeyRange(nsIVariant *bound, PRBool open, nsIIDBKeyRange **_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIIDBKeyRange makeRightBoundKeyRange (in nsIVariant bound, [optional] in boolean open); */
NS_IMETHODIMP nsIDBFactory::MakeRightBoundKeyRange(nsIVariant *bound, PRBool open, nsIIDBKeyRange **_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIIDBKeyRange makeBoundKeyRange (in nsIVariant left, in nsIVariant right, [optional] in boolean openLeft, [optional] in boolean openRight); */
NS_IMETHODIMP nsIDBFactory::MakeBoundKeyRange(nsIVariant *left, nsIVariant *right, PRBool openLeft, PRBool openRight, nsIIDBKeyRange **_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIIDBFactory_h__ */
