Public Member Functions | Public Attributes

nsIJunkMailPlugin Interface Reference

import "nsIMsgFilterPlugin.idl";

Inheritance diagram for nsIJunkMailPlugin:
Collaboration diagram for nsIJunkMailPlugin:

List of all members.

Public Member Functions

void classifyMessage (in string aMsgURI, in nsIMsgWindow aMsgWindow, in nsIJunkMailClassificationListener aListener)
 Given a message URI, determine what its current classification is according to the current training set.
void classifyMessages (in unsigned long aCount,[array, size_is(aCount)] in string aMsgURIs, in nsIMsgWindow aMsgWindow, in nsIJunkMailClassificationListener aListener)
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)
 Given a message URI, evaluate its relative match to a list of traits according to the current training set.
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)
 Given an array of message URIs, evaluate their relative match to a list of traits according to the current training set.
void setMessageClassification (in string aMsgURI, in nsMsgJunkStatus aOldUserClassification, in nsMsgJunkStatus aNewClassification, in nsIMsgWindow aMsgWindow, in nsIJunkMailClassificationListener aListener)
 Called when a user forces the classification of a message.
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)
 Called when a user forces a change in the classification of a message.
void resetTrainingData ()
 Removes the training file and clears out any in memory training tokens.
void detailMessage (in string aMsgURI, in unsigned long aProTrait, in unsigned long aAntiTrait, in nsIMsgTraitDetailListener aListener,[optional] in nsIMsgWindow aMsgWindow)
 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.

Public Attributes

const nsMsgJunkStatus UNCLASSIFIED = 0
 Message classifications.
const nsMsgJunkStatus GOOD = 1
const nsMsgJunkStatus JUNK = 2
const nsMsgJunkScore IS_SPAM_SCORE = 100
 Message junk score constants.
const nsMsgJunkScore IS_HAM_SCORE = 0
const unsigned long GOOD_TRAIT = 1
 Trait ids for junk analysis.
const unsigned long JUNK_TRAIT = 2
readonly attribute boolean userHasClassified

Member Function Documentation

void nsIJunkMailPlugin::classifyMessage ( in string  aMsgURI,
in nsIMsgWindow  aMsgWindow,
in nsIJunkMailClassificationListener  aListener 
)

Given a message URI, determine what its current classification is according to the current training set.

void nsIJunkMailPlugin::classifyMessages ( in unsigned long  aCount,
[array, size_is(aCount)] in string  aMsgURIs,
in nsIMsgWindow  aMsgWindow,
in nsIJunkMailClassificationListener  aListener 
)
void nsIJunkMailPlugin::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 
)

Given a message URI, evaluate its relative match to a list of traits according to the current training set.

Parameters:
aMsgURI URI of the message to be evaluated
aTraitCount length of aProTraits, aAntiTraits arrays
aProTraits array of trait ids for trained messages that match the tested trait (for example, JUNK_TRAIT if testing for junk)
aAntiTraits array of trait ids for trained messages that do not match the tested trait (for example, GOOD_TRAIT if testing for junk)
aTraitListener trait-oriented callback listener (may be null)
aMsgWindow current message window (may be null)
aJunkListener junk-oriented callback listener (may be null)
void nsIJunkMailPlugin::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 
)

Given an array of message URIs, evaluate their relative match to a list of traits according to the current training set.

Parameters:
aCount Number of messages to evaluate
aMsgURIs array of URIs of the messages to be evaluated
aTraitCount length of aProTraits, aAntiTraits arrays
aProTraits array of trait ids for trained messages that match the tested trait (for example, JUNK_TRAIT if testing for junk)
aAntiTraits array of trait ids for trained messages that do not match the tested trait (for example, GOOD_TRAIT if testing for junk)
aTraitListener trait-oriented callback listener (may be null)
aMsgWindow current message window (may be null)
aJunkListener junk-oriented callback listener (may be null)
void nsIJunkMailPlugin::detailMessage ( in string  aMsgURI,
in unsigned long  aProTrait,
in unsigned long  aAntiTrait,
in nsIMsgTraitDetailListener  aListener,
[optional] in nsIMsgWindow  aMsgWindow 
)

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.

Parameters:
aMsgURI URI of the message to be evaluated
aProTrait trait id for trained messages that match the tested trait (for example, JUNK_TRAIT if testing for junk)
aAntiTrait trait id for trained messages that do not match the tested trait (for example, GOOD_TRAIT if testing for junk)
aListener callback listener for results
aMsgWindow current message window (may be null)
void nsIJunkMailPlugin::resetTrainingData (  ) 

Removes the training file and clears out any in memory training tokens.

User must retrain after doing this.

void nsIJunkMailPlugin::setMessageClassification ( in string  aMsgURI,
in nsMsgJunkStatus  aOldUserClassification,
in nsMsgJunkStatus  aNewClassification,
in nsIMsgWindow  aMsgWindow,
in nsIJunkMailClassificationListener  aListener 
)

Called when a user forces the classification of a message.

Should cause the training set to be updated appropriately.

  • aMsgURI URI of the message to be classified
  • aOldUserClassification Was it previous manually classified by the user? If so, how?
  • aNewClassification New manual classification.
  • aListener Callback (may be null)
void nsIJunkMailPlugin::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 
)

Called when a user forces a change in the classification of a message.

Should cause the training set to be updated appropriately.

Parameters:
aMsgURI URI of the message to be classified
aOldCount length of aOldTraits array
aOldTraits array of trait IDs of the old message classification(s), if any
aNewCount length of aNewTraits array
aNewTraits array of trait IDs of the new message classification(s), if any
aTraitListener trait-oriented listener (may be null)
aMsgWindow current message window (may be null)
aJunkListener junk-oriented listener (may be null)

Member Data Documentation

const unsigned long nsIJunkMailPlugin::GOOD_TRAIT = 1

Trait ids for junk analysis.

These values are fixed to ensure backwards compatibility with existing junk-oriented classification code.

Message junk score constants.

Junkscore can only be one of these two values (or not set).

const unsigned long nsIJunkMailPlugin::JUNK_TRAIT = 2

Message classifications.


The documentation for this interface was generated from the following file: