diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /comm/mailnews/base/public/nsISpamSettings.idl | |
parent | Initial commit. (diff) | |
download | thunderbird-upstream.tar.xz thunderbird-upstream.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'comm/mailnews/base/public/nsISpamSettings.idl')
-rw-r--r-- | comm/mailnews/base/public/nsISpamSettings.idl | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/comm/mailnews/base/public/nsISpamSettings.idl b/comm/mailnews/base/public/nsISpamSettings.idl new file mode 100644 index 0000000000..96c81c6c08 --- /dev/null +++ b/comm/mailnews/base/public/nsISpamSettings.idl @@ -0,0 +1,97 @@ +/* -*- Mode: idl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ + +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "nsISupports.idl" + +interface nsIOutputStream; +interface nsIMsgIncomingServer; +interface nsIMsgDBHdr; +interface nsIFile; + +[scriptable, uuid(1772BE95-FDA9-4dfd-A663-8AF92C1E3024)] +interface nsISpamSettings: nsISupports { + /** + * 0 for nothing, 100 for highest + */ + attribute long level; + + attribute boolean moveOnSpam; + readonly attribute boolean markAsReadOnSpam; + + /** + * Most consumers will just use spamFolderURI rather than accessing any of + * target attributes directly. + */ + attribute long moveTargetMode; + const long MOVE_TARGET_MODE_ACCOUNT = 0; + const long MOVE_TARGET_MODE_FOLDER = 1; + // Despite their name the following are URIs. + attribute AUTF8String actionTargetAccount; + attribute AUTF8String actionTargetFolder; + + /** + * built from moveTargetMode, actionTargetAccount, actionTargetFolder + */ + readonly attribute AUTF8String spamFolderURI; + + attribute boolean purge; + /** + * interval, in days + */ + attribute long purgeInterval; + + attribute boolean useWhiteList; + attribute AUTF8String whiteListAbURI; + + /** + * Should we do something when the user manually marks a message as junk? + */ + readonly attribute boolean manualMark; + + /** + * With manualMark true, which action (move to the Junk folder, or delete) + * should we take when the user marks a message as junk. + */ + readonly attribute long manualMarkMode; + const long MANUAL_MARK_MODE_MOVE = 0; + const long MANUAL_MARK_MODE_DELETE = 1; + + /** + * integrate with server-side spam detection programs + */ + attribute boolean useServerFilter; + attribute ACString serverFilterName; + readonly attribute nsIFile serverFilterFile; + const long TRUST_POSITIVES = 1; + const long TRUST_NEGATIVES = 2; + attribute long serverFilterTrustFlags; + + // for logging + readonly attribute boolean loggingEnabled; + attribute nsIOutputStream logStream; + void logJunkHit(in nsIMsgDBHdr aMsgHdr, in boolean aMoveMessage); + void logJunkString(in string aLogText); + void clone(in nsISpamSettings aSpamSettings); + + // aServer -> spam settings are associated with a particular server + void initialize(in nsIMsgIncomingServer aServer); + + /** + * check if junk processing for a message should be bypassed + * + * Typically this is determined by comparing message to: address + * to a whitelist of known good addresses or domains. + * + * @param aMsgHdr database header representing the message. + * + * @return true if this message is whitelisted, and junk + * processing should be bypassed + * + * false otherwise (including in case of error) + */ + boolean checkWhiteList(in nsIMsgDBHdr aMsgHdr); + +}; |