/*
 * 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 */

class nsILocalFile; /* 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 NS_SCRIPTABLE nsIMsgFilterPlugin : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMSGFILTERPLUGIN_IID)

  /**
     * Do any necessary cleanup: flush and close any open files, etc.
     */
  /* void shutdown (); */
  NS_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD GetShouldDownloadAllHeaders(PRBool *aShouldDownloadAllHeaders) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIMsgFilterPlugin, NS_IMSGFILTERPLUGIN_IID)

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

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

/* 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_SCRIPTABLE NS_IMETHOD Shutdown(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Shutdown(); } \
  NS_SCRIPTABLE NS_IMETHOD GetShouldDownloadAllHeaders(PRBool *aShouldDownloadAllHeaders) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetShouldDownloadAllHeaders(aShouldDownloadAllHeaders); } 

#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;
}

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


/* starting interface:    nsIJunkMailClassificationListener */
#define NS_IJUNKMAILCLASSIFICATIONLISTENER_IID_STR "b15a0f9c-df07-4af0-9ba8-80dca68ac35d"

#define NS_IJUNKMAILCLASSIFICATIONLISTENER_IID \
  {0xb15a0f9c, 0xdf07, 0x4af0, \
    { 0x9b, 0xa8, 0x80, 0xdc, 0xa6, 0x8a, 0xc3, 0x5d }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIJunkMailClassificationListener : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IJUNKMAILCLASSIFICATIONLISTENER_IID)

  /**
   * Inform a listener of a message's classification as junk. At the end
   * of a batch of classifications, signify end of batch by calling with
   * null aMsgURI (other parameters are don't care)
   *
   * @param aMsgURI          URI of the message that was classified.
   * @param aClassification  classification of message as UNCLASSIFIED, GOOD,
   *                         or JUNK.
   * @param aJunkPercent     indicator of degree of uncertainty, with 100 being
   *                         probably junk, and 0 probably good
   */
  /* void onMessageClassified (in string aMsgURI, in nsMsgJunkStatus aClassification, in PRUint32 aJunkPercent); */
  NS_SCRIPTABLE NS_IMETHOD OnMessageClassified(const char *aMsgURI, nsMsgJunkStatus aClassification, PRUint32 aJunkPercent) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIJunkMailClassificationListener, NS_IJUNKMAILCLASSIFICATIONLISTENER_IID)

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

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

/* 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_SCRIPTABLE NS_IMETHOD OnMessageClassified(const char *aMsgURI, nsMsgJunkStatus aClassification, PRUint32 aJunkPercent) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnMessageClassified(aMsgURI, aClassification, aJunkPercent); } 

#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, in PRUint32 aJunkPercent); */
NS_IMETHODIMP nsJunkMailClassificationListener::OnMessageClassified(const char *aMsgURI, nsMsgJunkStatus aClassification, PRUint32 aJunkPercent)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIMsgTraitClassificationListener */
#define NS_IMSGTRAITCLASSIFICATIONLISTENER_IID_STR "af247d07-72f0-482d-9eab-5a786407aa4c"

#define NS_IMSGTRAITCLASSIFICATIONLISTENER_IID \
  {0xaf247d07, 0x72f0, 0x482d, \
    { 0x9e, 0xab, 0x5a, 0x78, 0x64, 0x07, 0xaa, 0x4c }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIMsgTraitClassificationListener : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMSGTRAITCLASSIFICATIONLISTENER_IID)

  /**
   * Inform a listener of a message's match to traits. The list
   * of traits being matched is in aTraits. Corresponding
   * indicator of match (percent) is in aPercents. At the end
   * of a batch of classifications, signify end of batch by calling with
   * null aMsgURI (other parameters are don't care)
   *
   * @param aMsgURI      URI of the message that was classified
   * @param aTraitCount  length of aTraits and aPercents arrays
   * @param aTraits      array of matched trait ids
   * @param aPercents    array of percent match (0 is unmatched, 100 is fully
   *                     matched) of the trait with the corresponding array
   *                     index in aTraits
   */
  /* void onMessageTraitsClassified (in string aMsgURI, in unsigned long aTraitCount, [array, size_is (aTraitCount)] in unsigned long aTraits, [array, size_is (aTraitCount)] in unsigned long aPercents); */
  NS_SCRIPTABLE NS_IMETHOD OnMessageTraitsClassified(const char *aMsgURI, PRUint32 aTraitCount, PRUint32 *aTraits, PRUint32 *aPercents) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIMsgTraitClassificationListener, NS_IMSGTRAITCLASSIFICATIONLISTENER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGTRAITCLASSIFICATIONLISTENER \
  NS_SCRIPTABLE NS_IMETHOD OnMessageTraitsClassified(const char *aMsgURI, PRUint32 aTraitCount, PRUint32 *aTraits, PRUint32 *aPercents); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMSGTRAITCLASSIFICATIONLISTENER(_to) \
  NS_SCRIPTABLE NS_IMETHOD OnMessageTraitsClassified(const char *aMsgURI, PRUint32 aTraitCount, PRUint32 *aTraits, PRUint32 *aPercents) { return _to OnMessageTraitsClassified(aMsgURI, aTraitCount, aTraits, aPercents); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMSGTRAITCLASSIFICATIONLISTENER(_to) \
  NS_SCRIPTABLE NS_IMETHOD OnMessageTraitsClassified(const char *aMsgURI, PRUint32 aTraitCount, PRUint32 *aTraits, PRUint32 *aPercents) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnMessageTraitsClassified(aMsgURI, aTraitCount, aTraits, aPercents); } 

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

/* Header file */
class nsMsgTraitClassificationListener : public nsIMsgTraitClassificationListener
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMSGTRAITCLASSIFICATIONLISTENER

  nsMsgTraitClassificationListener();

private:
  ~nsMsgTraitClassificationListener();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsMsgTraitClassificationListener, nsIMsgTraitClassificationListener)

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

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

/* void onMessageTraitsClassified (in string aMsgURI, in unsigned long aTraitCount, [array, size_is (aTraitCount)] in unsigned long aTraits, [array, size_is (aTraitCount)] in unsigned long aPercents); */
NS_IMETHODIMP nsMsgTraitClassificationListener::OnMessageTraitsClassified(const char *aMsgURI, PRUint32 aTraitCount, PRUint32 *aTraits, PRUint32 *aPercents)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIMsgTraitDetailListener */
#define NS_IMSGTRAITDETAILLISTENER_IID_STR "12667532-88d1-44a7-ad48-f73719be5c92"

#define NS_IMSGTRAITDETAILLISTENER_IID \
  {0x12667532, 0x88d1, 0x44a7, \
    { 0xad, 0x48, 0xf7, 0x37, 0x19, 0xbe, 0x5c, 0x92 }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIMsgTraitDetailListener : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMSGTRAITDETAILLISTENER_IID)

  /**
   * Inform a listener of details of a message's match to traits.
   * This returns the tokens that were used in the calculation,
   * the calculated percent probability that each token matches the trait,
   * and a running estimate (starting with the strongest tokens) of the
   * combined total probability that a message matches the trait, when
   * only tokens stronger than the current token are used.
   *
   * @param aMsgURI         URI of the message that was classified
   * @param aProTrait       trait id of pro trait for the calculation
   * @param tokenCount      length of arrays that follow
   * @param tokenStrings    the string for a particular token
   * @param tokenPercents   calculated probability that a message with that token
   *                        matches the trait
   * @param runningPercents calculated probability that the message matches the
   *                        trait, accounting for this token and all stronger tokens.
   */
  /* void onMessageTraitDetails (in string aMsgUri, in unsigned long aProTrait, in unsigned long tokenCount, [array, size_is (tokenCount)] in wstring tokenStrings, [array, size_is (tokenCount)] in unsigned long tokenPercents, [array, size_is (tokenCount)] in unsigned long runningPercents); */
  NS_SCRIPTABLE NS_IMETHOD OnMessageTraitDetails(const char *aMsgUri, PRUint32 aProTrait, PRUint32 tokenCount, const PRUnichar **tokenStrings, PRUint32 *tokenPercents, PRUint32 *runningPercents) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIMsgTraitDetailListener, NS_IMSGTRAITDETAILLISTENER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGTRAITDETAILLISTENER \
  NS_SCRIPTABLE NS_IMETHOD OnMessageTraitDetails(const char *aMsgUri, PRUint32 aProTrait, PRUint32 tokenCount, const PRUnichar **tokenStrings, PRUint32 *tokenPercents, PRUint32 *runningPercents); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMSGTRAITDETAILLISTENER(_to) \
  NS_SCRIPTABLE NS_IMETHOD OnMessageTraitDetails(const char *aMsgUri, PRUint32 aProTrait, PRUint32 tokenCount, const PRUnichar **tokenStrings, PRUint32 *tokenPercents, PRUint32 *runningPercents) { return _to OnMessageTraitDetails(aMsgUri, aProTrait, tokenCount, tokenStrings, tokenPercents, runningPercents); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMSGTRAITDETAILLISTENER(_to) \
  NS_SCRIPTABLE NS_IMETHOD OnMessageTraitDetails(const char *aMsgUri, PRUint32 aProTrait, PRUint32 tokenCount, const PRUnichar **tokenStrings, PRUint32 *tokenPercents, PRUint32 *runningPercents) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnMessageTraitDetails(aMsgUri, aProTrait, tokenCount, tokenStrings, tokenPercents, runningPercents); } 

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

/* Header file */
class nsMsgTraitDetailListener : public nsIMsgTraitDetailListener
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMSGTRAITDETAILLISTENER

  nsMsgTraitDetailListener();

private:
  ~nsMsgTraitDetailListener();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsMsgTraitDetailListener, nsIMsgTraitDetailListener)

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

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

/* void onMessageTraitDetails (in string aMsgUri, in unsigned long aProTrait, in unsigned long tokenCount, [array, size_is (tokenCount)] in wstring tokenStrings, [array, size_is (tokenCount)] in unsigned long tokenPercents, [array, size_is (tokenCount)] in unsigned long runningPercents); */
NS_IMETHODIMP nsMsgTraitDetailListener::OnMessageTraitDetails(const char *aMsgUri, PRUint32 aProTrait, PRUint32 tokenCount, const PRUnichar **tokenStrings, PRUint32 *tokenPercents, PRUint32 *runningPercents)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIJunkMailPlugin */
#define NS_IJUNKMAILPLUGIN_IID_STR "8ea5bbca-f735-4d43-8541-d203d8e2ff2f"

#define NS_IJUNKMAILPLUGIN_IID \
  {0x8ea5bbca, 0xf735, 0x4d43, \
    { 0x85, 0x41, 0xd2, 0x03, 0xd8, 0xe2, 0xff, 0x2f }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIJunkMailPlugin : public nsIMsgFilterPlugin {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IJUNKMAILPLUGIN_IID)

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

  enum { GOOD = 1U };

  enum { JUNK = 2U };

  /**
     * Message junk score constants. Junkscore can only be one of these two
     * values (or not set).
     */
  enum { IS_SPAM_SCORE = 100U };

  enum { IS_HAM_SCORE = 0U };

  /**
     * Trait ids for junk analysis. These values are fixed to ensure
     * backwards compatibility with existing junk-oriented classification
     * code.
     */
  enum { GOOD_TRAIT = 1U };

  enum { JUNK_TRAIT = 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_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD ClassifyMessages(PRUint32 aCount, const char **aMsgURIs, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener) = 0;

  /**
     * Given a message URI, evaluate its relative match to a list of
     * traits according to the current training set.
     *
     * @param aMsgURI          URI of the message to be evaluated
     * @param aTraitCount      length of aProTraits, aAntiTraits arrays
     * @param aProTraits       array of trait ids for trained messages that
     *                         match the tested trait (for example,
     *                         JUNK_TRAIT if testing for junk)
     * @param aAntiTraits      array of trait ids for trained messages that
     *                         do not match the tested trait (for example,
     *                         GOOD_TRAIT if testing for junk)
     * @param aTraitListener   trait-oriented callback listener (may be null)
     * @param aMsgWindow       current message window (may be null)
     * @param aJunkListener    junk-oriented callback listener (may be null)
     */
  /* void classifyTraitsInMessage (in string aMsgURI, in unsigned long aTraitCount, [array, size_is (aTraitCount)] in unsigned long aProTraits, [array, size_is (aTraitCount)] in unsigned long aAntiTraits, in nsIMsgTraitClassificationListener aTraitListener, [optional] in nsIMsgWindow aMsgWindow, [optional] in nsIJunkMailClassificationListener aJunkListener); */
  NS_SCRIPTABLE NS_IMETHOD ClassifyTraitsInMessage(const char *aMsgURI, PRUint32 aTraitCount, PRUint32 *aProTraits, PRUint32 *aAntiTraits, nsIMsgTraitClassificationListener *aTraitListener, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aJunkListener) = 0;

  /**
     * Given an array of message URIs, evaluate their relative match to a
     * list of traits according to the current training set.
     *
     * @param aCount           Number of messages to evaluate
     * @param aMsgURIs         array of URIs of the messages to be evaluated
     * @param aTraitCount      length of aProTraits, aAntiTraits arrays
     * @param aProTraits       array of trait ids for trained messages that
     *                         match the tested trait (for example,
     *                         JUNK_TRAIT if testing for junk)
     * @param aAntiTraits      array of trait ids for trained messages that
     *                         do not match the tested trait (for example,
     *                         GOOD_TRAIT if testing for junk)
     * @param aTraitListener   trait-oriented callback listener (may be null)
     * @param aMsgWindow       current message window (may be null)
     * @param aJunkListener    junk-oriented callback listener (may be null)
     */
  /* void classifyTraitsInMessages (in unsigned long aCount, [array, size_is (aCount)] in string aMsgURIs, in unsigned long aTraitCount, [array, size_is (aTraitCount)] in unsigned long aProTraits, [array, size_is (aTraitCount)] in unsigned long aAntiTraits, in nsIMsgTraitClassificationListener aTraitListener, [optional] in nsIMsgWindow aMsgWindow, [optional] in nsIJunkMailClassificationListener aJunkListener); */
  NS_SCRIPTABLE NS_IMETHOD ClassifyTraitsInMessages(PRUint32 aCount, const char **aMsgURIs, PRUint32 aTraitCount, PRUint32 *aProTraits, PRUint32 *aAntiTraits, nsIMsgTraitClassificationListener *aTraitListener, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aJunkListener) = 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 (may be null)
     */
  /* void setMessageClassification (in string aMsgURI, in nsMsgJunkStatus aOldUserClassification, in nsMsgJunkStatus aNewClassification, in nsIMsgWindow aMsgWindow, in nsIJunkMailClassificationListener aListener); */
  NS_SCRIPTABLE NS_IMETHOD SetMessageClassification(const char *aMsgURI, nsMsgJunkStatus aOldUserClassification, nsMsgJunkStatus aNewClassification, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener) = 0;

  /**
     * Called when a user forces a change in the classification of a message.
     * Should cause the training set to be updated appropriately.
     *
     * @param aMsgURI           URI of the message to be classified
     * @param aOldCount         length of aOldTraits array
     * @param aOldTraits        array of trait IDs of the old
     *                          message classification(s), if any
     * @param aNewCount         length of aNewTraits array
     * @param aNewTraits        array of trait IDs of the new
     *                          message classification(s), if any
     * @param aTraitListener    trait-oriented listener (may be null)
     * @param aMsgWindow        current message window (may be null)
     * @param aJunkListener     junk-oriented listener (may be null)
     */
  /* void setMsgTraitClassification (in string aMsgURI, in unsigned long aOldCount, [array, size_is (aOldCount)] in unsigned long aOldTraits, in unsigned long aNewCount, [array, size_is (aNewCount)] in unsigned long aNewTraits, [optional] in nsIMsgTraitClassificationListener aTraitListener, [optional] in nsIMsgWindow aMsgWindow, [optional] in nsIJunkMailClassificationListener aJunkListener); */
  NS_SCRIPTABLE NS_IMETHOD SetMsgTraitClassification(const char *aMsgURI, PRUint32 aOldCount, PRUint32 *aOldTraits, PRUint32 aNewCount, PRUint32 *aNewTraits, nsIMsgTraitClassificationListener *aTraitListener, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aJunkListener) = 0;

  /* readonly attribute boolean userHasClassified; */
  NS_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD ResetTrainingData(void) = 0;

  /**
     * Given a message URI, return a list of tokens and their contribution to
     * the analysis of a message's match to a trait according to the
     * current training set.
     *
     * @param aMsgURI          URI of the message to be evaluated
     * @param aProTrait        trait id for trained messages that match the
     *                         tested trait (for example, JUNK_TRAIT if testing
     *                         for junk)
     * @param aAntiTrait       trait id for trained messages that do not match
     *                         the tested trait (for example, GOOD_TRAIT
     *                         if testing for junk)
     * @param aListener        callback listener for results
     * @param aMsgWindow       current message window (may be null)
     */
  /* void detailMessage (in string aMsgURI, in unsigned long aProTrait, in unsigned long aAntiTrait, in nsIMsgTraitDetailListener aListener, [optional] in nsIMsgWindow aMsgWindow); */
  NS_SCRIPTABLE NS_IMETHOD DetailMessage(const char *aMsgURI, PRUint32 aProTrait, PRUint32 aAntiTrait, nsIMsgTraitDetailListener *aListener, nsIMsgWindow *aMsgWindow) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIJunkMailPlugin, NS_IJUNKMAILPLUGIN_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIJUNKMAILPLUGIN \
  NS_SCRIPTABLE NS_IMETHOD ClassifyMessage(const char *aMsgURI, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener); \
  NS_SCRIPTABLE NS_IMETHOD ClassifyMessages(PRUint32 aCount, const char **aMsgURIs, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener); \
  NS_SCRIPTABLE NS_IMETHOD ClassifyTraitsInMessage(const char *aMsgURI, PRUint32 aTraitCount, PRUint32 *aProTraits, PRUint32 *aAntiTraits, nsIMsgTraitClassificationListener *aTraitListener, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aJunkListener); \
  NS_SCRIPTABLE NS_IMETHOD ClassifyTraitsInMessages(PRUint32 aCount, const char **aMsgURIs, PRUint32 aTraitCount, PRUint32 *aProTraits, PRUint32 *aAntiTraits, nsIMsgTraitClassificationListener *aTraitListener, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aJunkListener); \
  NS_SCRIPTABLE NS_IMETHOD SetMessageClassification(const char *aMsgURI, nsMsgJunkStatus aOldUserClassification, nsMsgJunkStatus aNewClassification, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener); \
  NS_SCRIPTABLE NS_IMETHOD SetMsgTraitClassification(const char *aMsgURI, PRUint32 aOldCount, PRUint32 *aOldTraits, PRUint32 aNewCount, PRUint32 *aNewTraits, nsIMsgTraitClassificationListener *aTraitListener, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aJunkListener); \
  NS_SCRIPTABLE NS_IMETHOD GetUserHasClassified(PRBool *aUserHasClassified); \
  NS_SCRIPTABLE NS_IMETHOD ResetTrainingData(void); \
  NS_SCRIPTABLE NS_IMETHOD DetailMessage(const char *aMsgURI, PRUint32 aProTrait, PRUint32 aAntiTrait, nsIMsgTraitDetailListener *aListener, nsIMsgWindow *aMsgWindow); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIJUNKMAILPLUGIN(_to) \
  NS_SCRIPTABLE NS_IMETHOD ClassifyMessage(const char *aMsgURI, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener) { return _to ClassifyMessage(aMsgURI, aMsgWindow, aListener); } \
  NS_SCRIPTABLE NS_IMETHOD ClassifyMessages(PRUint32 aCount, const char **aMsgURIs, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener) { return _to ClassifyMessages(aCount, aMsgURIs, aMsgWindow, aListener); } \
  NS_SCRIPTABLE NS_IMETHOD ClassifyTraitsInMessage(const char *aMsgURI, PRUint32 aTraitCount, PRUint32 *aProTraits, PRUint32 *aAntiTraits, nsIMsgTraitClassificationListener *aTraitListener, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aJunkListener) { return _to ClassifyTraitsInMessage(aMsgURI, aTraitCount, aProTraits, aAntiTraits, aTraitListener, aMsgWindow, aJunkListener); } \
  NS_SCRIPTABLE NS_IMETHOD ClassifyTraitsInMessages(PRUint32 aCount, const char **aMsgURIs, PRUint32 aTraitCount, PRUint32 *aProTraits, PRUint32 *aAntiTraits, nsIMsgTraitClassificationListener *aTraitListener, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aJunkListener) { return _to ClassifyTraitsInMessages(aCount, aMsgURIs, aTraitCount, aProTraits, aAntiTraits, aTraitListener, aMsgWindow, aJunkListener); } \
  NS_SCRIPTABLE NS_IMETHOD SetMessageClassification(const char *aMsgURI, nsMsgJunkStatus aOldUserClassification, nsMsgJunkStatus aNewClassification, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener) { return _to SetMessageClassification(aMsgURI, aOldUserClassification, aNewClassification, aMsgWindow, aListener); } \
  NS_SCRIPTABLE NS_IMETHOD SetMsgTraitClassification(const char *aMsgURI, PRUint32 aOldCount, PRUint32 *aOldTraits, PRUint32 aNewCount, PRUint32 *aNewTraits, nsIMsgTraitClassificationListener *aTraitListener, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aJunkListener) { return _to SetMsgTraitClassification(aMsgURI, aOldCount, aOldTraits, aNewCount, aNewTraits, aTraitListener, aMsgWindow, aJunkListener); } \
  NS_SCRIPTABLE NS_IMETHOD GetUserHasClassified(PRBool *aUserHasClassified) { return _to GetUserHasClassified(aUserHasClassified); } \
  NS_SCRIPTABLE NS_IMETHOD ResetTrainingData(void) { return _to ResetTrainingData(); } \
  NS_SCRIPTABLE NS_IMETHOD DetailMessage(const char *aMsgURI, PRUint32 aProTrait, PRUint32 aAntiTrait, nsIMsgTraitDetailListener *aListener, nsIMsgWindow *aMsgWindow) { return _to DetailMessage(aMsgURI, aProTrait, aAntiTrait, aListener, aMsgWindow); } 

/* 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_SCRIPTABLE NS_IMETHOD ClassifyMessage(const char *aMsgURI, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->ClassifyMessage(aMsgURI, aMsgWindow, aListener); } \
  NS_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD ClassifyTraitsInMessage(const char *aMsgURI, PRUint32 aTraitCount, PRUint32 *aProTraits, PRUint32 *aAntiTraits, nsIMsgTraitClassificationListener *aTraitListener, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aJunkListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->ClassifyTraitsInMessage(aMsgURI, aTraitCount, aProTraits, aAntiTraits, aTraitListener, aMsgWindow, aJunkListener); } \
  NS_SCRIPTABLE NS_IMETHOD ClassifyTraitsInMessages(PRUint32 aCount, const char **aMsgURIs, PRUint32 aTraitCount, PRUint32 *aProTraits, PRUint32 *aAntiTraits, nsIMsgTraitClassificationListener *aTraitListener, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aJunkListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->ClassifyTraitsInMessages(aCount, aMsgURIs, aTraitCount, aProTraits, aAntiTraits, aTraitListener, aMsgWindow, aJunkListener); } \
  NS_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD SetMsgTraitClassification(const char *aMsgURI, PRUint32 aOldCount, PRUint32 *aOldTraits, PRUint32 aNewCount, PRUint32 *aNewTraits, nsIMsgTraitClassificationListener *aTraitListener, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aJunkListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMsgTraitClassification(aMsgURI, aOldCount, aOldTraits, aNewCount, aNewTraits, aTraitListener, aMsgWindow, aJunkListener); } \
  NS_SCRIPTABLE NS_IMETHOD GetUserHasClassified(PRBool *aUserHasClassified) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUserHasClassified(aUserHasClassified); } \
  NS_SCRIPTABLE NS_IMETHOD ResetTrainingData(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ResetTrainingData(); } \
  NS_SCRIPTABLE NS_IMETHOD DetailMessage(const char *aMsgURI, PRUint32 aProTrait, PRUint32 aAntiTrait, nsIMsgTraitDetailListener *aListener, nsIMsgWindow *aMsgWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->DetailMessage(aMsgURI, aProTrait, aAntiTrait, aListener, aMsgWindow); } 

#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 classifyTraitsInMessage (in string aMsgURI, in unsigned long aTraitCount, [array, size_is (aTraitCount)] in unsigned long aProTraits, [array, size_is (aTraitCount)] in unsigned long aAntiTraits, in nsIMsgTraitClassificationListener aTraitListener, [optional] in nsIMsgWindow aMsgWindow, [optional] in nsIJunkMailClassificationListener aJunkListener); */
NS_IMETHODIMP nsJunkMailPlugin::ClassifyTraitsInMessage(const char *aMsgURI, PRUint32 aTraitCount, PRUint32 *aProTraits, PRUint32 *aAntiTraits, nsIMsgTraitClassificationListener *aTraitListener, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aJunkListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void classifyTraitsInMessages (in unsigned long aCount, [array, size_is (aCount)] in string aMsgURIs, in unsigned long aTraitCount, [array, size_is (aTraitCount)] in unsigned long aProTraits, [array, size_is (aTraitCount)] in unsigned long aAntiTraits, in nsIMsgTraitClassificationListener aTraitListener, [optional] in nsIMsgWindow aMsgWindow, [optional] in nsIJunkMailClassificationListener aJunkListener); */
NS_IMETHODIMP nsJunkMailPlugin::ClassifyTraitsInMessages(PRUint32 aCount, const char **aMsgURIs, PRUint32 aTraitCount, PRUint32 *aProTraits, PRUint32 *aAntiTraits, nsIMsgTraitClassificationListener *aTraitListener, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aJunkListener)
{
    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;
}

/* void setMsgTraitClassification (in string aMsgURI, in unsigned long aOldCount, [array, size_is (aOldCount)] in unsigned long aOldTraits, in unsigned long aNewCount, [array, size_is (aNewCount)] in unsigned long aNewTraits, [optional] in nsIMsgTraitClassificationListener aTraitListener, [optional] in nsIMsgWindow aMsgWindow, [optional] in nsIJunkMailClassificationListener aJunkListener); */
NS_IMETHODIMP nsJunkMailPlugin::SetMsgTraitClassification(const char *aMsgURI, PRUint32 aOldCount, PRUint32 *aOldTraits, PRUint32 aNewCount, PRUint32 *aNewTraits, nsIMsgTraitClassificationListener *aTraitListener, nsIMsgWindow *aMsgWindow, nsIJunkMailClassificationListener *aJunkListener)
{
    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;
}

/* void detailMessage (in string aMsgURI, in unsigned long aProTrait, in unsigned long aAntiTrait, in nsIMsgTraitDetailListener aListener, [optional] in nsIMsgWindow aMsgWindow); */
NS_IMETHODIMP nsJunkMailPlugin::DetailMessage(const char *aMsgURI, PRUint32 aProTrait, PRUint32 aAntiTrait, nsIMsgTraitDetailListener *aListener, nsIMsgWindow *aMsgWindow)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIMsgCorpus */
#define NS_IMSGCORPUS_IID_STR "70bad26f-dfd4-41bd-8fab-4c09b9c1e845"

#define NS_IMSGCORPUS_IID \
  {0x70bad26f, 0xdfd4, 0x41bd, \
    { 0x8f, 0xab, 0x4c, 0x09, 0xb9, 0xc1, 0xe8, 0x45 }}

/**
 * The nsIMsgCorpus interface manages a corpus of mail data used for
 * statistical analysis of messages.
 */
class NS_NO_VTABLE NS_SCRIPTABLE nsIMsgCorpus : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMSGCORPUS_IID)

  /**
   * Clear the corpus data for a trait id.
   *
   * @param aTrait       trait id
   */
  /* void clearTrait (in unsigned long aTrait); */
  NS_SCRIPTABLE NS_IMETHOD ClearTrait(PRUint32 aTrait) = 0;

  /**
   * Update corpus data from a file.
   *
   * @param aFile       the file with the data, in the format:
   *
   *                    Format of the trait file for version 1:
   *                    [0xFCA93601]  (the 01 is the version)
   *                    for each trait to write:
   *                    [id of trait to write] (0 means end of list)
   *                    [number of messages per trait]
   *                    for each token with non-zero count
   *                    [count]
   *                    [length of word]word
   *
   * @param aIsAdd      should the data be added, or removed? True if
   *                    adding, false if removing.
   *
   * @param aRemapCount number of items in the parallel arrays aFromTraits,
   *                    aToTraits. These arrays allow conversion of the
   *                    trait id stored in the file (which may be originated
   *                    externally) to the trait id used in the local corpus
   *                    (which is defined locally using nsIMsgTraitService, and
   *                    mapped by that interface to a globally unique trait
   *                    id string).
   *
   * @param aFromTraits array of trait ids used in aFile. If aFile contains
   *                    trait ids that are not in this array, they are not
   *                    remapped, but assummed to be local trait ids.
   *
   * @param aToTraits   array of trait ids, corresponding to elements of
   *                    aFromTraits, that represent the local trait ids to
   *                    be used in storing data from aFile into the local corpus.
   */
  /* void updateData (in nsILocalFile aFile, in boolean aIsAdd, [optional] in unsigned long aRemapCount, [array, optional, size_is (aRemapCount)] in unsigned long aFromTraits, [array, optional, size_is (aRemapCount)] in unsigned long aToTraits); */
  NS_SCRIPTABLE NS_IMETHOD UpdateData(nsILocalFile *aFile, PRBool aIsAdd, PRUint32 aRemapCount, PRUint32 *aFromTraits, PRUint32 *aToTraits) = 0;

  /**
   * Get the corpus count for a token as a string.
   *
   * @param aWord    string of characters representing the token
   * @param aTrait   trait id
   *
   * @return         count of that token in the corpus
   *
   */
  /* unsigned long getTokenCount (in AUTF8String aWord, in unsigned long aTrait); */
  NS_SCRIPTABLE NS_IMETHOD GetTokenCount(const nsACString & aWord, PRUint32 aTrait, PRUint32 *_retval NS_OUTPARAM) = 0;

  /**
   * Gives information on token and message count information in the
   * training data corpus.
   *
   * @param aTrait           trait id (may be null)
   * @param aMessageCount    count of messages that have been trained with aTrait
   *
   * @return                 token count for all traits
   */
  /* unsigned long corpusCounts (in unsigned long aTrait, out unsigned long aMessageCount); */
  NS_SCRIPTABLE NS_IMETHOD CorpusCounts(PRUint32 aTrait, PRUint32 *aMessageCount NS_OUTPARAM, PRUint32 *_retval NS_OUTPARAM) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIMsgCorpus, NS_IMSGCORPUS_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGCORPUS \
  NS_SCRIPTABLE NS_IMETHOD ClearTrait(PRUint32 aTrait); \
  NS_SCRIPTABLE NS_IMETHOD UpdateData(nsILocalFile *aFile, PRBool aIsAdd, PRUint32 aRemapCount, PRUint32 *aFromTraits, PRUint32 *aToTraits); \
  NS_SCRIPTABLE NS_IMETHOD GetTokenCount(const nsACString & aWord, PRUint32 aTrait, PRUint32 *_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD CorpusCounts(PRUint32 aTrait, PRUint32 *aMessageCount NS_OUTPARAM, PRUint32 *_retval NS_OUTPARAM); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMSGCORPUS(_to) \
  NS_SCRIPTABLE NS_IMETHOD ClearTrait(PRUint32 aTrait) { return _to ClearTrait(aTrait); } \
  NS_SCRIPTABLE NS_IMETHOD UpdateData(nsILocalFile *aFile, PRBool aIsAdd, PRUint32 aRemapCount, PRUint32 *aFromTraits, PRUint32 *aToTraits) { return _to UpdateData(aFile, aIsAdd, aRemapCount, aFromTraits, aToTraits); } \
  NS_SCRIPTABLE NS_IMETHOD GetTokenCount(const nsACString & aWord, PRUint32 aTrait, PRUint32 *_retval NS_OUTPARAM) { return _to GetTokenCount(aWord, aTrait, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD CorpusCounts(PRUint32 aTrait, PRUint32 *aMessageCount NS_OUTPARAM, PRUint32 *_retval NS_OUTPARAM) { return _to CorpusCounts(aTrait, aMessageCount, _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_NSIMSGCORPUS(_to) \
  NS_SCRIPTABLE NS_IMETHOD ClearTrait(PRUint32 aTrait) { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearTrait(aTrait); } \
  NS_SCRIPTABLE NS_IMETHOD UpdateData(nsILocalFile *aFile, PRBool aIsAdd, PRUint32 aRemapCount, PRUint32 *aFromTraits, PRUint32 *aToTraits) { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdateData(aFile, aIsAdd, aRemapCount, aFromTraits, aToTraits); } \
  NS_SCRIPTABLE NS_IMETHOD GetTokenCount(const nsACString & aWord, PRUint32 aTrait, PRUint32 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTokenCount(aWord, aTrait, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD CorpusCounts(PRUint32 aTrait, PRUint32 *aMessageCount NS_OUTPARAM, PRUint32 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->CorpusCounts(aTrait, aMessageCount, _retval); } 

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

/* Header file */
class nsMsgCorpus : public nsIMsgCorpus
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMSGCORPUS

  nsMsgCorpus();

private:
  ~nsMsgCorpus();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsMsgCorpus, nsIMsgCorpus)

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

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

/* void clearTrait (in unsigned long aTrait); */
NS_IMETHODIMP nsMsgCorpus::ClearTrait(PRUint32 aTrait)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void updateData (in nsILocalFile aFile, in boolean aIsAdd, [optional] in unsigned long aRemapCount, [array, optional, size_is (aRemapCount)] in unsigned long aFromTraits, [array, optional, size_is (aRemapCount)] in unsigned long aToTraits); */
NS_IMETHODIMP nsMsgCorpus::UpdateData(nsILocalFile *aFile, PRBool aIsAdd, PRUint32 aRemapCount, PRUint32 *aFromTraits, PRUint32 *aToTraits)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* unsigned long getTokenCount (in AUTF8String aWord, in unsigned long aTrait); */
NS_IMETHODIMP nsMsgCorpus::GetTokenCount(const nsACString & aWord, PRUint32 aTrait, PRUint32 *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* unsigned long corpusCounts (in unsigned long aTrait, out unsigned long aMessageCount); */
NS_IMETHODIMP nsMsgCorpus::CorpusCounts(PRUint32 aTrait, PRUint32 *aMessageCount NS_OUTPARAM, PRUint32 *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIMsgFilterPlugin_h__ */
