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

#ifndef __gen_nsIMsgFilterPlugin_h__
#define __gen_nsIMsgFilterPlugin_h__


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

#ifndef __gen_MailNewsTypes2_h__
#include "MailNewsTypes2.h"
#endif

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

class nsIMsgWindow; /* forward declaration */

class nsIMsgDBHdr; /* forward declaration */

class nsIStreamListener; /* forward declaration */


/* starting interface:    nsIMsgFilterPlugin */
#define NS_IMSGFILTERPLUGIN_IID_STR "e2e56690-a676-11d6-80c9-00008646b737"

#define NS_IMSGFILTERPLUGIN_IID \
  {0xe2e56690, 0xa676, 0x11d6, \
    { 0x80, 0xc9, 0x00, 0x00, 0x86, 0x46, 0xb7, 0x37 }}

/**
 * This interface is still very much under development, and is not yet stable.
 */
class NS_NO_VTABLE nsIMsgFilterPlugin : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMSGFILTERPLUGIN_IID)

  /**
     * Do any necessary cleanup: flush and close any open files, etc.
     */
  /* void shutdown (); */
  NS_IMETHOD Shutdown(void) = 0;

  /**
     * Some protocols (ie IMAP) can, as an optimization, avoid
     * downloading all message header lines.  If your plugin doesn't need
     * any more than the minimal set, it can return false for this attribute.
     */
  /* readonly attribute boolean shouldDownloadAllHeaders; */
  NS_IMETHOD GetShouldDownloadAllHeaders(PRBool *aShouldDownloadAllHeaders) = 0;

  /**
     * When a large number of messages are going to be trained or filtered,
     * it's typically not worth it to write everything to disk after
     * each message.  The calling code will set batchUpdate to true before
     * starting a set messages, and then to false once it has finished.
     */
  /* attribute boolean batchUpdate; */
  NS_IMETHOD GetBatchUpdate(PRBool *aBatchUpdate) = 0;
  NS_IMETHOD SetBatchUpdate(PRBool aBatchUpdate) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGFILTERPLUGIN \
  NS_IMETHOD Shutdown(void); \
  NS_IMETHOD GetShouldDownloadAllHeaders(PRBool *aShouldDownloadAllHeaders); \
  NS_IMETHOD GetBatchUpdate(PRBool *aBatchUpdate); \
  NS_IMETHOD SetBatchUpdate(PRBool aBatchUpdate); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMSGFILTERPLUGIN(_to) \
  NS_IMETHOD Shutdown(void) { return _to Shutdown(); } \
  NS_IMETHOD GetShouldDownloadAllHeaders(PRBool *aShouldDownloadAllHeaders) { return _to GetShouldDownloadAllHeaders(aShouldDownloadAllHeaders); } \
  NS_IMETHOD GetBatchUpdate(PRBool *aBatchUpdate) { return _to GetBatchUpdate(aBatchUpdate); } \
  NS_IMETHOD SetBatchUpdate(PRBool aBatchUpdate) { return _to SetBatchUpdate(aBatchUpdate); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMSGFILTERPLUGIN(_to) \
  NS_IMETHOD Shutdown(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Shutdown(); } \
  NS_IMETHOD GetShouldDownloadAllHeaders(PRBool *aShouldDownloadAllHeaders) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetShouldDownloadAllHeaders(aShouldDownloadAllHeaders); } \
  NS_IMETHOD GetBatchUpdate(PRBool *aBatchUpdate) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBatchUpdate(aBatchUpdate); } \
  NS_IMETHOD SetBatchUpdate(PRBool aBatchUpdate) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetBatchUpdate(aBatchUpdate); } 

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

/* Header file */
class nsMsgFilterPlugin : public nsIMsgFilterPlugin
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMSGFILTERPLUGIN

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsMsgFilterPlugin, nsIMsgFilterPlugin)

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

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

/* void shutdown (); */
NS_IMETHODIMP nsMsgFilterPlugin::Shutdown()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute boolean shouldDownloadAllHeaders; */
NS_IMETHODIMP nsMsgFilterPlugin::GetShouldDownloadAllHeaders(PRBool *aShouldDownloadAllHeaders)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute boolean batchUpdate; */
NS_IMETHODIMP nsMsgFilterPlugin::GetBatchUpdate(PRBool *aBatchUpdate)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMsgFilterPlugin::SetBatchUpdate(PRBool aBatchUpdate)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIJunkMailClassificationListener */
#define NS_IJUNKMAILCLASSIFICATIONLISTENER_IID_STR "0243f3d6-d583-11d6-898a-00039310a47a"

#define NS_IJUNKMAILCLASSIFICATIONLISTENER_IID \
  {0x0243f3d6, 0xd583, 0x11d6, \
    { 0x89, 0x8a, 0x00, 0x03, 0x93, 0x10, 0xa4, 0x7a }}

/**
 * Rather than passing low level details about scores and such, abstract
 * this away by informing a listener of a message's classification, which
 * can be one of 3 values:  UNCLASSIFIED, GOOD, or JUNK.
 */
class NS_NO_VTABLE nsIJunkMailClassificationListener : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IJUNKMAILCLASSIFICATIONLISTENER_IID)

  /* void onMessageClassified (in string aMsgURL, in nsMsgJunkStatus aClassification); */
  NS_IMETHOD OnMessageClassified(const char *aMsgURL, nsMsgJunkStatus aClassification) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIJUNKMAILCLASSIFICATIONLISTENER \
  NS_IMETHOD OnMessageClassified(const char *aMsgURL, nsMsgJunkStatus aClassification); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIJUNKMAILCLASSIFICATIONLISTENER(_to) \
  NS_IMETHOD OnMessageClassified(const char *aMsgURL, nsMsgJunkStatus aClassification) { return _to OnMessageClassified(aMsgURL, aClassification); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIJUNKMAILCLASSIFICATIONLISTENER(_to) \
  NS_IMETHOD OnMessageClassified(const char *aMsgURL, nsMsgJunkStatus aClassification) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnMessageClassified(aMsgURL, aClassification); } 

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

/* Header file */
class nsJunkMailClassificationListener : public nsIJunkMailClassificationListener
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIJUNKMAILCLASSIFICATIONLISTENER

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsJunkMailClassificationListener, nsIJunkMailClassificationListener)

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

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

/* void onMessageClassified (in string aMsgURL, in nsMsgJunkStatus aClassification); */
NS_IMETHODIMP nsJunkMailClassificationListener::OnMessageClassified(const char *aMsgURL, nsMsgJunkStatus aClassification)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIJunkMailPlugin */
#define NS_IJUNKMAILPLUGIN_IID_STR "caf3d467-d57c-11d6-96a9-00039310a47a"

#define NS_IJUNKMAILPLUGIN_IID \
  {0xcaf3d467, 0xd57c, 0x11d6, \
    { 0x96, 0xa9, 0x00, 0x03, 0x93, 0x10, 0xa4, 0x7a }}

class NS_NO_VTABLE nsIJunkMailPlugin : public nsIMsgFilterPlugin {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IJUNKMAILPLUGIN_IID)

  /**
     * Message classifications.
     */
  enum { UNCLASSIFIED = 0U };

  enum { GOOD = 1U };

  enum { JUNK = 2U };

  /**
     * Given a message URL, determine what its current classification is
     * according to the current training set.
     */
  /* void classifyMessage (in string aMsgURI, in nsIJunkMailClassificationListener aListener); */
  NS_IMETHOD ClassifyMessage(const char *aMsgURI, nsIJunkMailClassificationListener *aListener) = 0;

  /* void classifyMessages (in unsigned long aCount, [array, size_is (aCount)] in string aMsgURIs, in nsIJunkMailClassificationListener aListener); */
  NS_IMETHOD ClassifyMessages(PRUint32 aCount, const char **aMsgURIs, nsIJunkMailClassificationListener *aListener) = 0;

  /**
     * Called when a user forces the classification of a message. Should
     * cause the training set to be updated appropriately.
     */
  /* void setMessageClassification (in string aMsgURI, in nsMsgJunkStatus aOldClassification, in nsMsgJunkStatus aNewClassification, in nsIJunkMailClassificationListener aListener); */
  NS_IMETHOD SetMessageClassification(const char *aMsgURI, nsMsgJunkStatus aOldClassification, nsMsgJunkStatus aNewClassification, nsIJunkMailClassificationListener *aListener) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIJUNKMAILPLUGIN \
  NS_IMETHOD ClassifyMessage(const char *aMsgURI, nsIJunkMailClassificationListener *aListener); \
  NS_IMETHOD ClassifyMessages(PRUint32 aCount, const char **aMsgURIs, nsIJunkMailClassificationListener *aListener); \
  NS_IMETHOD SetMessageClassification(const char *aMsgURI, nsMsgJunkStatus aOldClassification, nsMsgJunkStatus aNewClassification, nsIJunkMailClassificationListener *aListener); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIJUNKMAILPLUGIN(_to) \
  NS_IMETHOD ClassifyMessage(const char *aMsgURI, nsIJunkMailClassificationListener *aListener) { return _to ClassifyMessage(aMsgURI, aListener); } \
  NS_IMETHOD ClassifyMessages(PRUint32 aCount, const char **aMsgURIs, nsIJunkMailClassificationListener *aListener) { return _to ClassifyMessages(aCount, aMsgURIs, aListener); } \
  NS_IMETHOD SetMessageClassification(const char *aMsgURI, nsMsgJunkStatus aOldClassification, nsMsgJunkStatus aNewClassification, nsIJunkMailClassificationListener *aListener) { return _to SetMessageClassification(aMsgURI, aOldClassification, aNewClassification, aListener); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIJUNKMAILPLUGIN(_to) \
  NS_IMETHOD ClassifyMessage(const char *aMsgURI, nsIJunkMailClassificationListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->ClassifyMessage(aMsgURI, aListener); } \
  NS_IMETHOD ClassifyMessages(PRUint32 aCount, const char **aMsgURIs, nsIJunkMailClassificationListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->ClassifyMessages(aCount, aMsgURIs, aListener); } \
  NS_IMETHOD SetMessageClassification(const char *aMsgURI, nsMsgJunkStatus aOldClassification, nsMsgJunkStatus aNewClassification, nsIJunkMailClassificationListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMessageClassification(aMsgURI, aOldClassification, aNewClassification, aListener); } 

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

/* Header file */
class nsJunkMailPlugin : public nsIJunkMailPlugin
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIJUNKMAILPLUGIN

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsJunkMailPlugin, nsIJunkMailPlugin)

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

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

/* void classifyMessage (in string aMsgURI, in nsIJunkMailClassificationListener aListener); */
NS_IMETHODIMP nsJunkMailPlugin::ClassifyMessage(const char *aMsgURI, nsIJunkMailClassificationListener *aListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void classifyMessages (in unsigned long aCount, [array, size_is (aCount)] in string aMsgURIs, in nsIJunkMailClassificationListener aListener); */
NS_IMETHODIMP nsJunkMailPlugin::ClassifyMessages(PRUint32 aCount, const char **aMsgURIs, nsIJunkMailClassificationListener *aListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setMessageClassification (in string aMsgURI, in nsMsgJunkStatus aOldClassification, in nsMsgJunkStatus aNewClassification, in nsIJunkMailClassificationListener aListener); */
NS_IMETHODIMP nsJunkMailPlugin::SetMessageClassification(const char *aMsgURI, nsMsgJunkStatus aOldClassification, nsMsgJunkStatus aNewClassification, nsIJunkMailClassificationListener *aListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIMsgFilterPlugin_h__ */
