Extension Manager:API Rewrite: Difference between revisions

Line 35: Line 35:
;Installed :Here the add-on has been installed and its Addon object will appear in AddonManager.getAddons. The add-on itself however may not be active until after an application restart.
;Installed :Here the add-on has been installed and its Addon object will appear in AddonManager.getAddons. The add-on itself however may not be active until after an application restart.


''These states are modelled on the current states XPI add-ons go through. Are they right?''
Once the install process for an AddonInstall is started it will move through all of the states naturally sending out notifications at each transition and some progress events in between until either an error is encountered or the install is stopped by calling <code>stopInstall</code> or the install completes successfully.
 
In some ways it may make more sense for the checking phase to come between downloading and downloaded. This way when in the downloaded state we will know everything necessary to say whether installing is possible.
 
''Should we automatically jump to states?''
 
If we have an AddonInstall for a local file should we jump straight to Downlaoded? Perhaps not if we move checking to earlier as suggested above.
 
If we start an add-on download should it jump straight to installing as soon as downloading is complete and installation is known to be possible or should that be controlled through the API? In the latter case should we allow installation through the API even if the add-on is incompatible or has some other fault? I think it might be a good option in the API even if not exposed through the UI normally. It allows for better customisation on an application level or by extensions.


==Add-on Providers==
==Add-on Providers==
canmove, Confirmed users
1,570

edits