canmove, Confirmed users
1,570
edits
No edit summary |
No edit summary |
||
| Line 162: | Line 162: | ||
The contributors of the add-on. | The contributors of the add-on. | ||
==pendingOperations (number)== | ==pendingOperations (number, readonly)== | ||
A bitfield holding all of the current operations that are waiting to be performed for this add-on. Operations are generally deferred when a restart is necessary to accomplish them. | A bitfield holding all of the current operations that are waiting to be performed for this add-on. Operations are generally deferred when a restart is necessary to accomplish them. | ||
==permissions (number)== | ==permissions (number, readonly)== | ||
A bitfield holding all the the operations that can be performed on this add-on. Operations my be restricted based on system policies (e.g. the system administrator may not allow certain add-ons to be uninstalled), add-on type (e.g. themes may not be disabled) or add-on state (e.g. an incompatible add-on cannot be enabled). | A bitfield holding all the the operations that can be performed on this add-on. Operations my be restricted based on system policies (e.g. the system administrator may not allow certain add-ons to be uninstalled), add-on type (e.g. themes may not be disabled) or add-on state (e.g. an incompatible add-on cannot be enabled). | ||
| Line 188: | Line 188: | ||
=AddonInstall= | =AddonInstall= | ||
Represents an add-on installation through various states from being available through to being installed. Some of the properties may not be accurate depending on where the install came from and may change once the add-on has been downloaded and checked. | |||
==name (string, readonly)== | |||
The name of the add-on being installed. | |||
==version (string, readonly)== | |||
The version of the add-on being installed. | |||
==type (string, readonly)== | |||
The type of the add-on being installed. | |||
==state (number, readonly)== | |||
The state of the installation. | |||
==sourceURL (string, readonly)== | |||
The url that the add-on is being installed from. | |||
==file (nsIFile, readonly)== | |||
The file that the add-on is being installed from. This may be null if the add-on is coming from the internet and has yet to be downloaded. | |||
==progress (number, readonly)== | |||
The progress of any necessary download. | |||
==maxProgress (number, readonly)== | |||
The expected size of any necessary download or -1 if unknown. | |||
==addon ([[#Addon|Addon]] readonly)== | |||
The add-on that this install will update if it is an update or null otherwise. | |||
==startDownload== | |||
Starts downloading the add-on if a download is necessary. Will notify the registered install observers during the download process. | |||
==startInstall== | |||
Starts installing the add-on. Will notify the registered install observers during the process. | |||
=AddonListener= | =AddonListener= | ||
| Line 213: | Line 259: | ||
;addon :The [[#Addon|Addon]] that was being checked for updates | ;addon :The [[#Addon|Addon]] that was being checked for updates | ||
;error :An error code or 0 if there was no error | |||
=InstallListener= | =InstallListener= | ||
An InstallListener is notified during add-on downloads and installs. | |||
==onDownloadStarted== | |||
Called when downloading begins for an add-on install. Only called for add-ons that need to be downloaded. | |||
;install :The [[#AddonInstall|AddonInstall]] representing the install | |||
==onDownloadEnded== | |||
Called when downloading ends for an add-on install. Only called for add-ons that need to be downloaded. | |||
'''TODO''' Should the install continue or should the consumer need to call <code>startInstall</code>? | |||
;install :The [[#AddonInstall|AddonInstall]] representing the install | |||
==onDownloadFailed== | |||
Called if there is some error downloading the add-on. Only called for add-ons that need to be downloaded. | |||
;install :The [[#AddonInstall|AddonInstall]] representing the install | |||
;error :An exception representing the error | |||
==onInstallStarted== | |||
Called when installation of an add-on begins. | |||
;install :The [[#AddonInstall|AddonInstall]] representing the install | |||
==onInstallEnded== | |||
Called when installation of an add-on is complete. The newly installed add-on may require a restart in order to become active. | |||
;install :The [[#AddonInstall|AddonInstall]] representing the install | |||
;addon :The newly installed [[#Addon|Addon]] | |||
==onInstallFailed== | |||
Called when there is a failure installing the add-on. | |||
;install :The [[#AddonInstall|AddonInstall]] representing the install | |||
;error :An exception representing the error | |||