SearchCallbacks are notified when the
AddonRepository search completes. If the search succeeded, then
searchSucceeded() is called and is passed an array of
Addon objects that matched the search. Since these
Addons are not actually installed, the
AddonManager does not know about them. However, for each returned add-on, an
AddonInstall object is created, which the
AddonManager does know about. Each
AddonInstall can be accessed through the
install attribute, and is initially in the
STATE_AVAILABLE state. The array of
Addons passed to
searchSucceeded() only includes add-ons that are compatible with the current application and are not already installed or being installed. The
AddonRepository is available for another search once one of the callback functions is called.
Called when a successful search completes.
void searchAddons( in Addon addons, in integer addonCount, in integer totalResults );
- Array of
Addonobjects representing the add-ons found by the search. The array represents a subset of the total add-ons available in the repository that match the search.
- The number of add-ons returned. Note,
addons.length == addonCount.
- The total number of results available in the repository.
Called when a search results in failure. A new search will immediately fail if
AddonRepository is completing another search request.