InstallListeners are notified of an AddonInstall's progress. They may be registered to hear events from all AddonInstalls through addInstallListener or to a single AddonInstall through addListener.
Method Overview
void onNewInstall(in AddonInstall install) |
void onDownloadStarted(in AddonInstall install) |
void onDownloadProgress(in AddonInstall install) |
void onDownloadEnded(in AddonInstall install) |
void onDownloadCancelled(in AddonInstall install) |
void onDownloadFailed(in AddonInstall install) |
void onInstallStarted(in AddonInstall install) |
void onInstallEnded(in AddonInstall install, in Addon addon) |
void onInstallCancelled(in AddonInstall install) |
void onInstallFailed(in AddonInstall install) |
void onExternalInstall(in Addon install, in Addon existingAddon, in boolean needsRestart) |
Methods
onNewInstall()
Called when a new instance of AddonInstall is created, primarily so UI can display some kind of progress for all installs.
void onNewInstall(
in AddonInstall install
)
Parameters
- install
- The
AddonInstallrepresenting the install
onDownloadStarted()
Called when downloading begins for an add-on install. Only called for add-ons that need to be downloaded. A listener may return false to cancel the download.
void onDownloadStarted(
in AddonInstall install
)
Parameters
- install
- The
AddonInstallrepresenting the install
onDownloadProgress()
Called as data is received during a download. Check the progress property for the amount of data downloaded and the maxProgress property for the total data expected. A listener may return false to cancel the download.
void onDownloadProgress(
in AddonInstall install
)
Parameters
- install
- The
AddonInstallrepresenting the install
onDownloadEnded()
Called when downloading completes successfully for an add-on install. Only called for add-ons that need to be downloaded.
void onDownloadEnded(
in AddonInstall install
)
Parameters
- install
- The
AddonInstallrepresenting the install
onDownloadCancelled()
Called when downloading is cancelled. Only called for add-ons that need to be downloaded.
void onDownloadCancelled(
in AddonInstall install
)
Parameters
- install
- The
AddonInstallrepresenting the install
onDownloadFailed()
Called if there is some error downloading the add-on. Only called for add-ons that need to be downloaded.
void onDownloadFailed(
in AddonInstall install
)
Parameters
- install
- The
AddonInstallrepresenting the install
onInstallStarted()
Called when installation of an add-on begins. A listener may return false to cancel the install.
void onInstallStarted(
in AddonInstall install
)
Parameters
- install
- The
AddonInstallrepresenting 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.
void onInstallEnded( inAddonInstallinstall inAddonaddon )
Parameters
- install
- The
AddonInstallrepresenting the install - addon
- The
Addonaddon that has been installed
onInstallCancelled()
Called when installation is cancelled.
void onInstallCancelled(
in AddonInstall install
)
Parameters
- install
- The
AddonInstallrepresenting the install
onInstallFailed()
Called when there is a failure installing the add-on.
void onInstallFailed(
in AddonInstall install
)
Parameters
- install
- The
AddonInstallrepresenting the install
onExternalInstall()
Called when an add-on is installed through some system other than an AddonInstall.
void onExternalInstall( inAddonaddon, inAddonexistingAddon, in boolean needsRestart )
