/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/slave/mozilla-1.9.2-linux-xulrunner/build/content/base/public/nsIDOMFileRequest.idl
 */

#ifndef __gen_nsIDOMFileRequest_h__
#define __gen_nsIDOMFileRequest_h__


#ifndef __gen_nsIDOMEventTarget_h__
#include "nsIDOMEventTarget.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 */

class nsIDOMFile; /* forward declaration */

class nsIDOMFileError; /* forward declaration */


/* starting interface:    nsIDOMFileRequest */
#define NS_IDOMFILEREQUEST_IID_STR "074fec26-7fab-4e05-9e60-ec49e148f5ef"

#define NS_IDOMFILEREQUEST_IID \
  {0x074fec26, 0x7fab, 0x4e05, \
    { 0x9e, 0x60, 0xec, 0x49, 0xe1, 0x48, 0xf5, 0xef }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIDOMFileRequest : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMFILEREQUEST_IID)

  /* void readAsBinaryString (in nsIDOMFile filedata); */
  NS_SCRIPTABLE NS_IMETHOD ReadAsBinaryString(nsIDOMFile *filedata) = 0;

  /* void readAsText (in nsIDOMFile filedata, [optional] in DOMString encoding); */
  NS_SCRIPTABLE NS_IMETHOD ReadAsText(nsIDOMFile *filedata, const nsAString & encoding) = 0;

  /* void readAsDataURL (in nsIDOMFile file); */
  NS_SCRIPTABLE NS_IMETHOD ReadAsDataURL(nsIDOMFile *file) = 0;

  /* 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;

  /* readonly attribute DOMString response; */
  NS_SCRIPTABLE NS_IMETHOD GetResponse(nsAString & aResponse) = 0;

  /* readonly attribute nsIDOMFileError error; */
  NS_SCRIPTABLE NS_IMETHOD GetError(nsIDOMFileError * *aError) = 0;

  /* attribute nsIDOMEventListener onloadend; */
  NS_SCRIPTABLE NS_IMETHOD GetOnloadend(nsIDOMEventListener * *aOnloadend) = 0;
  NS_SCRIPTABLE NS_IMETHOD SetOnloadend(nsIDOMEventListener * aOnloadend) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMFileRequest, NS_IDOMFILEREQUEST_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDOMFILEREQUEST \
  NS_SCRIPTABLE NS_IMETHOD ReadAsBinaryString(nsIDOMFile *filedata); \
  NS_SCRIPTABLE NS_IMETHOD ReadAsText(nsIDOMFile *filedata, const nsAString & encoding); \
  NS_SCRIPTABLE NS_IMETHOD ReadAsDataURL(nsIDOMFile *file); \
  NS_SCRIPTABLE NS_IMETHOD Abort(void); \
  NS_SCRIPTABLE NS_IMETHOD GetReadyState(PRUint16 *aReadyState); \
  NS_SCRIPTABLE NS_IMETHOD GetResponse(nsAString & aResponse); \
  NS_SCRIPTABLE NS_IMETHOD GetError(nsIDOMFileError * *aError); \
  NS_SCRIPTABLE NS_IMETHOD GetOnloadend(nsIDOMEventListener * *aOnloadend); \
  NS_SCRIPTABLE NS_IMETHOD SetOnloadend(nsIDOMEventListener * aOnloadend); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIDOMFILEREQUEST(_to) \
  NS_SCRIPTABLE NS_IMETHOD ReadAsBinaryString(nsIDOMFile *filedata) { return _to ReadAsBinaryString(filedata); } \
  NS_SCRIPTABLE NS_IMETHOD ReadAsText(nsIDOMFile *filedata, const nsAString & encoding) { return _to ReadAsText(filedata, encoding); } \
  NS_SCRIPTABLE NS_IMETHOD ReadAsDataURL(nsIDOMFile *file) { return _to ReadAsDataURL(file); } \
  NS_SCRIPTABLE NS_IMETHOD Abort(void) { return _to Abort(); } \
  NS_SCRIPTABLE NS_IMETHOD GetReadyState(PRUint16 *aReadyState) { return _to GetReadyState(aReadyState); } \
  NS_SCRIPTABLE NS_IMETHOD GetResponse(nsAString & aResponse) { return _to GetResponse(aResponse); } \
  NS_SCRIPTABLE NS_IMETHOD GetError(nsIDOMFileError * *aError) { return _to GetError(aError); } \
  NS_SCRIPTABLE NS_IMETHOD GetOnloadend(nsIDOMEventListener * *aOnloadend) { return _to GetOnloadend(aOnloadend); } \
  NS_SCRIPTABLE NS_IMETHOD SetOnloadend(nsIDOMEventListener * aOnloadend) { return _to SetOnloadend(aOnloadend); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIDOMFILEREQUEST(_to) \
  NS_SCRIPTABLE NS_IMETHOD ReadAsBinaryString(nsIDOMFile *filedata) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReadAsBinaryString(filedata); } \
  NS_SCRIPTABLE NS_IMETHOD ReadAsText(nsIDOMFile *filedata, const nsAString & encoding) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReadAsText(filedata, encoding); } \
  NS_SCRIPTABLE NS_IMETHOD ReadAsDataURL(nsIDOMFile *file) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReadAsDataURL(file); } \
  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 GetResponse(nsAString & aResponse) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResponse(aResponse); } \
  NS_SCRIPTABLE NS_IMETHOD GetError(nsIDOMFileError * *aError) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetError(aError); } \
  NS_SCRIPTABLE NS_IMETHOD GetOnloadend(nsIDOMEventListener * *aOnloadend) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOnloadend(aOnloadend); } \
  NS_SCRIPTABLE NS_IMETHOD SetOnloadend(nsIDOMEventListener * aOnloadend) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOnloadend(aOnloadend); } 

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

/* Header file */
class nsDOMFileRequest : public nsIDOMFileRequest
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIDOMFILEREQUEST

  nsDOMFileRequest();

private:
  ~nsDOMFileRequest();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsDOMFileRequest, nsIDOMFileRequest)

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

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

/* void readAsBinaryString (in nsIDOMFile filedata); */
NS_IMETHODIMP nsDOMFileRequest::ReadAsBinaryString(nsIDOMFile *filedata)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void readAsText (in nsIDOMFile filedata, [optional] in DOMString encoding); */
NS_IMETHODIMP nsDOMFileRequest::ReadAsText(nsIDOMFile *filedata, const nsAString & encoding)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void readAsDataURL (in nsIDOMFile file); */
NS_IMETHODIMP nsDOMFileRequest::ReadAsDataURL(nsIDOMFile *file)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

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

/* readonly attribute DOMString response; */
NS_IMETHODIMP nsDOMFileRequest::GetResponse(nsAString & aResponse)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIDOMFileError error; */
NS_IMETHODIMP nsDOMFileRequest::GetError(nsIDOMFileError * *aError)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute nsIDOMEventListener onloadend; */
NS_IMETHODIMP nsDOMFileRequest::GetOnloadend(nsIDOMEventListener * *aOnloadend)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsDOMFileRequest::SetOnloadend(nsIDOMEventListener * aOnloadend)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

#define NS_FILEREQUEST_CID                            \
{0x06aa7c21, 0xfe05, 0x4cf2,                         \
{0xb1, 0xc4, 0x0c, 0x71, 0x26, 0xa4, 0xf7, 0x13}}
#define NS_FILEREQUEST_CONTRACTID \
"@mozilla.org/files/filerequest;1"

#endif /* __gen_nsIDOMFileRequest_h__ */
