Confirmed users
587
edits
(refactor implementation) |
No edit summary |
||
Line 30: | Line 30: | ||
For add-on objects, providers wishing to opt in to Sync will expose the following read-only properties: | For add-on objects, providers wishing to opt in to Sync will expose the following read-only properties: | ||
; syncData : a string that describes data necessary to synchronize the add-on between clients. The format of the string is not defined. A JSON representation of an object might be a good choice. | ; syncData : a string that describes data necessary to synchronize the add-on between clients. The format of the string is not defined, and is opaque to Sync code. A JSON representation of an object might be a good choice, to hold the data needed by the add-ons manager to install/uninstall an addon. | ||
; syncGUID : a GUID used to identify this add-on across Sync client instances. The GUID should be generated using Utils.makeGUID() from the Sync code. It is basically a Base64-encoded representation of 9 random bytes. | ; syncGUID : a GUID used to identify this add-on across Sync client instances. The GUID should be generated using Utils.makeGUID() from the Sync code. It is basically a Base64-encoded representation of 9 random bytes. | ||
Line 36: | Line 36: | ||
The AddonManager will support the following APIs: | The AddonManager will support the following APIs: | ||
; installAddonFromSyncData( | ; installAddonFromSyncData(syncData, syncGUID, callbackObj) : Installs an add-on from sync data. Receives the data from the original add-on, the GUID it should be installed with, and an object describing callbacks to be invoked when specific events occurs. The manager will try to obtain an install record and then execute the install. | ||
; uninstallAddonBySyncGUID(syncGUID, callbackObj) : Uninstalls an add-on specified by its syncGUID. | ; uninstallAddonBySyncGUID(syncGUID, callbackObj) : Uninstalls an add-on specified by its syncGUID. |