sbIBundle Interface Reference

Songbird Bundle Interface This is the main bundle management interface, used to get the bundle data, perform and observe the download process, list the bundle content and install bundled extensions. More...

List of all members.

Public Member Functions

void retrieveBundleFile ()
 Begin downloading the bundle data asynchronously This method begins the asynchronous download of bundle data. Use sbIBundleObserver to monitor progress.
void addBundleObserver (in sbIBundleObserver observer)
 Add a bundle observer This method registers a bundle observer object associated with the download of bundle data in order to get error and completion callbacks.
void removeBundleObserver (in sbIBundleObserver observer)
 Remove a bundle observer This method unregisters a bundle observer object from the list of bundle callbacks.
long getStatus ()
 Gets the status of bundle download This method returns the status of the asynchronous bundle download process.
nsISupports getBundleDocument ()
 Gets the DOM document describing the downloaded bundle This method returns an interface to the bundle DOM document describing each bundled extension.
AString getTextData ()
 Gets the bundle document xml in text format This method returns the xml for the bundle document describing each bundled extension in text format.
AString getBundleVersion ()
 Gets the version of the downloaded bundle This method returns the version of the downloaded bundle, as extracted from the document's data.
boolean getExtensionInstallState (in long idx)
 Gets the installation flag for a bundled extension This method returns the installation flag associated with a particular bundled extension. The flag is then used by installSelectedExtensions to determine which, extension should be installed.
void setExtensionInstallState (in long idx, in boolean installstate)
 Sets the installation flag for a bundled extension This method sets the installation flag associated with a particular bundled extension.
void installSelectedExtensions (in nsISupports window)
 Install specified bundled extensions This method installs the extensions whose install flags are set to true. A dialog box showing the installer's progress will be spawned.
AString downloadFile (in AString url, in sbIDownloadObserver observer)
 Download a file This method asynchronously downloads a file from a URL and sends progress callbacks to the specified sbiDownloadObserver object.
void deleteLastDownloadedFile ()
 Deletes a temporary download file This method deletes the local file associated with the last downloadFile call.
long installXPI (in AString localFilename)
 Install an extension This method installs an XPI extension previously downloaded locally.
void setNeedRestart (in boolean needed)
 Sets the flag indicating that a restart is needed This method sets the flag indicating that a restart of the application is needed in order for installed extensions to take effect.
long getNeedRestart ()
 Gets the flag indicating that a restart is needed This method gets the flag indicating whether a restart of the application is needed or not, in order for installed extensions to take effect.
long getNumExtensions ()
 Gets the number of extensions in the bundle document This method returns the number of extensions listed in the bundled document.
AString getExtensionName (in long index)
 Gets the name of an extension from the bundle document This method returns the name of a an extensions listed in the bundled document.
AString getExtensionDesc (in long index)
 Gets the description of an extension from the bundle document This method returns the description of a an extensions listed in the bundled document.
AString getExtensionURL (in long index)
 Gets the URL of an extension from the bundle document This method returns the URL of a an extensions listed in the bundled document.
AString getExtesionId (in long index)
 Gets the Id of an extension from the bundle document This method returns the Id of a an extensions listed in the bundled document.
AString getTempFilename ()
 Creates a temporary filename This method returns a temporary filename that is guaranteed not to already exist and points to the user's temporary files' directory.


Detailed Description

Songbird Bundle Interface This is the main bundle management interface, used to get the bundle data, perform and observe the download process, list the bundle content and install bundled extensions.

See also:
sbIBundleObserver, sbIDownloadObserver

Definition at line 23 of file sbIBundle.idl.


Member Function Documentation

void sbIBundle::addBundleObserver ( in sbIBundleObserver  observer  ) 

Add a bundle observer This method registers a bundle observer object associated with the download of bundle data in order to get error and completion callbacks.

Parameters:
observer The observer object to register
See also:
sbIBundleObserver

void sbIBundle::deleteLastDownloadedFile (  ) 

Deletes a temporary download file This method deletes the local file associated with the last downloadFile call.

Parameters:
url The url for the file to download
observer The observer object for progress and error callbacks
Returns:
The local temporary filename which will be used to store the downloaded file.
See also:
downloadFile

AString sbIBundle::downloadFile ( in AString  url,
in sbIDownloadObserver  observer 
)

Download a file This method asynchronously downloads a file from a URL and sends progress callbacks to the specified sbiDownloadObserver object.

Parameters:
url The url for the file to download
observer The observer object for progress and error callbacks
Returns:
The local temporary filename which will be used to store the downloaded file.
See also:
deleteLastDownloadedFile, sbIDownloadObserver

nsISupports sbIBundle::getBundleDocument (  ) 

Gets the DOM document describing the downloaded bundle This method returns an interface to the bundle DOM document describing each bundled extension.

Returns:
A Document interface to the bundle DOM document

AString sbIBundle::getBundleVersion (  ) 

Gets the version of the downloaded bundle This method returns the version of the downloaded bundle, as extracted from the document's data.

Returns:
The bundle's version

AString sbIBundle::getExtensionDesc ( in long  index  ) 

Gets the description of an extension from the bundle document This method returns the description of a an extensions listed in the bundled document.

Parameters:
index The index of the extension within the bundle document (zero based)
Returns:
description of the extension
See also:
getBundleDocument, getExtensionName, getExtensionURL, getExtensionId

boolean sbIBundle::getExtensionInstallState ( in long  idx  ) 

Gets the installation flag for a bundled extension This method returns the installation flag associated with a particular bundled extension. The flag is then used by installSelectedExtensions to determine which, extension should be installed.

Parameters:
idx Index of the extension whose flag you wish to retrieve
Returns:
The extension's installation flag (boolean)
See also:
setExtensionInstallState, installSelectedExtensions

AString sbIBundle::getExtensionName ( in long  index  ) 

Gets the name of an extension from the bundle document This method returns the name of a an extensions listed in the bundled document.

Parameters:
index The index of the extension within the bundle document (zero based)
Returns:
Name of the extension
See also:
getBundleDocument, getExtensionDesc, getExtensionURL, getExtensionId

AString sbIBundle::getExtensionURL ( in long  index  ) 

Gets the URL of an extension from the bundle document This method returns the URL of a an extensions listed in the bundled document.

Parameters:
index The index of the extension within the bundle document (zero based)
Returns:
URL of the extension
See also:
getBundleDocument, getExtensionName, getExtensionDesc, getExtensionId

AString sbIBundle::getExtesionId ( in long  index  ) 

Gets the Id of an extension from the bundle document This method returns the Id of a an extensions listed in the bundled document.

Parameters:
index The index of the extension within the bundle document (zero based)
Returns:
Id for the extension
See also:
getBundleDocument, getExtensionName, getExtensionDesc, getExtensionURL

long sbIBundle::getNeedRestart (  ) 

Gets the flag indicating that a restart is needed This method gets the flag indicating whether a restart of the application is needed or not, in order for installed extensions to take effect.

Returns:
Value of the flag
See also:
setNeedRestart

long sbIBundle::getNumExtensions (  ) 

Gets the number of extensions in the bundle document This method returns the number of extensions listed in the bundled document.

Returns:
Number of extensions
See also:
getBundleDocument, getExtensionName, getExtensionDesc, getExtensionURL, getExtensionId

long sbIBundle::getStatus (  ) 

Gets the status of bundle download This method returns the status of the asynchronous bundle download process.

Returns:
The state of the bundle download process: 0 while downloading, 1 after success, -1 after error

AString sbIBundle::getTempFilename (  ) 

Creates a temporary filename This method returns a temporary filename that is guaranteed not to already exist and points to the user's temporary files' directory.

Returns:
Temporary filename
See also:
downloadFile, deleteLastDownloadedFile

AString sbIBundle::getTextData (  ) 

Gets the bundle document xml in text format This method returns the xml for the bundle document describing each bundled extension in text format.

Returns:
An XML bundle document

void sbIBundle::installSelectedExtensions ( in nsISupports  window  ) 

Install specified bundled extensions This method installs the extensions whose install flags are set to true. A dialog box showing the installer's progress will be spawned.

Parameters:
window The parent for the progress dialog box
See also:
setExtensionInstallState, getExtensionInstallState

long sbIBundle::installXPI ( in AString  localFilename  ) 

Install an extension This method installs an XPI extension previously downloaded locally.

Parameters:
localFilenale The local filename for the XPI to install
Returns:
Indicates the installation's success (1) or failure (0, ie: not a valid XPI, could not be installed).
See also:
downloadFile

void sbIBundle::removeBundleObserver ( in sbIBundleObserver  observer  ) 

Remove a bundle observer This method unregisters a bundle observer object from the list of bundle callbacks.

Parameters:
observer The observer object to unregister
See also:
sbIBundleObserver

void sbIBundle::retrieveBundleFile (  ) 

Begin downloading the bundle data asynchronously This method begins the asynchronous download of bundle data. Use sbIBundleObserver to monitor progress.

See also:
addBundleObserver, removeBundleObserver, sbIBundleObserver

void sbIBundle::setExtensionInstallState ( in long  idx,
in boolean  installstate 
)

Sets the installation flag for a bundled extension This method sets the installation flag associated with a particular bundled extension.

Parameters:
idx Index of the extension whose flag you wish to set
See also:
getExtensionInstallState, installSelectedExtensions

void sbIBundle::setNeedRestart ( in boolean  needed  ) 

Sets the flag indicating that a restart is needed This method sets the flag indicating that a restart of the application is needed in order for installed extensions to take effect.

Parameters:
needed Value of the flag to set
See also:
getNeedRestart


The documentation for this interface was generated from the following file:
Generated on Mon Aug 21 21:01:55 2006 for Songbird by  doxygen 1.4.7