/*
 * 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 call startBatch() before
     * starting a set messages, and then endBatch() once it has finished.
     */
  /* void startBatch (); */
  NS_IMETHOD StartBatch(void) = 0;

  /* void endBatch (); */
  NS_IMETHOD EndBatch(void) = 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 StartBatch(void); \
  NS_IMETHOD EndBatch(void); 

/* 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 StartBatch(void) { return _to StartBatch(); } \
  NS_IMETHOD EndBatch(void) { return _to EndBatch(); } 

/* 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 StartBatch(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->StartBatch(); } \
  NS_IMETHOD EndBatch(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->EndBatch(); } 

#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();

private:
  ~nsMsgFilterPlugin();

protected:
  /* additional members */
};

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

nsMsgFilterPlugin::nsMsgFilterPlugin()
{
  /* 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;
}

/* void startBatch (); */
NS_IMETHODIMP nsMsgFilterPlugin::StartBatch()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void endBatch (); */
NS_IMETHODIMP nsMsgFilterPlugin::EndBatch()
{
    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 aMsgURI, in nsMsgJunkStatus aClassification); */
  NS_IMETHOD OnMessageClassified(const char *aMsgURI, nsMsgJunkStatus aClassification) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIJUNKMAILCLASSIFICATIONLISTENER \
  NS_IMETHOD OnMessageClassified(const char *aMsgURI, 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 *aMsgURI, nsMsgJunkStatus aClassification) { return _to OnMessageClassified(aMsgURI, 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 *aMsgURI, nsMsgJunkStatus aClassification) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnMessageClassified(aMsgURI, 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();

private:
  ~nsJunkMailClassificationListener();

protected:
  /* additional members */
};

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

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

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

/* void onMessageClassified (in string aMsgURI, in nsMsgJunkStatus aClassification); */
NS_IMETHODIMP nsJunkMailClassificationListener::OnMessageClassified(const char *aMsgURI, 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 URI, determine what its current classification is
     * according to the current training set.
     */
  /* void classifyMessage (in string aMsgURI, in nsIMsgWindow aMsgWindow, in nsIJunkMailClassificationListener aListener); */
  NS_IMETHOD ClassifyMessage(const char *aMsgURI, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener) = 0;

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

  /**
     * Called when a user forces the classification of a message. Should
     * cause the training set to be updated appropriately.
     *
     * @arg aMsgURI                     URI of the message to be classified
     * @arg aOldUserClassification      Was it previous manually classified 
     *                                  by the user?  If so, how?
     * @arg aNewClassification          New manual classification.
     * @arg aListener                   Callback
     */
  /* void setMessageClassification (in string aMsgURI, in nsMsgJunkStatus aOldUserClassification, in nsMsgJunkStatus aNewClassification, in nsIMsgWindow aMsgWindow, in nsIJunkMailClassificationListener aListener); */
  NS_IMETHOD SetMessageClassification(const char *aMsgURI, nsMsgJunkStatus aOldUserClassification, nsMsgJunkStatus aNewClassification, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener) = 0;

  /* readonly attribute boolean userHasClassified; */
  NS_IMETHOD GetUserHasClassified(PRBool *aUserHasClassified) = 0;

  /** Removes the training file and clears out any in memory training tokens. 
        User must retrain after doing this.
    **/
  /* void resetTrainingData (); */
  NS_IMETHOD ResetTrainingData(void) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIJUNKMAILPLUGIN \
  NS_IMETHOD ClassifyMessage(const char *aMsgURI, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener); \
  NS_IMETHOD ClassifyMessages(PRUint32 aCount, const char **aMsgURIs, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener); \
  NS_IMETHOD SetMessageClassification(const char *aMsgURI, nsMsgJunkStatus aOldUserClassification, nsMsgJunkStatus aNewClassification, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener); \
  NS_IMETHOD GetUserHasClassified(PRBool *aUserHasClassified); \
  NS_IMETHOD ResetTrainingData(void); 

/* 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, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener) { return _to ClassifyMessage(aMsgURI, aMsgWindow, aListener); } \
  NS_IMETHOD ClassifyMessages(PRUint32 aCount, const char **aMsgURIs, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener) { return _to ClassifyMessages(aCount, aMsgURIs, aMsgWindow, aListener); } \
  NS_IMETHOD SetMessageClassification(const char *aMsgURI, nsMsgJunkStatus aOldUserClassification, nsMsgJunkStatus aNewClassification, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener) { return _to SetMessageClassification(aMsgURI, aOldUserClassification, aNewClassification, aMsgWindow, aListener); } \
  NS_IMETHOD GetUserHasClassified(PRBool *aUserHasClassified) { return _to GetUserHasClassified(aUserHasClassified); } \
  NS_IMETHOD ResetTrainingData(void) { return _to ResetTrainingData(); } 

/* 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, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->ClassifyMessage(aMsgURI, aMsgWindow, aListener); } \
  NS_IMETHOD ClassifyMessages(PRUint32 aCount, const char **aMsgURIs, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->ClassifyMessages(aCount, aMsgURIs, aMsgWindow, aListener); } \
  NS_IMETHOD SetMessageClassification(const char *aMsgURI, nsMsgJunkStatus aOldUserClassification, nsMsgJunkStatus aNewClassification, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMessageClassification(aMsgURI, aOldUserClassification, aNewClassification, aMsgWindow, aListener); } \
  NS_IMETHOD GetUserHasClassified(PRBool *aUserHasClassified) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUserHasClassified(aUserHasClassified); } \
  NS_IMETHOD ResetTrainingData(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ResetTrainingData(); } 

#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();

private:
  ~nsJunkMailPlugin();

protected:
  /* additional members */
};

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

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

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

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

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

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

/* readonly attribute boolean userHasClassified; */
NS_IMETHODIMP nsJunkMailPlugin::GetUserHasClassified(PRBool *aUserHasClassified)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void resetTrainingData (); */
NS_IMETHODIMP nsJunkMailPlugin::ResetTrainingData()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIMsgFilterPlugin_h__ */
