Service Proposal

My initial idea is to create a new interface that registers itself as a service with XPCOM. This service will allow objects to register (and unregister if needed) themselves for synchronization push and pull operations. This interface will also provide at least a high-level path for wrapping up the data to sync in a sudo-email message or IMAP implementation.

The push operations would provide the object a new set of data (in a to-be-determined data structure) and leave the implementation details up to the object.

The pull operation would request data (again in a to-be-determined structure) from the object into the synchronization service.

Delivery

  • Build a message w/ attachments
    • Used for both IMAP and Mail delivery cases

Service Synchronization Notes

  • Items to Sync:
    • Address Book
    • Mail Filters
    • Saved Searches
    • Newsrc files
    • etc.. (add more)
  • When to sync?
    • on a set interval (pref?)
    • shutdown

Things to keep in mind:

  • Make the feature extensible
    • A simple interface to inherit?
  • Need a way to know that an object has changed
  • A way to stream the object to a file, or a file pointer
    • for newsrc files, filters, (anything that uses a file)
  • Things that aren't stored as a file:
    • Account Information
    • About everything in account.js
      • Sync tag definitions
    • An interface that parses and applies these changes:

Item Synchronization Notes and Ideas

Below contains notes for potential hooks for notifying an interface (service possibly) that an object has changed and needs to be synced. These locations might also be ideal for points of entry where the notifying interface could inform the object of changes from an external source.

Address Book

  • Some object that extends from |nsIAbListener|
    • |nsAbDirectoryDataSource|
    • |nsAbView|

Message View Synchronization Ideas

|nsMsgMailViewList| seems like the best place from just poking around. I could just set some sinks in that class for when methods like |AddMailView()| and |RemoveMailView()| are called.

Mail Filters

Saved Searches

News RC

RSS Feeds

Saved Preferences