diff options
Diffstat (limited to 'src/config.h')
| -rw-r--r-- | src/config.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h index 1ab923d..aa3c332 100644 --- a/src/config.h +++ b/src/config.h @@ -80,6 +80,14 @@ struct Account /// reports a missing key through the warnings path. QString trash; + /// The account's spam folder, relative to maildir. + /// + /// MANDATORY, unlike `sent` and `drafts`. Mark spam moves a file into this + /// folder, so an account without one cannot mark spam at all, and the user + /// chose a config error over a per-account disabled state. Config::load() + /// reports a missing key through the warnings path. + QString spam; + /// The command that sends mail from this account, receiving the complete /// RFC822 message on stdin. Optional, and its ABSENCE is meaningful: /// an account without one is receive-only by construction. @@ -160,6 +168,13 @@ struct Account /// uniformly; it is Config::load() that reports the problem. QString trashQuery() const; + /// Matches this account's spam folder, or empty when `spam` is unset. + /// + /// Empty is a config error rather than a legitimate state, unlike + /// sentQuery(). The query helper still returns empty so callers compose + /// uniformly; it is Config::load() that reports the problem. + QString spamQuery() const; + /// Matches this account's inbox folder, using inboxFolder(). QString inboxQuery() const; @@ -408,6 +423,13 @@ public: /// silently answers a different question. QString allTrashQuery() const; + /// Matches every configured account's spam, or empty when none has one. + /// + /// Joins only the NON-EMPTY spamQuery() results, for the same reason + /// allTrashQuery() does: notmuch accepts a bare "or" without complaint and + /// silently answers a different question. + QString allSpamQuery() const; + /// Matches every configured account's drafts, or empty when none has one. /// /// Joins only the NON-EMPTY draftsQuery() results, for the same reason |
