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

#ifndef __gen_nsIMIMEDataSource_h__
#define __gen_nsIMIMEDataSource_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

#ifndef __gen_nsIMIMEInfo_h__
#include "nsIMIMEInfo.h"
#endif

#ifndef __gen_nsIEnumerator_h__
#include "nsIEnumerator.h"
#endif

#ifndef __gen_nsIFile_h__
#include "nsIFile.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
#define NS_XMLMIMEDATASOURCE_CID                           \
{ /* {41654483-fa5b-11d3-a12b-a7aef7a2f2fc} */         \
    0x41654483,                                      \
    0xfa5b,                                          \
    0x11d3,                                          \
    { 0xa1, 0x2b, 0xa7, 0xae, 0xf7, 0xa2, 0xf2, 0xfc } \
}
#define NS_XMLMIMEDATASOURCE_CONTRACTID \
"@mozilla.org/mime-xml-data-source;1"
#define NS_NATIVEMIMEDATASOURCE_CONTRACTID \
"@mozilla.org/mime-native-data-source;1"

/* starting interface:    nsIMIMEDataSource */
#define NS_IMIMEDATASOURCE_IID_STR "41654481-fa5b-11d3-a12b-a7aef7a2f2fc"

#define NS_IMIMEDATASOURCE_IID \
  {0x41654481, 0xfa5b, 0x11d3, \
    { 0xa1, 0x2b, 0xa7, 0xae, 0xf7, 0xa2, 0xf2, 0xfc }}

class NS_NO_VTABLE nsIMIMEDataSource : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMIMEDATASOURCE_IID)

  /* nsIMIMEInfo GetFromMIMEType (in string aType); */
  NS_IMETHOD GetFromMIMEType(const char *aType, nsIMIMEInfo **_retval) = 0;

  /* nsIMIMEInfo GetFromExtension (in string aFileExt); */
  NS_IMETHOD GetFromExtension(const char *aFileExt, nsIMIMEInfo **_retval) = 0;

  /* nsIMIMEInfo GetFromTypeCreator (in PRUint32 aType, in PRUint32 aCreator, in string aFileExt); */
  NS_IMETHOD GetFromTypeCreator(PRUint32 aType, PRUint32 aCreator, const char *aFileExt, nsIMIMEInfo **_retval) = 0;

  /* void Add (in nsIMIMEInfo aInfo); */
  NS_IMETHOD Add(nsIMIMEInfo *aInfo) = 0;

  /* void Remove (in string aType); */
  NS_IMETHOD Remove(const char *aType) = 0;

  /* nsISimpleEnumerator GetEnumerator (); */
  NS_IMETHOD GetEnumerator(nsISimpleEnumerator **_retval) = 0;

  /* void Serialize (); */
  NS_IMETHOD Serialize(void) = 0;

  /* void InitFromFile (in nsIFile aFile); */
  NS_IMETHOD InitFromFile(nsIFile *aFile) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMIMEDATASOURCE \
  NS_IMETHOD GetFromMIMEType(const char *aType, nsIMIMEInfo **_retval); \
  NS_IMETHOD GetFromExtension(const char *aFileExt, nsIMIMEInfo **_retval); \
  NS_IMETHOD GetFromTypeCreator(PRUint32 aType, PRUint32 aCreator, const char *aFileExt, nsIMIMEInfo **_retval); \
  NS_IMETHOD Add(nsIMIMEInfo *aInfo); \
  NS_IMETHOD Remove(const char *aType); \
  NS_IMETHOD GetEnumerator(nsISimpleEnumerator **_retval); \
  NS_IMETHOD Serialize(void); \
  NS_IMETHOD InitFromFile(nsIFile *aFile); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMIMEDATASOURCE(_to) \
  NS_IMETHOD GetFromMIMEType(const char *aType, nsIMIMEInfo **_retval) { return _to ## GetFromMIMEType(aType, _retval); } \
  NS_IMETHOD GetFromExtension(const char *aFileExt, nsIMIMEInfo **_retval) { return _to ## GetFromExtension(aFileExt, _retval); } \
  NS_IMETHOD GetFromTypeCreator(PRUint32 aType, PRUint32 aCreator, const char *aFileExt, nsIMIMEInfo **_retval) { return _to ## GetFromTypeCreator(aType, aCreator, aFileExt, _retval); } \
  NS_IMETHOD Add(nsIMIMEInfo *aInfo) { return _to ## Add(aInfo); } \
  NS_IMETHOD Remove(const char *aType) { return _to ## Remove(aType); } \
  NS_IMETHOD GetEnumerator(nsISimpleEnumerator **_retval) { return _to ## GetEnumerator(_retval); } \
  NS_IMETHOD Serialize(void) { return _to ## Serialize(); } \
  NS_IMETHOD InitFromFile(nsIFile *aFile) { return _to ## InitFromFile(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_NSIMIMEDATASOURCE(_to) \
  NS_IMETHOD GetFromMIMEType(const char *aType, nsIMIMEInfo **_retval) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##-> GetFromMIMEType(aType, _retval); } \
  NS_IMETHOD GetFromExtension(const char *aFileExt, nsIMIMEInfo **_retval) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##-> GetFromExtension(aFileExt, _retval); } \
  NS_IMETHOD GetFromTypeCreator(PRUint32 aType, PRUint32 aCreator, const char *aFileExt, nsIMIMEInfo **_retval) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##-> GetFromTypeCreator(aType, aCreator, aFileExt, _retval); } \
  NS_IMETHOD Add(nsIMIMEInfo *aInfo) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##-> Add(aInfo); } \
  NS_IMETHOD Remove(const char *aType) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##-> Remove(aType); } \
  NS_IMETHOD GetEnumerator(nsISimpleEnumerator **_retval) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##-> GetEnumerator(_retval); } \
  NS_IMETHOD Serialize(void) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##-> Serialize(); } \
  NS_IMETHOD InitFromFile(nsIFile *aFile) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##-> InitFromFile(aFile); } 

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

/* Header file */
class nsMIMEDataSource : public nsIMIMEDataSource
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMIMEDATASOURCE

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsMIMEDataSource, nsIMIMEDataSource)

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

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

/* nsIMIMEInfo GetFromMIMEType (in string aType); */
NS_IMETHODIMP nsMIMEDataSource::GetFromMIMEType(const char *aType, nsIMIMEInfo **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMIMEInfo GetFromExtension (in string aFileExt); */
NS_IMETHODIMP nsMIMEDataSource::GetFromExtension(const char *aFileExt, nsIMIMEInfo **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMIMEInfo GetFromTypeCreator (in PRUint32 aType, in PRUint32 aCreator, in string aFileExt); */
NS_IMETHODIMP nsMIMEDataSource::GetFromTypeCreator(PRUint32 aType, PRUint32 aCreator, const char *aFileExt, nsIMIMEInfo **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void Add (in nsIMIMEInfo aInfo); */
NS_IMETHODIMP nsMIMEDataSource::Add(nsIMIMEInfo *aInfo)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void Remove (in string aType); */
NS_IMETHODIMP nsMIMEDataSource::Remove(const char *aType)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsISimpleEnumerator GetEnumerator (); */
NS_IMETHODIMP nsMIMEDataSource::GetEnumerator(nsISimpleEnumerator **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void Serialize (); */
NS_IMETHODIMP nsMIMEDataSource::Serialize()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void InitFromFile (in nsIFile aFile); */
NS_IMETHODIMP nsMIMEDataSource::InitFromFile(nsIFile *aFile)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIMIMEDataSource_h__ */
