nsIExtensionManager

IID:a3f5396c-a6e8-414a-8fbc-c8d831746328
Inherits From:nsISupports

This interface is implemented by the following components:


Properties

readonly 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.

readonly nsISimpleEnumerator installLocations

An enumeration of all registered Install Items


Methods

void addDownloads ( nsIUpdateItem items , PRUint32 itemCount , PRBool fromChrome ) PRInt32 addUpdateListener ( nsIAddonUpdateListener listener ) PRBool checkForMismatches ( ) void disableItem ( AString id ) void enableItem ( AString id ) void getIncompatibleItemList ( AString id , AString version , PRUint32 type , PRBool includeDisabled , out PRUint32 itemCount , out nsIUpdateItem items ) nsIInstallLocation getInstallLocation ( AString id ) nsIUpdateItem getItemForID ( AString id ) void getItemList ( PRUint32 type , out PRUint32 itemCount , out nsIUpdateItem items ) void handleCommandLineArgs ( nsICommandLine cmdline ) void installItemFromFile ( nsIFile xpiFile , AString installLocationKey ) void moveToIndexOf ( AString movingID , AString destinationID ) void removeDownload ( AString url ) void removeUpdateListenerAt ( PRInt32 index ) PRBool start ( nsICommandLine commandLine ) void uninstallItem ( AString id ) void update ( nsIUpdateItem items , PRUint32 itemCount , PRUint32 versionUpdateOnly , nsIAddonUpdateCheckListener listener )

void addDownloads ( nsIUpdateItem items , PRUint32 itemCount , PRBool fromChrome )

Adds active download entries to the UI

Arguments:
items: A list of nsIUpdateItems to entries to add
itemCount: The length of |items|
fromChrome: true when called from chrome false when not called from chrome (e.g. web page)

PRInt32 addUpdateListener ( nsIAddonUpdateListener listener )

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

Arguments:
listener: The listener to add

PRBool checkForMismatches ( )

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


void disableItem ( AString id )

Disables an enabled item

Arguments:
id: The GUID of the item.

void enableItem ( AString id )

Enables a disabled item

Arguments:
id: The GUID of the item.

void getIncompatibleItemList ( AString id , AString version , PRUint32 type , PRBool includeDisabled , out PRUint32 itemCount , out nsIUpdateItem items )

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

Arguments:
id: The id of the application to check compatibility against
version: The version of the application to check compatibility against
type: The type of item to return
includeDisabled: true if disabled items should be included in the result set, false otherwise
itemCount
items

nsIInstallLocation getInstallLocation ( AString id )

Gets the Install Location for an item

Arguments:
id: The GUID of the item

nsIUpdateItem getItemForID ( AString id )

Gets a nsIUpdateItem for the item with the specified id.

Arguments:
id: The GUID of the item to construct a nsIUpdateItem for.

void getItemList ( PRUint32 type , out PRUint32 itemCount , out nsIUpdateItem items )

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

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

Arguments:
type: The type of item to return.
itemCount
items

void handleCommandLineArgs ( nsICommandLine cmdline )

Handle command line flags, e.g. -install-global-[extensiontheme]

Arguments:
cmdline

void installItemFromFile ( nsIFile xpiFile , AString installLocationKey )

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

Arguments:
xpiFile: The 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.
installLocationKey: The name identifier of an Install Location to install into.

void moveToIndexOf ( AString movingID , AString destinationID )

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

Arguments:
movingID: The ID of an item to be moved.
destinationID: The ID of an item to move an item to.

void removeDownload ( AString url )

Removes an active download from the UI

Arguments:
url: The URL of the active download to remove

void removeUpdateListenerAt ( PRInt32 index )

Removes a download progress listener.

Arguments:
index: The index of the listener to remove.

PRBool start ( nsICommandLine commandLine )

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

Arguments:
commandLine: The command line the application was started with.

void uninstallItem ( AString id )

Uninstalls an item

Arguments:
id: The GUID of the item.

void update ( nsIUpdateItem items , PRUint32 itemCount , PRUint32 versionUpdateOnly , nsIAddonUpdateCheckListener listener )

Checks for updates to a list of items.

Arguments:
items: An array of nsIUpdateItems to check for updates for.
itemCount: The length of |items|
versionUpdateOnly: false 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.
listener: An nsIAddonUpdateCheckListener object which will be notified during the update check process.

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com