Name Description Size Coverage
components.conf 2892 -
moz.build 1052 -
nsAutoSyncManager.cpp Tests whether the given folder is owned by the same imap server or not. 52134 -
nsAutoSyncManager.h Auto-Sync Background: it works only with offline imap folders. "autosync_offline_stores" pref enables/disables auto-sync mechanism. Note that setting "autosync_offline_stores" to false, or setting folder to not-offline doesn't stop synchronization process for already queued folders. Auto-Sync policy: o It kicks in during system idle time, and tries to download as much messages as possible based on given folder and message prioritization strategies/rules. Default folder prioritization strategy dictates to sort the folders based on the following order: INBOX > DRAFTS > SUBFOLDERS > TRASH. Similarly, default message prioritization strategy dictates to download the most recent and smallest message first. Also, by sorting the messages by size in the queue, it tries to maximize the number of messages downloaded. o It downloads the messages in groups. Default groups size is defined by |kDefaultGroupSize|. o It downloads the messages larger than the group size one-by-one. o If new messages arrive when not idle, it downloads the messages that do fit into |kFirstGroupSizeLimit| size limit immediately, without waiting for idle time, unless there is a sibling (a folder owned by the same imap server) in stDownloadInProgress state in the q o If new messages arrive when idle, it downloads all the messages without any restriction. o If new messages arrive into a folder while auto-sync is downloading other messages of the same folder, it simply puts the new messages into the folder's download queue, and re-prioritize the messages. That behavior makes sure that the high priority (defined by the message strategy) get downloaded first always. o If new messages arrive into a folder while auto-sync is downloading messages of a lower priority folder, auto-sync switches the folders in the queue and starts downloading the messages of the higher priority folder next time it downloads a message group. o Currently there is no way to stop/pause/cancel a message download. The smallest granularity is the message group size. o Auto-Sync manager periodically (kAutoSyncFreq) checks folder for existing messages w/o bodies. It persists the last time the folder is checked in the local database of the folder. We call this process 'Discovery'. This process is asynchronous and processes |kNumberOfHeadersToProcess| number of headers at each cycle. Since it works on local data, it doesn't consume lots of system resources, it does its job fast. o Discovery is necessary especially when the user makes a transition from not-offline to offline mode. o Update frequency is defined by nsMsgIncomingServer::BiffMinutes. Error Handling: o if the user moves/deletes/filters all messages of a folder already queued, auto-sync deals with that situation by skipping the folder in question, and continuing with the next in chain. o If the message size is zero, auto-sync ignores the message. o If the download of the message group fails for some reason, auto-sync tries to download the same group |kGroupRetryCount| times. If it still fails, continues with the next group of messages. Download Model: Parallel model should be used with the imap servers that do not have any "max number of sessions per IP" limit, and when the bandwidth is significantly large. How it really works: The AutoSyncManager gets an idle notification. First it processes any folders in the discovery queue (which means it schedules message download for any messages it previously determined it should download). Then it sets a timer, and in the timer callback, it processes the update q, by calling InitiateAutoSync on the first folder in the update q. See additional info near the bottom of this file. 11947 -
nsAutoSyncState.cpp @return True if the elements are equals; false otherwise. 28747 -
nsAutoSyncState.h An adaptor class to make msg strategy nsTArray.Sort() compatible. 3180 -
nsImapCore.h imap message flags 9181 -
nsImapFlagAndUidState.cpp amount to expand for imap entry flags when we need more 10245 -
nsImapFlagAndUidState.h 1919 -
nsImapGenericParser.cpp 14500 -
nsImapGenericParser.h nsImapGenericParser is the base parser class used by the server parser and body shell parser 2499 -
nsImapHostSessionList.cpp "accessing-hostlist-monitor" 22274 -
nsImapHostSessionList.h 7591 -
nsImapIncomingServer.cpp 103307 -
nsImapIncomingServer.h get some implementation from nsMsgIncomingServer 6195 -
nsImapMailFolder.cpp Copies the contents of srcDir into destDir. destDir will be created if it doesn't exist. 339935 -
nsImapMailFolder.h 25782 -
nsImapNamespace.cpp 15238 -
nsImapNamespace.h 3283 -
nsImapOfflineSync.cpp Leaves m_currentServer at the next imap or local mail "server" that might have offline events to playback, and m_folderQueue holding a (reversed) list of all the folders to consider for that server. If no more servers, m_currentServer will be left at nullptr and the function returns false. 43041 -
nsImapOfflineSync.h 3374 -
nsImapProtocol.cpp 395946 -
nsImapProtocol.h 33319 -
nsImapSearchResults.cpp 2130 -
nsImapSearchResults.h 1237 -
nsImapServerResponseParser.cpp 99231 -
nsImapServerResponseParser.h 10687 -
nsImapService.cpp 114617 -
nsImapService.h nsImapService implements the IMAP protocol. So, whenever someone opens an "imap://" url, the resultant nsIChannel is created here (via newChannel()). It also provides a bunch of methods to provide more egonomic ways to initiate IMAP operations, rather than manually composing an "imap://..." URL. See nsIImapService for these. 5662 -
nsImapStringBundle.cpp 1339 -
nsImapStringBundle.h 567 -
nsImapUndoTxn.cpp 25170 -
nsImapUndoTxn.h 3112 -
nsImapUrl.cpp 44163 -
nsImapUrl.h 4401 -
nsImapUtils.cpp parses ImapMessageURI 11514 -
nsImapUtils.h 2658 -
nsSyncRunnableHelpers.cpp 23354 -
nsSyncRunnableHelpers.h 4243 -