Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsIExtensionManager Interface Reference

Interface representing a system for the installation and management of Extensions, Themes etc. More...

import "nsIExtensionManager.idl";

Inheritance diagram for nsIExtensionManager:
Inheritance graph
[legend]
Collaboration diagram for nsIExtensionManager:
Collaboration graph
[legend]

List of all members.

Public Member Functions

boolean start (in nsICommandLine commandLine)
 Starts the Extension Manager, checking for item changes, additions and removals, and finishing pending operations.
boolean checkForMismatches ()
 Determines if there are incompatible items installed (and offers to upgrade them to newer versions if available, via a UI).
void handleCommandLineArgs (in nsICommandLine cmdline)
 Handle command line flags, e.g.
nsIInstallLocation getInstallLocation (in AString id)
 Gets the Install Location for an item.
void installItemFromFile (in nsIFile xpiFile, in AString installLocationKey)
 Installs an item from a XPI/JAR file into the location specified.
void uninstallItem (in AString id)
 Uninstalls an item.
void enableItem (in AString id)
 Enables a disabled item.
void disableItem (in AString id)
 Disables an enabled item.
void update ([array, size_is(itemCount)] in nsIUpdateItem items, in unsigned long itemCount, in unsigned long versionUpdateOnly, in nsIAddonUpdateCheckListener listener)
 Checks for updates to a list of items.
nsIUpdateItem getItemForID (in AString id)
 Gets a nsIUpdateItem for the item with the specified id.
void getItemList (in unsigned long type, out unsigned long itemCount,[retval, array, size_is(itemCount)] out nsIUpdateItem items)
 Retrieves a list of visible nsIUpdateItems of items matching the specified type.
void getIncompatibleItemList (in AString id, in AString version, in unsigned long type, in boolean includeDisabled, out unsigned long itemCount,[retval, array, size_is(itemCount)] out nsIUpdateItem items)
 Retrieves a list of nsIUpdateItems of items that are incompatible with the supplied parameters.
void addDownloads ([array, size_is(itemCount)] in nsIUpdateItem items, in unsigned long itemCount, in boolean fromChrome)
 Adds active download entries to the UI.
void removeDownload (in AString url)
 Removes an active download from the UI.
long addUpdateListener (in nsIAddonUpdateListener listener)
 Adds a download progress listener so the front end can listen to download and install progress.
void removeUpdateListenerAt (in long index)
 Removes a download progress listener.
void moveToIndexOf (in AString movingID, in AString destinationID)
 Move an Item to the index of another item in its container.
void installExtension (in nsIFile aXPIFile, in unsigned long aFlags)
void installTheme (in nsIFile aJARFile, in unsigned long aFlags)

Public Attributes

readonly attribute
nsISimpleEnumerator 
installLocations
 An enumeration of all registered Install Items.
readonly attribute nsIRDFDataSource datasource
 The Extensions Datasource XXXben - the datasource should be registered with the RDF system, so it can be accessed via rdf:extensions, and not exposed through the API like this.
const unsigned long FLAG_INSTALL_PROFILE = 0x01

Detailed Description

Interface representing a system for the installation and management of Extensions, Themes etc.

XXXben - Some of this stuff should go into a management-ey interface, some into an app-startup-ey interface.

Definition at line 170 of file nsIExtensionManager.idl.


Member Function Documentation

void nsIExtensionManager::addDownloads ( [array, size_is(itemCount)] in nsIUpdateItem  items,
in unsigned long  itemCount,
in boolean  fromChrome 
)

Adds active download entries to the UI.

Parameters:
itemsA list of nsIUpdateItems to entries to add
itemCountThe length of |items|
fromChrometrue when called from chrome false when not called from chrome (e.g. web page)

Adds a download progress listener so the front end can listen to download and install progress.

Parameters:
listenerThe listener to add
Returns:
the index of the added listen in the listener list.

Determines if there are incompatible items installed (and offers to upgrade them to newer versions if available, via a UI).

Returns:
true if there were incompatible items that were disabled and the application needs to restart to re-register components, chrome etc, false otherwise.

Disables an enabled item.

Parameters:
idThe GUID of the item.

Enables a disabled item.

Parameters:
idThe GUID of the item.
void nsIExtensionManager::getIncompatibleItemList ( in AString  id,
in AString  version,
in unsigned long  type,
in boolean  includeDisabled,
out unsigned long  itemCount,
[retval, array, size_is(itemCount)] out nsIUpdateItem  items 
)

Retrieves a list of nsIUpdateItems of items that are incompatible with the supplied parameters.

Parameters:
idThe id of the application to check compatibility against
versionThe version of the application to check compatibility against
typeThe type of item to return
includeDisabledtrue if disabled items should be included in the result set, false otherwise
countRefThe XPCJS reference to the number of items returned.
Returns:
An array of incompatible nsIUpdateItems.

Gets the Install Location for an item.

Parameters:
idThe GUID of the item
Returns:
The Install Location where the item is installed.

Gets a nsIUpdateItem for the item with the specified id.

Parameters:
idThe GUID of the item to construct a nsIUpdateItem for.
Returns:
The nsIUpdateItem representing the item.
void nsIExtensionManager::getItemList ( in unsigned long  type,
out unsigned long  itemCount,
[retval, array, size_is(itemCount)] out nsIUpdateItem  items 
)

Retrieves a list of visible nsIUpdateItems of items matching the specified type.

Parameters:
typeThe type of item to return.
countRefThe XPCJS reference to the number of items returned.
Returns:
An array of nsIUpdateItems matching the id/type filter.

XXXben - it would be good if this function took an optional install location.

Handle command line flags, e.g.

-install-global-[extension|theme]

Parameters:
cmdLinethe command line the application was started with XXXben - move this off this API - currently it is only used for global installation, and the apprunner can do this directly with |installItemFromFile|
void nsIExtensionManager::installExtension ( in nsIFile  aXPIFile,
in unsigned long  aFlags 
)
void nsIExtensionManager::installItemFromFile ( in nsIFile  xpiFile,
in AString  installLocationKey 
)

Installs an item from a XPI/JAR file into the location specified.

Parameters:
xpiFileThe source file to install from. This function stages a copy of this file for persistence across potential application restarts, you are responsible for removing the file you pass in.
installLocationKeyThe name identifier of an Install Location to install into.
void nsIExtensionManager::installTheme ( in nsIFile  aJARFile,
in unsigned long  aFlags 
)
void nsIExtensionManager::moveToIndexOf ( in AString  movingID,
in AString  destinationID 
)

Move an Item to the index of another item in its container.

Parameters:
movingIDThe ID of an item to be moved.
destinationIDThe ID of an item to move an item to.

Removes an active download from the UI.

Parameters:
urlThe URL of the active download to remove

Removes a download progress listener.

Parameters:
indexThe index of the listener to remove.

Starts the Extension Manager, checking for item changes, additions and removals, and finishing pending operations.

Parameters:
commandLineThe command line the application was started with.
Returns:
true if the application has rewritten the extensions.ini file and needs to restart to register components/chrome etc, false otherwise

Uninstalls an item.

Parameters:
idThe GUID of the item.
void nsIExtensionManager::update ( [array, size_is(itemCount)] in nsIUpdateItem  items,
in unsigned long  itemCount,
in unsigned long  versionUpdateOnly,
in nsIAddonUpdateCheckListener  listener 
)

Checks for updates to a list of items.

Parameters:
itemsAn array of nsIUpdateItems to check for updates for.
itemCountThe length of |items|
versionUpdateOnlyfalse if this check should find the newest versions available, true if it should only find newer target application compatibility information for the currently installed version. 2 if this check should only find target application compatibility information for the currently installed version and synchronize the values.
listenerAn nsIAddonUpdateCheckListener object which will be notified during the update check process.

Member Data Documentation

The Extensions Datasource XXXben - the datasource should be registered with the RDF system, so it can be accessed via rdf:extensions, and not exposed through the API like this.

Definition at line 322 of file nsIExtensionManager.idl.

Definition at line 45 of file nsIExtensionManager.idl.

An enumeration of all registered Install Items.

Definition at line 213 of file nsIExtensionManager.idl.


The documentation for this interface was generated from the following files: