Changes

Jump to: navigation, search

CloudServices/Sync/FxSync/Developer/ClientAPI

343 bytes added, 21:38, 4 February 2009
Writing a Store class
The majority of the code you write for syncing a new data type will most likely be in the Store class.
Each Record that the Store keeps track of must be identified by a unique ID. This can be a true GUID (Globally Unique ID), but it doesn't have to be -- it only has to be unique among all records in the store. (So if an ID used for a bookmark record in the bookmark store is reused for a tab record in the tab store, that's fine.) Nevertheless, most of the code refers to them as GUIDs, so I'll use GUID for the rest of this article. Depending of what type of data you're working with, you might already have GUIDs built into your data that you can make use of. If not, you may have to invent your own mapping from data objects to GUIDs. In this case, you will probably find the <tt>makeGUID()</tt> function (in Utils) useful:
Cu.import("resource://weave/util.js");
1,007
edits

Navigation menu