Menu

ADIC_API

Kevin Cox

ADIC API

ADIC has an API that is available to all addons. The API is in the file chrome://adic/content/adic.jsm. Some functions use callbacks because the underlying API's use callbacks.

ADIC.checkID(id, callback)

id is the id of an extension and callback will be called with one argument. The argument will be ADIC.NO_ADDON (which is equal to 0) if the addon doesn't exist, ADIC.ADDON_FOUND if the addon exists but does not have an adic.jsm file or ADIC.ADIC_ENABLED if it does have an adic.jsm.

ADIC.checkCode(code)

DEPRECIATED - this will be removed in the future.

Returns true if "extensions."+code+"." has preferences under it.

ADIC.gatherInfo(id, callback, extra)

Calls callback with a string argument, and an object. The first argument is the resulting info, the second argument is extra data. The following values are present in the data object.

  • warnFiles is an array of strings that are odd files that the extension has requested.

id is extension id as a string.

extra is an optional object. The following values are used (if present).

  • overide is an object exactly equivalent to the one from adic.jsm where any defined values will be used instead of the ones in adic.jsm.
  • merge is an object that has the list or object values in adic.jsm where any defined values will be appended to the ones in adic.jsm.

Related

Wiki: AddonDevs

MongoDB Logo MongoDB