canmove, Confirmed users
725
edits
Line 8: | Line 8: | ||
This page describes how to the client-side Sync API for sync engines (and their helper objects). The focus is on using this API to create a new sync engine to synchronize a new data type. The data type can be anything that extension JS code has access to through any Mozilla API; this means this page must of necessity be pretty vague about reading and writing the underlying data. You'll have to fill in those blanks yourself. Try browsing the [link] xpcom documentation to find out how to get at the many types of useful data that Mozilla stores. | This page describes how to the client-side Sync API for sync engines (and their helper objects). The focus is on using this API to create a new sync engine to synchronize a new data type. The data type can be anything that extension JS code has access to through any Mozilla API; this means this page must of necessity be pretty vague about reading and writing the underlying data. You'll have to fill in those blanks yourself. Try browsing the [link] xpcom documentation to find out how to get at the many types of useful data that Mozilla stores. | ||
To sync a new data type, you'll need to write an engine object that extends the base SyncEngine object; you'll also need to extend three helper objects. Here are the classes you need to extend, and the files in which they're defined: | To sync a new data type, you'll need to write an engine object that extends the base <tt>SyncEngine</tt> object; you'll also need to extend three helper objects. Here are the classes you need to extend, and the files in which they're defined: | ||
# <tt>SyncEngine</tt>, <tt>Store</tt>, <tt>Tracker</tt> in <tt>services/sync/modules/engines.js</tt> | # <tt>SyncEngine</tt>, <tt>Store</tt>, <tt>Tracker</tt> in <tt>services/sync/modules/engines.js</tt> |