Changes

Jump to: navigation, search

CloudServices/Sync/FxSync/Developer/ClientAPI

16 bytes added, 21:54, 24 September 2010
Writing an Engine class
You're probably sick of writing subclasses by this point, but don't worry: this one is very easy. I saved it for last because it requires the least code.
Your class must derive from the <tt>SyncEngine</tt> class, defined in <tt>weaveservices-sync/modules/engines.js</tt>. <tt>SyncEngine</tt> contains a lot of code which handles logic for the core sync algorithm, but your subclass won't need to call any of this directly, unless you are overriding part of the sync algorithm to provide custom sync behavior (an advanced technique outside the scope of this article).
A sample Engine class:
const Cu = Components.utils;
// etc...
Cu.import("resource://weaveservices-sync/engines.js");
== Installing your classes into Weave ==
Canmove, confirm
725
edits

Navigation menu