Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
nsSpamSettings Class Reference

#include <nsSpamSettings.h>

Inheritance diagram for nsSpamSettings:
Inheritance graph
[legend]
Collaboration diagram for nsSpamSettings:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsSpamSettings ()
virtual ~nsSpamSettings ()
void logJunkHit (in nsIMsgDBHdr aMsgHdr, in boolean aMoveMessage)
void logJunkString (in string aLogText)
void clone (in nsISpamSettings aSpamSettings)
void initialize (in nsIMsgIncomingServer aServer)
void OnStartRunningUrl (in nsIURI url)
void OnStopRunningUrl (in nsIURI url, in nsresult aExitCode)

Public Attributes

attribute long level
 0 for nothing, 100 for highest
attribute boolean moveOnSpam
readonly attribute boolean markAsReadOnSpam
attribute long moveTargetMode
 Most consumers will just use spamFolderURI rather than accessing any of target attributes directly.
const long MOVE_TARGET_MODE_ACCOUNT = 0
const long MOVE_TARGET_MODE_FOLDER = 1
attribute string actionTargetAccount
attribute string actionTargetFolder
readonly attribute string spamFolderURI
 built from moveTargetMode, actionTargetAccount, actionTargetFolder
attribute boolean purge
attribute long purgeInterval
 interval, in days
attribute boolean useWhiteList
attribute string whiteListAbURI
readonly attribute boolean manualMark
 should we do something (move or delete) when the user manually marks a message as junk?
readonly attribute long manualMarkMode
const long MANUAL_MARK_MODE_MOVE = 0
const long MANUAL_MARK_MODE_DELETE = 1
attribute boolean useServerFilter
 integrate with server-side spam detection programs
attribute ACString serverFilterName
readonly attribute nsIFile serverFilterFile
const long TRUST_POSITIVES = 1
const long TRUST_NEGATIVES = 2
attribute long serverFilterTrustFlags
readonly attribute boolean loggingEnabled
attribute nsIOutputStream logStream

Private Member Functions

nsresult UpdateJunkFolderState ()

Private Attributes

nsCOMPtr< nsIOutputStreammLogStream
nsCOMPtr< nsIFilemLogFile
PRInt32 mLevel
PRInt32 mPurgeInterval
PRInt32 mMoveTargetMode
PRBool mPurge
PRBool mUseWhiteList
PRBool mMoveOnSpam
PRBool mUseServerFilter
nsCString mActionTargetAccount
nsCString mActionTargetFolder
nsCString mWhiteListAbURI
nsCString mCurrentJunkFolderURI
nsCString mServerFilterName
nsCOMPtr< nsIFilemServerFilterFile
PRInt32 mServerFilterTrustFlags
nsCOMPtr< nsIDateTimeFormatmDateFormatter

Detailed Description

Definition at line 52 of file nsSpamSettings.h.


Constructor & Destructor Documentation

Definition at line 88 of file nsSpamSettings.cpp.

{
}

Member Function Documentation

void nsISpamSettings::clone ( in nsISpamSettings  aSpamSettings) [inherited]
void nsISpamSettings::logJunkHit ( in nsIMsgDBHdr  aMsgHdr,
in boolean  aMoveMessage 
) [inherited]
void nsISpamSettings::logJunkString ( in string  aLogText) [inherited]

Here is the caller graph for this function:

void nsIUrlListener::OnStopRunningUrl ( in nsIURI  url,
in nsresult  aExitCode 
) [inherited]

Here is the caller graph for this function:

Definition at line 334 of file nsSpamSettings.cpp.

{
  nsresult rv;

  // if the spam folder uri changed on us, we need to unset the junk flag
  // on the old spam folder
  nsXPIDLCString newJunkFolderURI;
  rv = GetSpamFolderURI(getter_Copies(newJunkFolderURI));
  NS_ENSURE_SUCCESS(rv,rv);

  if (!mCurrentJunkFolderURI.IsEmpty() && !mCurrentJunkFolderURI.Equals(newJunkFolderURI))
  {
    nsCOMPtr<nsIMsgFolder> oldJunkFolder;
    rv = GetExistingFolder(mCurrentJunkFolderURI.get(), getter_AddRefs(oldJunkFolder));
    if (NS_SUCCEEDED(rv) && oldJunkFolder) 
    {
      // remove the MSG_FOLDER_FLAG_JUNK on the old junk folder
      // XXX TODO
      // JUNK MAIL RELATED
      // (in ClearFlag?) we need to make sure that this folder
      // is not a the junk folder for another account
      // the same goes for set flag.  have fun with all that.
      oldJunkFolder->ClearFlag(MSG_FOLDER_FLAG_JUNK);
  }
}

  mCurrentJunkFolderURI = newJunkFolderURI;

  // only try to create the junk folder if we are moving junk
  // and we have a non-empty uri
  if (mMoveOnSpam && !mCurrentJunkFolderURI.IsEmpty()) {
    // as the url listener, the spam settings will set the MSG_FOLDER_FLAG_JUNK folder flag
    // on the junk mail folder, after it is created
    rv = GetOrCreateFolder(mCurrentJunkFolderURI, this);
  }

  return rv;
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 66 of file nsISpamSettings.idl.

Definition at line 67 of file nsISpamSettings.idl.

0 for nothing, 100 for highest

Definition at line 54 of file nsISpamSettings.idl.

Definition at line 103 of file nsISpamSettings.idl.

Definition at line 104 of file nsISpamSettings.idl.

Definition at line 75 of file nsSpamSettings.h.

Definition at line 76 of file nsSpamSettings.h.

Definition at line 90 of file nsISpamSettings.idl.

Definition at line 89 of file nsISpamSettings.idl.

should we do something (move or delete) when the user manually marks a message as junk?

Definition at line 87 of file nsISpamSettings.idl.

Definition at line 88 of file nsISpamSettings.idl.

Definition at line 57 of file nsISpamSettings.idl.

Definition at line 78 of file nsSpamSettings.h.

Definition at line 84 of file nsSpamSettings.h.

Definition at line 66 of file nsSpamSettings.h.

Definition at line 64 of file nsSpamSettings.h.

Definition at line 63 of file nsSpamSettings.h.

Definition at line 72 of file nsSpamSettings.h.

Definition at line 68 of file nsSpamSettings.h.

Definition at line 64 of file nsISpamSettings.idl.

Definition at line 65 of file nsISpamSettings.idl.

Definition at line 56 of file nsISpamSettings.idl.

Most consumers will just use spamFolderURI rather than accessing any of target attributes directly.

Definition at line 63 of file nsISpamSettings.idl.

Definition at line 70 of file nsSpamSettings.h.

Definition at line 67 of file nsSpamSettings.h.

Definition at line 81 of file nsSpamSettings.h.

Definition at line 80 of file nsSpamSettings.h.

Definition at line 82 of file nsSpamSettings.h.

Definition at line 73 of file nsSpamSettings.h.

Definition at line 71 of file nsSpamSettings.h.

Definition at line 77 of file nsSpamSettings.h.

Definition at line 74 of file nsISpamSettings.idl.

interval, in days

Definition at line 78 of file nsISpamSettings.idl.

Definition at line 97 of file nsISpamSettings.idl.

Definition at line 96 of file nsISpamSettings.idl.

Definition at line 100 of file nsISpamSettings.idl.

built from moveTargetMode, actionTargetAccount, actionTargetFolder

Definition at line 72 of file nsISpamSettings.idl.

Definition at line 99 of file nsISpamSettings.idl.

Definition at line 98 of file nsISpamSettings.idl.

integrate with server-side spam detection programs

Definition at line 95 of file nsISpamSettings.idl.

Definition at line 80 of file nsISpamSettings.idl.

Definition at line 81 of file nsISpamSettings.idl.


The documentation for this class was generated from the following files: