canmove, Confirmed users
1,570
edits
No edit summary |
|||
| Line 32: | Line 32: | ||
==AddonInstall== | ==AddonInstall== | ||
The [[Extension Manager:API Rewrite:API#AddonInstall|AddonInstall]] object represents an add-on that is not yet installed. Again this is a loose definition, technically an AddonInstall object exists for add-ons that have just been installed. Essentially this object begins representing an add-on that can be installed (and may come from an update check to an existing add-on, a request to install a new add-on or a search for new add-ons). It tracks the high level progress of any necessary downloads and installation of the add-on. | The [[Extension Manager:API Rewrite:API#AddonInstall|AddonInstall]] object represents an add-on that is not yet installed. Again this is a loose definition, technically an AddonInstall object exists for add-ons that have just been installed. Essentially this object begins representing an add-on that can be installed (and may come from an update check to an existing add-on, a request to install a new add-on or a search for new add-ons). It tracks the high level progress of any necessary downloads and installation of the add-on. | ||
The AddonInstall goes through a set of states: | |||
;Available :Represents an add-on that is known to be available for install. Depending on where the AddonInstall came from there may be very little information about the add-on available. | |||
;Downloading :This state tracks add-on downloads and as such it may not be necessary for add-ons installed from local files for example. | |||
;Downloaded :At this point all the main parts of the add-on's files are somewhere on the local computer to be installed. Almost all information about the add-on should be available at this point through an [[Extension Manager:API Rewrite:API#Addon|Addon]] object. | |||
;Installing :Here the add-on is being installed by its provider. This may cover file extraction etc. | |||
;Checking :In some cases the install may be delayed to allow further work such as compatibility checking. | |||
;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?'' | |||
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== | ||