Extension Manager:API Rewrite:API: Difference between revisions

Jump to navigation Jump to search
Line 108: Line 108:
An Addon represents an instance of an installed add-on. Some of these listed properties may be relevant for only XPI style add-ons.
An Addon represents an instance of an installed add-on. Some of these listed properties may be relevant for only XPI style add-ons.


==id (string, readonly)==
==Required Properties==
 
===id (string, readonly)===


The ID of the add-on. No other installed add-on will have the same ID.
The ID of the add-on. No other installed add-on will have the same ID.


==version (string, readonly)==
===version (string, readonly)===


The version of the add-on.
The version of the add-on.


==type (string, readonly)==
===type (string, readonly)===


The type of the add-on.
The type of the add-on.


==optionsURL (string, readonly)==
===isCompatible (boolean, readonly)===


The url of the options dialog to display for this add-on.
True or false depending on whether the add-on is compatible with the current version and platform of the application.


==aboutURL (string, readonly)==
===providesUpdatesSecurely (boolean, readonly)===


The url of the about dialog to display for this add-on.
True if the add-on has a secure means of updating.


==iconURL (string, readonly)==
===blocklistState (number, readonly)===


The url of the icon that represents this add-on.
The current blocklist state of this add-on.


==screenshots (array of string, readonly)==
===appDisabled (boolean, readonly)===


The urls of preview images for the add-ons.
True if this add-on cannot be used in the application based on version compatibility, dependencies and blocklisting.


==isCompatible (boolean, readonly)==
===userDisabled (boolean)===


True or false depending on whether the add-on is compatible with the current version and platform of the application.
True if the user wants this add-on to be disabled. Listeners may be notified of the change asynchronously.


==providesUpdatesSecurely (boolean, readonly)==
===scope (number, readonly)===


True if the add-on has a secure means of updating.
Indicates what scope the add-on is installed in, per profile, user, system or application.
 
===updateAutomatically (boolean)===


==satisfiesDependencies (boolean, readonly)==
Whether updates found for this add-on will be applied automatically.


True if all requirements for this add-on are installed and enabled.
===isActive (boolean, readonly)===


'''TODO''' rename this to something better.
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.


==blocklistState (number, readonly)==
===name (string, readonly)===


The current blocklist state of this add-on.
The name of the add-on.


==appDisabled (boolean, readonly)==
===description (string, readonly)===


True if this add-on cannot be used in the application based on version compatibility, dependencies and blocklisting.
The description of the add-on.


==userDisabled (boolean)==
===creator (string, readonly)===


True if the user wants this add-on to be disabled. Listeners may be notified of the change asynchronously.
The creator of the add-on.


==scope (number, readonly)==
===homepageURL (string, readonly)===


Indicates what scope the add-on is installed in, per profile, user, system or application.
The homepageURL of the add-on.
 
===pendingOperations (number, readonly)===


==updateAutomatically (boolean)==
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.


Whether updates found for this add-on will be applied automatically.
===permissions (number, readonly)===


==isActive (boolean, 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).


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.
==Optional Properties==


==installTime (Date, readonly)==
===installDate (Date, readonly, optional)===


The Date that the add-on was first installed.
The Date that the add-on was first installed.


==updateTime (Date, readonly)==
===updateDate (Date, readonly, optional)===


The Date that the add-on was most recently updated.
The Date that the add-on was most recently updated.


==name (string, readonly)==
===optionsURL (string, readonly, optional)===


The name of the add-on.
The url of the options dialog to display for this add-on.


==description (string, readonly)==
===aboutURL (string, readonly, optional)===


The description of the add-on.
The url of the about dialog to display for this add-on.


==creator (string, readonly)==
===iconURL (string, readonly, optional)===


The creator of the add-on.
The url of the icon that represents this add-on.


==homepageURL (string, readonly)==
===screenshots (array of string, readonly, optional)===


The homepageURL of the add-on.
The urls of preview images for the add-ons.


==developers (string array, readonly)==
===developers (string array, readonly, optional)===


The developers of the add-on.
The developers of the add-on.


==translators (string array, readonly)==
===translators (string array, readonly, optional)===


The translators of the add-on.
The translators of the add-on.


==contributors (string array, readonly)==
===contributors (string array, readonly, optional)===


The contributors of the add-on.
The contributors of the add-on.


==pendingUpgrade (Addon, readonly)==
===pendingUpgrade (Addon, readonly, optional)===


If a this add-on will be replaced on the next restart this property will hold the new Addon object.
If a this add-on will be replaced on the next restart this property will hold the new Addon object.


==pendingOperations (number, readonly)==
===install ([[#AddonInstall|AddonInstall]], readonly, optional)===


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.
The [[#AddonInstall|AddonInstall]] that will install this addon. Only available if this addon is in the process of being installed.


==permissions (number, readonly)==
==Required Methods==
 
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).
 
'''TODO''' Rename this property.
 
==install ([[#AddonInstall|AddonInstall]], readonly)==
 
The [[#AddonInstall|AddonInstall]] that will install this addon. Only available if this addon is in the process of being installed.


==isCompatibleWith==
===isCompatibleWith===


Tests whether this add-on is known to be compatible with a particular application and platform version.
Tests whether this add-on is known to be compatible with a particular application and platform version.
Line 235: Line 233:
;platformVersion :A platform version to test against
;platformVersion :A platform version to test against


==uninstall==
===uninstall===


Uninstalls this add-on. If possible the uninstall will happen immediately otherwise it will wait until the next application restart. Listeners may be notified of the uninstall asynchronously.
Uninstalls this add-on. If possible the uninstall will happen immediately otherwise it will wait until the next application restart. Listeners may be notified of the uninstall asynchronously.


==cancelUninstall==
===cancelUninstall===


Cancels uninstalling an add-on if it is pending uninstall.
Cancels uninstalling an add-on if it is pending uninstall.


==findUpdates==
===findUpdates===


Starts an update check for this add-on. This will perform asynchronously and deliver results to the given listener.
Starts an update check for this add-on. This will perform asynchronously and deliver results to the given listener.
Line 257: Line 255:
;platformVersion :A platform version to check for updates for (optional)
;platformVersion :A platform version to check for updates for (optional)


==hasResource==
===hasResource===


Checks whether a file resource is available for this add-on. For XPI style add-ons for example it tests whether the named file was included in the package.
Checks whether a file resource is available for this add-on. For XPI style add-ons for example it tests whether the named file was included in the package.
Line 263: Line 261:
;path :A "/" separated path for the resource.
;path :A "/" separated path for the resource.


==getResourceURL==
===getResourceURL===


Gets a url to the file resource.
Gets a url to the file resource.
canmove, Confirmed users
1,570

edits

Navigation menu