canmove, Confirmed users
1,570
edits
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
=AddonManager= | =AddonManager= | ||
The AddonManager is the global API that allows access to all types of add-ons. It hides the differences in implementations presenting a standard interface to developers. | |||
==getInstallForURL== | ==getInstallForURL== | ||
| Line 75: | Line 77: | ||
=Addon= | =Addon= | ||
An Addon represents an instance of an installed add-on. It is a live view of the add-on. | |||
==id (string, readonly)== | |||
The ID of the add-on. No other installed add-on will have the same ID. | |||
==version (string, readonly)== | |||
The version of the add-on. | |||
==type (string, readonly)== | |||
The type of the add-on. | |||
==optionsURL (string, readonly)== | |||
The url of the options dialog to display for this add-on. | |||
==aboutURL (string, readonly)== | |||
The url of the about dialog to display for this add-on. | |||
==iconURL (string, readonly)== | |||
The url of the icon that represents this add-on. | |||
==isCompatible (boolean, readonly)== | |||
True or false depending on whether the add-on is compatible with the current version and platform of the application. | |||
==providesUpdatesSecurely (boolean, readonly)== | |||
True if the add-on has a secure means of updating. | |||
==satisfiesDependencies (boolean, readonly)== | |||
True if all requirements for this add-on are installed and enabled. | |||
'''TODO''' rename this to something better. | |||
==blocklistState (number, readonly)== | |||
The current blocklist state of this add-on. | |||
==appDisabled (boolean, readonly)== | |||
True if this add-on cannot be used in the application based on version compatibility, dependencies and blocklisting. | |||
==userDisabled (boolean)== | |||
True if the user wants this add-on to be disabled. | |||
'''TODO''' Make setting this asynchronous | |||
==isActive (boolean, readonly)== | |||
True if the add-on is currently functional. For some add-ons this will change immediately based on the appDisabled and userDisabled properties, for others it will only change after an application restart. | |||
==name (string, readonly)== | |||
The name of the add-on. | |||
==description (string, readonly)== | |||
The description of the add-on. | |||
==creator (string, readonly)== | |||
The creator of the add-on. | |||
==homepageURL (string, readonly)== | |||
The homepageURL of the add-on. | |||
==developers (string array, readonly)== | |||
The developers of the add-on. | |||
==translators (string array, readonly)== | |||
The translators of the add-on. | |||
==contributors (string array, readonly)== | |||
The contributors of the add-on. | |||
==pendingOperations (number)== | |||
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)== | |||
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). | |||
==uninstall== | |||
Uninstalls this add-on. If possible the uninstall will happen immediately otherwise it will wait until the next application restart. | |||
'''TODO''' This should be asynchronous. | |||
==cancelUninstall== | |||
Cancels uninstalling an add-on if it is pending uninstall. | |||
==findUpdates== | |||
Starts an update check for this add-on. This will perform asynchronously and deliver results to the given listener. | |||
;listener :An [[#UpdateListener|UpdateListener]] for the update process | |||
;appVersion :An application version to check for updates for (optional) | |||
;platformVersion :A platform version to check for updates for (optional) | |||
=AddonInstall= | =AddonInstall= | ||
=AddonListener= | =AddonListener= | ||
=UpdateListener= | |||
Notification about events during an update check for an add-on are passed to an update listener. <code>onUpdateFinished</code> will always be called. | |||
==onCompatibilityUpdated== | |||
Called when new compatibility information has been found for the installed version of an add-on. | |||
;addon :The [[#Addon|Addon]] that was being checked for updates | |||
==onUpdateAvailable== | |||
Called when a new version of an add-on has been found for install. | |||
;addon :The [[#Addon|Addon]] that was being checked for updates | |||
;install :An [[#AddonInstall|AddonInstall]] for the updated version | |||
==onUpdateFinished== | |||
Called when the update check is complete. | |||
;addon :The [[#Addon|Addon]] that was being checked for updates | |||
=InstallListener= | =InstallListener= | ||