CloudServices/Sync/FxSync/Archived/AddDataType: Difference between revisions

Jump to navigation Jump to search
m
m (→‎Create your Store: style changes)
Line 29: Line 29:
* <tt>_createCommand()</tt>, <tt>_removeCommand()</tt>, and <tt>_editCommand()</tt>: are called by the synchronization algorithm, in order to update the contents of your store.  The argument passed to each one is a command object describing what user data should be created in the store, removed from the store, or updated within the store, respectively.
* <tt>_createCommand()</tt>, <tt>_removeCommand()</tt>, and <tt>_editCommand()</tt>: are called by the synchronization algorithm, in order to update the contents of your store.  The argument passed to each one is a command object describing what user data should be created in the store, removed from the store, or updated within the store, respectively.


The command object which gets passed into these has a <tt>GUID</tt> property, which uniquely identifies which item in the store is to be affected.  The property will correspond to the GUID keys of the JSON dictionary that you return from <tt>wrap()</tt>.  The command object additionally has a <tt>data</tt> property which, in the case of <tt>_createCommand()</tt> and <tt>_editCommand()</tt>, contains the new data to be applied to the store.
:::The command object which gets passed into these has a <tt>GUID</tt> property, which uniquely identifies which item in the store is to be affected; it will correspond to the GUID keys of the JSON dictionary that you return from <tt>wrap()</tt>.  The command object additionally has a <tt>data</tt> property which, in the case of <tt>_createCommand()</tt> and <tt>_editCommand()</tt>, contains the new data to be applied to the store.


== Create your SyncCore ==
== Create your SyncCore ==
874

edits

Navigation menu