Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

'Download/Sync Now' behaviour

19 views
Skip to first unread message

Gerry

unread,
Nov 21, 2008, 1:49:54 AM11/21/08
to dev-apps-t...@lists.mozilla.org
The strategies of AutoSync provide a great deal of flexibility in how
IMAP messages are downloaded. But there is no such capability with the
current implementation of "Download/Sync Now" leading to inconsistent
behaviour IMO.

The behaviour I want is that Thunderbird only downloads large IMAP
messages when they are specifically requested by the user, e.g. they are
selected for read or for download using 'Get Selected Messages' and 'Get
Starred Messages'. Using nsIAutoSyncMsgStrategy I can exclude messages
larger than 100KB being downloaded by AutoSync, but if I want to
manually sync using 'Download/Sync Now' I get the traditional offline
behaviour i.e. all messages in offline folders are downloaded.

I see a number of ways to implement the desired behaviour:

1. Ideally modify nsImapOfflineDownloader/nsAutoSyncManager to run on
demand

2. Modify nsImapMailFolder::GetBodysToDownload() to provide limited
support to strategies using nsIAutoSyncMsgStrategy::IsExcluded()

3. Least desirable modify nsImapMailFolder::DownloadAllForOffline() to
use nsIAutoSyncState::ProcessExistingHeaders(). But how would you know
when it has finished?

Thoughts?

The background for this is that I am currently living in Nepal and I am
trying to write an extension for use in low bandwidth conditions.

0 new messages