Commit graph

4 commits

Author SHA1 Message Date
Jim Nelson
d179cb9bdd Persist messages locally: #3742
This completes the heavy lifting of persisting messages locally.  The strategy is that the local database may be sparsely populated, both in the availability of messages in a folder and the fields of a message that is partially stored.  As data is pulled from the remote server it's always stored in the database.  Future requests will always go to the database first, preventing unnecessary network traffic.

Also, this patch will detect when a message is stored in multiple folders on the server.  The database uses soft links from the folder to the message, so the message is stored only once in the database.  This technique relies heavily on the availability and validity of the Message-ID header, but we expect this to be reliable the vast majority of the time.
2011-06-23 19:07:04 -07:00
Jim Nelson
4ccabcbd3e Further work toward persisting messages locally (#3742).
This iteration now stores headers locally and fetches them first before going to the network.  Work done in the database to deal with IMAPisms.  More work on the GMime bindings (couple of mistakes in prior commit).
2011-06-21 17:48:40 -07:00
Jim Nelson
9221937e95 Addition of MessageTable and MessageLocationTable toward fixing #3742.
Much of the API between the local and net stores had to be reworked for consistency as well as planning ahead for how messages will be retrieved and stored efficiently.  This work also attempts to keep in mind that other mail sources (POP, etc.) may be required in the future, and hopefully can be added without major rework.
2011-06-16 16:27:08 -07:00
Jim Nelson
4b8ac5689f First stab at implementing persistent storage of IMAP data: #3695.
This large diff represents a growth of the architecture to persist IMAP data as its downloaded.  When listing folders, a local database is consulted first to immediately feed to the caller.  In the background, network calls fetch the "real" list.  The two are collated for differences which are reported to the caller via signals, who are then responsible for updating the user interface appropriately.  No other synchronization work is represented in this diff.

Note that this breaks functionality: when a folder is selected, no messages appear in the message list.  Fixing this requires more work, and this patch was already large enough.  It's ticketed here: #3741
2011-06-10 19:17:35 -07:00