/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIFileChannel.idl
 */

#ifndef __gen_nsIFileChannel_h__
#define __gen_nsIFileChannel_h__


#ifndef __gen_nsIChannel_h__
#include "nsIChannel.h"
#endif

#ifndef __gen_nsIURL_h__
#include "nsIURL.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIFile; /* forward declaration */


/* starting interface:    nsIFileURL */
#define NS_IFILEURL_IID_STR "d26b2e2e-1dd1-11b2-88f3-8545a7ba7949"

#define NS_IFILEURL_IID \
  {0xd26b2e2e, 0x1dd1, 0x11b2, \
    { 0x88, 0xf3, 0x85, 0x45, 0xa7, 0xba, 0x79, 0x49 }}

/**
 * nsIFileURL is used for the file: protocol, and gives access to the
 * underlying nsIFile object.
 */
class NS_NO_VTABLE nsIFileURL : public nsIURL {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFILEURL_IID)

  /* attribute nsIFile file; */
  NS_IMETHOD GetFile(nsIFile * *aFile) = 0;
  NS_IMETHOD SetFile(nsIFile * aFile) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIFILEURL \
  NS_IMETHOD GetFile(nsIFile * *aFile); \
  NS_IMETHOD SetFile(nsIFile * aFile); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIFILEURL(_to) \
  NS_IMETHOD GetFile(nsIFile * *aFile) { return _to GetFile(aFile); } \
  NS_IMETHOD SetFile(nsIFile * aFile) { return _to SetFile(aFile); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIFILEURL(_to) \
  NS_IMETHOD GetFile(nsIFile * *aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFile(aFile); } \
  NS_IMETHOD SetFile(nsIFile * aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFile(aFile); } 

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

/* Header file */
class nsFileURL : public nsIFileURL
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIFILEURL

  nsFileURL();
  virtual ~nsFileURL();
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsFileURL, nsIFileURL)

nsFileURL::nsFileURL()
{
  NS_INIT_ISUPPORTS();
  /* member initializers and constructor code */
}

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

/* attribute nsIFile file; */
NS_IMETHODIMP nsFileURL::GetFile(nsIFile * *aFile)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsFileURL::SetFile(nsIFile * aFile)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIFileChannel */
#define NS_IFILECHANNEL_IID_STR "68a26506-f947-11d3-8cda-0060b0fc14a3"

#define NS_IFILECHANNEL_IID \
  {0x68a26506, 0xf947, 0x11d3, \
    { 0x8c, 0xda, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 }}

/**
 * nsIFileChannel is an interface that allows for the initialization
 * of a simple nsIChannel that is constructed from a single nsIFile and
 * associated content type. 
 */
class NS_NO_VTABLE nsIFileChannel : public nsIChannel {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFILECHANNEL_IID)

  /** 
     * Values for ioFlags parameters to be or'd together. 
     * (From prio.h)
     */
  enum { NS_RDONLY = 1 };

  enum { NS_WRONLY = 2 };

  enum { NS_RDWR = 4 };

  enum { NS_CREATE_FILE = 8 };

  enum { NS_APPEND = 16 };

  enum { NS_TRUNCATE = 32 };

  enum { NS_SYNC = 64 };

  enum { NS_EXCL = 128 };

  /* void init (in nsIFile file, in long ioFlags, in long perm); */
  NS_IMETHOD Init(nsIFile *file, PRInt32 ioFlags, PRInt32 perm) = 0;

  /* readonly attribute nsIFile file; */
  NS_IMETHOD GetFile(nsIFile * *aFile) = 0;

  /* attribute long ioFlags; */
  NS_IMETHOD GetIoFlags(PRInt32 *aIoFlags) = 0;
  NS_IMETHOD SetIoFlags(PRInt32 aIoFlags) = 0;

  /* attribute long permissions; */
  NS_IMETHOD GetPermissions(PRInt32 *aPermissions) = 0;
  NS_IMETHOD SetPermissions(PRInt32 aPermissions) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIFILECHANNEL \
  NS_IMETHOD Init(nsIFile *file, PRInt32 ioFlags, PRInt32 perm); \
  NS_IMETHOD GetFile(nsIFile * *aFile); \
  NS_IMETHOD GetIoFlags(PRInt32 *aIoFlags); \
  NS_IMETHOD SetIoFlags(PRInt32 aIoFlags); \
  NS_IMETHOD GetPermissions(PRInt32 *aPermissions); \
  NS_IMETHOD SetPermissions(PRInt32 aPermissions); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIFILECHANNEL(_to) \
  NS_IMETHOD Init(nsIFile *file, PRInt32 ioFlags, PRInt32 perm) { return _to Init(file, ioFlags, perm); } \
  NS_IMETHOD GetFile(nsIFile * *aFile) { return _to GetFile(aFile); } \
  NS_IMETHOD GetIoFlags(PRInt32 *aIoFlags) { return _to GetIoFlags(aIoFlags); } \
  NS_IMETHOD SetIoFlags(PRInt32 aIoFlags) { return _to SetIoFlags(aIoFlags); } \
  NS_IMETHOD GetPermissions(PRInt32 *aPermissions) { return _to GetPermissions(aPermissions); } \
  NS_IMETHOD SetPermissions(PRInt32 aPermissions) { return _to SetPermissions(aPermissions); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIFILECHANNEL(_to) \
  NS_IMETHOD Init(nsIFile *file, PRInt32 ioFlags, PRInt32 perm) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(file, ioFlags, perm); } \
  NS_IMETHOD GetFile(nsIFile * *aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFile(aFile); } \
  NS_IMETHOD GetIoFlags(PRInt32 *aIoFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIoFlags(aIoFlags); } \
  NS_IMETHOD SetIoFlags(PRInt32 aIoFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIoFlags(aIoFlags); } \
  NS_IMETHOD GetPermissions(PRInt32 *aPermissions) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPermissions(aPermissions); } \
  NS_IMETHOD SetPermissions(PRInt32 aPermissions) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPermissions(aPermissions); } 

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

/* Header file */
class nsFileChannel : public nsIFileChannel
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIFILECHANNEL

  nsFileChannel();
  virtual ~nsFileChannel();
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsFileChannel, nsIFileChannel)

nsFileChannel::nsFileChannel()
{
  NS_INIT_ISUPPORTS();
  /* member initializers and constructor code */
}

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

/* void init (in nsIFile file, in long ioFlags, in long perm); */
NS_IMETHODIMP nsFileChannel::Init(nsIFile *file, PRInt32 ioFlags, PRInt32 perm)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIFile file; */
NS_IMETHODIMP nsFileChannel::GetFile(nsIFile * *aFile)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute long ioFlags; */
NS_IMETHODIMP nsFileChannel::GetIoFlags(PRInt32 *aIoFlags)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsFileChannel::SetIoFlags(PRInt32 aIoFlags)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute long permissions; */
NS_IMETHODIMP nsFileChannel::GetPermissions(PRInt32 *aPermissions)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsFileChannel::SetPermissions(PRInt32 aPermissions)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

#define NS_LOCALFILECHANNEL_CLASSNAME "Local File Channel"
#define NS_LOCALFILECHANNEL_CONTRACTID "@mozilla.org/network/local-file-channel;1"
#define NS_LOCALFILECHANNEL_CID                      \
{ /* 6d5b2d44-f947-11d3-8cda-0060b0fc14a3 */         \
    0x6d5b2d44,                                      \
    0xf947,                                          \
    0x11d3,                                          \
    {0x8c, 0xda, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \
}

#endif /* __gen_nsIFileChannel_h__ */
