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

#ifndef __gen_nsIFilePicker_h__
#define __gen_nsIFilePicker_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 nsILocalFile; /* forward declaration */

class nsIFileURL; /* forward declaration */

class nsIDOMWindowInternal; /* forward declaration */


/* starting interface:    nsIFilePicker */
#define NS_IFILEPICKER_IID_STR "c47de916-1dd1-11b2-8141-82507fa02b21"

#define NS_IFILEPICKER_IID \
  {0xc47de916, 0x1dd1, 0x11b2, \
    { 0x81, 0x41, 0x82, 0x50, 0x7f, 0xa0, 0x2b, 0x21 }}

class NS_NO_VTABLE nsIFilePicker : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFILEPICKER_IID)

  enum { modeOpen = 0 };

  enum { modeSave = 1 };

  enum { modeGetFolder = 2 };

  enum { returnOK = 0 };

  enum { returnCancel = 1 };

  enum { returnReplace = 2 };

  enum { filterAll = 1 };

  enum { filterHTML = 2 };

  enum { filterText = 4 };

  enum { filterImages = 8 };

  enum { filterXML = 16 };

  enum { filterXUL = 32 };

  /**
  * Initialize the file widget.
  *
  * @param      parent   nsIDOMWindowInternal parent.  This dialog should be dependent on this parent.
  * @param      title    The title for the file widget
  * @param      mode     load, save, or get folder
  *
  */
  /* void init (in nsIDOMWindowInternal parent, in wstring title, in short mode); */
  NS_IMETHOD Init(nsIDOMWindowInternal *parent, const PRUnichar *title, PRInt16 mode) = 0;

  /**
  * Append to the  filter list with things from the predefined list
  *
  * @param      filters  mask of filters i.e. (filterAll | filterHTML)
  *
  */
  /* void appendFilters (in long filterMask); */
  NS_IMETHOD AppendFilters(PRInt32 filterMask) = 0;

  /**
  * Add a filter
  *
  * @param      title    name of the filter
  * @param      filter   extensions to filter -- semicolon and space separated
  *
  */
  /* void appendFilter (in wstring title, in wstring filter); */
  NS_IMETHOD AppendFilter(const PRUnichar *title, const PRUnichar *filter) = 0;

  /**
  * The filename that should be suggested to the user as a default.
  *
  * @throws NS_ERROR_FAILURE on attempts to get
  */
  /* attribute wstring defaultString; */
  NS_IMETHOD GetDefaultString(PRUnichar * *aDefaultString) = 0;
  NS_IMETHOD SetDefaultString(const PRUnichar * aDefaultString) = 0;

  /**
  * The extension that should be associated with files of the type we
  * want to work with.  On some platforms, this extension will be
  * automatically appended to filenames the user enters, if needed.  
  */
  /* attribute wstring defaultExtension; */
  NS_IMETHOD GetDefaultExtension(PRUnichar * *aDefaultExtension) = 0;
  NS_IMETHOD SetDefaultExtension(const PRUnichar * aDefaultExtension) = 0;

  /**
  * The filter which is currently selected in the File Picker dialog
  *
  * @return Returns the index (0 based) of the selected filter in the filter list. 
  */
  /* attribute long filterIndex; */
  NS_IMETHOD GetFilterIndex(PRInt32 *aFilterIndex) = 0;
  NS_IMETHOD SetFilterIndex(PRInt32 aFilterIndex) = 0;

  /**
  * Set the directory that the file open/save dialog initially displays
  *
  * @param      displayDirectory  the name of the directory
  *
  */
  /* attribute nsILocalFile displayDirectory; */
  NS_IMETHOD GetDisplayDirectory(nsILocalFile * *aDisplayDirectory) = 0;
  NS_IMETHOD SetDisplayDirectory(nsILocalFile * aDisplayDirectory) = 0;

  /**
  * Get the nsILocalFile for the file or directory.
  *
  * @return Returns the file currently selected
  */
  /* readonly attribute nsILocalFile file; */
  NS_IMETHOD GetFile(nsILocalFile * *aFile) = 0;

  /**
  * Get the nsIFileURL for the file or directory.
  *
  * @return Returns the file currently selected
  */
  /* readonly attribute nsIFileURL fileURL; */
  NS_IMETHOD GetFileURL(nsIFileURL * *aFileURL) = 0;

  /**
  * Show File Dialog. The dialog is displayed modally.
  *
  * @return returnOK if the user selects OK, returnCancel if the user selects cancel
  *
  */
  /* short show (); */
  NS_IMETHOD Show(PRInt16 *_retval) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIFILEPICKER \
  NS_IMETHOD Init(nsIDOMWindowInternal *parent, const PRUnichar *title, PRInt16 mode); \
  NS_IMETHOD AppendFilters(PRInt32 filterMask); \
  NS_IMETHOD AppendFilter(const PRUnichar *title, const PRUnichar *filter); \
  NS_IMETHOD GetDefaultString(PRUnichar * *aDefaultString); \
  NS_IMETHOD SetDefaultString(const PRUnichar * aDefaultString); \
  NS_IMETHOD GetDefaultExtension(PRUnichar * *aDefaultExtension); \
  NS_IMETHOD SetDefaultExtension(const PRUnichar * aDefaultExtension); \
  NS_IMETHOD GetFilterIndex(PRInt32 *aFilterIndex); \
  NS_IMETHOD SetFilterIndex(PRInt32 aFilterIndex); \
  NS_IMETHOD GetDisplayDirectory(nsILocalFile * *aDisplayDirectory); \
  NS_IMETHOD SetDisplayDirectory(nsILocalFile * aDisplayDirectory); \
  NS_IMETHOD GetFile(nsILocalFile * *aFile); \
  NS_IMETHOD GetFileURL(nsIFileURL * *aFileURL); \
  NS_IMETHOD Show(PRInt16 *_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIFILEPICKER(_to) \
  NS_IMETHOD Init(nsIDOMWindowInternal *parent, const PRUnichar *title, PRInt16 mode) { return _to Init(parent, title, mode); } \
  NS_IMETHOD AppendFilters(PRInt32 filterMask) { return _to AppendFilters(filterMask); } \
  NS_IMETHOD AppendFilter(const PRUnichar *title, const PRUnichar *filter) { return _to AppendFilter(title, filter); } \
  NS_IMETHOD GetDefaultString(PRUnichar * *aDefaultString) { return _to GetDefaultString(aDefaultString); } \
  NS_IMETHOD SetDefaultString(const PRUnichar * aDefaultString) { return _to SetDefaultString(aDefaultString); } \
  NS_IMETHOD GetDefaultExtension(PRUnichar * *aDefaultExtension) { return _to GetDefaultExtension(aDefaultExtension); } \
  NS_IMETHOD SetDefaultExtension(const PRUnichar * aDefaultExtension) { return _to SetDefaultExtension(aDefaultExtension); } \
  NS_IMETHOD GetFilterIndex(PRInt32 *aFilterIndex) { return _to GetFilterIndex(aFilterIndex); } \
  NS_IMETHOD SetFilterIndex(PRInt32 aFilterIndex) { return _to SetFilterIndex(aFilterIndex); } \
  NS_IMETHOD GetDisplayDirectory(nsILocalFile * *aDisplayDirectory) { return _to GetDisplayDirectory(aDisplayDirectory); } \
  NS_IMETHOD SetDisplayDirectory(nsILocalFile * aDisplayDirectory) { return _to SetDisplayDirectory(aDisplayDirectory); } \
  NS_IMETHOD GetFile(nsILocalFile * *aFile) { return _to GetFile(aFile); } \
  NS_IMETHOD GetFileURL(nsIFileURL * *aFileURL) { return _to GetFileURL(aFileURL); } \
  NS_IMETHOD Show(PRInt16 *_retval) { return _to Show(_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_NSIFILEPICKER(_to) \
  NS_IMETHOD Init(nsIDOMWindowInternal *parent, const PRUnichar *title, PRInt16 mode) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(parent, title, mode); } \
  NS_IMETHOD AppendFilters(PRInt32 filterMask) { return !_to ? NS_ERROR_NULL_POINTER : _to->AppendFilters(filterMask); } \
  NS_IMETHOD AppendFilter(const PRUnichar *title, const PRUnichar *filter) { return !_to ? NS_ERROR_NULL_POINTER : _to->AppendFilter(title, filter); } \
  NS_IMETHOD GetDefaultString(PRUnichar * *aDefaultString) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultString(aDefaultString); } \
  NS_IMETHOD SetDefaultString(const PRUnichar * aDefaultString) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDefaultString(aDefaultString); } \
  NS_IMETHOD GetDefaultExtension(PRUnichar * *aDefaultExtension) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultExtension(aDefaultExtension); } \
  NS_IMETHOD SetDefaultExtension(const PRUnichar * aDefaultExtension) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDefaultExtension(aDefaultExtension); } \
  NS_IMETHOD GetFilterIndex(PRInt32 *aFilterIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFilterIndex(aFilterIndex); } \
  NS_IMETHOD SetFilterIndex(PRInt32 aFilterIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFilterIndex(aFilterIndex); } \
  NS_IMETHOD GetDisplayDirectory(nsILocalFile * *aDisplayDirectory) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisplayDirectory(aDisplayDirectory); } \
  NS_IMETHOD SetDisplayDirectory(nsILocalFile * aDisplayDirectory) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDisplayDirectory(aDisplayDirectory); } \
  NS_IMETHOD GetFile(nsILocalFile * *aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFile(aFile); } \
  NS_IMETHOD GetFileURL(nsIFileURL * *aFileURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFileURL(aFileURL); } \
  NS_IMETHOD Show(PRInt16 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Show(_retval); } 

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

/* Header file */
class nsFilePicker : public nsIFilePicker
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIFILEPICKER

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsFilePicker, nsIFilePicker)

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

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

/* void init (in nsIDOMWindowInternal parent, in wstring title, in short mode); */
NS_IMETHODIMP nsFilePicker::Init(nsIDOMWindowInternal *parent, const PRUnichar *title, PRInt16 mode)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void appendFilters (in long filterMask); */
NS_IMETHODIMP nsFilePicker::AppendFilters(PRInt32 filterMask)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void appendFilter (in wstring title, in wstring filter); */
NS_IMETHODIMP nsFilePicker::AppendFilter(const PRUnichar *title, const PRUnichar *filter)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute wstring defaultString; */
NS_IMETHODIMP nsFilePicker::GetDefaultString(PRUnichar * *aDefaultString)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsFilePicker::SetDefaultString(const PRUnichar * aDefaultString)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute wstring defaultExtension; */
NS_IMETHODIMP nsFilePicker::GetDefaultExtension(PRUnichar * *aDefaultExtension)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsFilePicker::SetDefaultExtension(const PRUnichar * aDefaultExtension)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute long filterIndex; */
NS_IMETHODIMP nsFilePicker::GetFilterIndex(PRInt32 *aFilterIndex)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsFilePicker::SetFilterIndex(PRInt32 aFilterIndex)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute nsILocalFile displayDirectory; */
NS_IMETHODIMP nsFilePicker::GetDisplayDirectory(nsILocalFile * *aDisplayDirectory)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsFilePicker::SetDisplayDirectory(nsILocalFile * aDisplayDirectory)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

/* readonly attribute nsIFileURL fileURL; */
NS_IMETHODIMP nsFilePicker::GetFileURL(nsIFileURL * *aFileURL)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* short show (); */
NS_IMETHODIMP nsFilePicker::Show(PRInt16 *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIFilePicker_h__ */
