26
edits
| (21 intermediate revisions by the same user not shown) | |||
| Line 7: | Line 7: | ||
=== The Sync Service === | === The Sync Service === | ||
A new service will be introduced into the mailnews component, called <code>nsIMsgRoamingService</code>. This service will delegate notifications between the data classes and roaming update messages. There are two paths of data through the roaming service, as illustrated below: | |||
<div style="text-align: center">[[Image:Flow_dataObjects.png]]</div> | <div style="text-align: center">[[Image:Flow_dataObjects.png]]</div> | ||
Note: A "data class" is a interface that controls anything that we want synced, like an <code>|nsIMsgFolder|</code>. | Note: A "data class" is a interface that controls anything that we want synced, like an <code>|nsIMsgFolder|</code>. | ||
The roaming service uses the <code>nsIObserverService</code> to handle passing updates to the data classes. The designated topics for the roaming service can be found in <code>nsMsgRoamingConstants.h</code>. | |||
The | |||
The roaming service also maintains the list of update messages that are stored on either the IMAP folder or the POP3 inbox. A typical set of update messages consists of one full update message, followed by a preset number of delta update messages. This setup is illustrated below: | |||
<div style="text-align: center">[[Image:update_messages.png]]</div> | |||
=== Update Messages === | |||
For containing and controlling the data between installations, update messages are used to package and transport the sync data. All sync information is packed into a file. There are two types of update messages: | |||
* Full Update Message - Contains everything that the user has selected to sync | |||
* Delta Update Message - Contains only the changes since the last full/delta update message. | |||
Some of the sync data can be transferred as the full data file, like the address book's abook.mab file. However, certain data types like user preferences can not be sync'd this way, and contain an update log listed in the file. To help with unpacking all of the data, a TOC file is created and included with each update message. The format of the TOC file looks like this: | |||
NumItems: 3 | NumItems: 3 | ||
| Line 30: | Line 30: | ||
Item1: temp.txt | Item1: temp.txt | ||
Item2: temp2.txt | Item2: temp2.txt | ||
=== Delivery Options === | === Delivery Options === | ||
| Line 49: | Line 47: | ||
For IMAP-synched sessions, a timer is probably not needed, as changes can be applied as new delta/update messages are posted. The same philosophy can be applied to the POP3 setting, applying sync changes based on the biff-update interval. | For IMAP-synched sessions, a timer is probably not needed, as changes can be applied as new delta/update messages are posted. The same philosophy can be applied to the POP3 setting, applying sync changes based on the biff-update interval. | ||
== TODO List == | |||
To help keep things centralized, I'm keeping track of things I need to work on here. Any suggestions made by others will be listed here as well. | |||
* Shutdown & Refresh AB Datasource | |||
* Mark Update Messages as Read (IMAP not working right?) | |||
* Fix Purge Update Messages | |||
* Initial/Temporary UI integration | |||
* Sign Update Messages [file follow-up bug] | |||
* Include information to setup a roaming account from a full update message. | |||
* POP3 mailboxes that have a limited download size will fully download the entire update message | |||
** [http://mxr.mozilla.org/mailnews/source/mailnews/base/util/nsMsgIncomingServer.cpp#1737 Use an internal filter]. | |||
** [http://mxr.mozilla.org/mailnews/source/mailnews/base/util/nsMsgIncomingServer.cpp#1629 Or read the filter from a file]. | |||
== Service Synchronization Notes == | == Service Synchronization Notes == | ||
| Line 64: | Line 75: | ||
** shutdown | ** shutdown | ||
== Item Synchronization Notes and Ideas == | == Item Synchronization Notes and Ideas == | ||
edits