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

import"sbIBundle.idl";

Inheritance diagram for sbIBundle:
[legend]
Collaboration diagram for sbIBundle:
[legend]

Public Member Functions

void retrieveBundleData (in long aTimeout)
 Begin downloading the bundle data asynchronously This method begins the asynchronous download of bundle data. Use sbIBundleDataListener to monitor progress. More...
 
void retrieveLocalBundleData ()
 Download the bundle data synchronously from a local file. More...
 
void addBundleDataListener (in sbIBundleDataListener aListener)
 Add a bundle data listener This method registers a bundle observer object associated with the download of bundle data in order to get error and completion callbacks. More...
 
void removeBundleDataListener (in sbIBundleDataListener aListener)
 Remove a bundle data listener This method unregisters a bundle observer object from the list of bundle callbacks. More...
 
void removeExtension (in long aIndex)
 Remove an extension from the bundle extension list. More...
 
AString getExtensionAttribute (in long aIndex, in AString aAttributeName)
 Gets an extension's attribute from its xml document source This method returns the corresponding attribute for a specified extension entry in the XML bundle document. More...
 
boolean getExtensionInstallFlag (in long aIndex)
 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 installFlaggedExtensions to determine which, extension should be installed. More...
 
void setExtensionInstallFlag (in long aIndex, in boolean aInstallFlag)
 Sets the installation flag for a bundled extension This method sets the installation flag associated with a particular bundled extension. More...
 
void addBundleInstallListener (in sbIBundleInstallListener aListener)
 Add a bundle install listener This method registers a bundle install listener in order to get error and completion callbacks. More...
 
void removeBundleInstallListener (in sbIBundleInstallListener aListener)
 Remove a bundle install listener This method unregisters a bundle install listener object from the list of callbacks. More...
 
long installFlaggedExtensions (in nsIDOMWindow aWindow)
 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. More...
 

Public Attributes

attribute AString bundleId
 Bundle channel ID Sets the bundle channel ID. This is used to construct the bundle data url. Use sbIBundleDataListener to monitor progress. More...
 
attribute AString bundleURL
 Bundle URL Sets the bundle URL. This is the location of the bundle. Use sbIBundleDataListener to monitor progress. More...
 
readonly attribute long bundleDataStatus
 Status of the bundle download. More...
 
const long BUNDLE_DATA_STATUS_ERROR = -1
 
const long BUNDLE_DATA_STATUS_DOWNLOADING = 0
 
const long BUNDLE_DATA_STATUS_SUCCESS = 1
 
readonly attribute nsIDOMDocument bundleDataDocument
 DOM document for the bundle data. The interface to the bundle DOM document describing the bundled extensions. More...
 
readonly attribute AString bundleDataText
 Bundle document xml in text format. The XML for the bundle document describing the bundled extension, in raw text format. More...
 
readonly attribute AString bundleDataVersion
 Version of the downloaded bundle data. The Version of the downloaded bundle, as extracted from the document's data. More...
 
readonly attribute long bundleExtensionCount
 Number of extensions in the bundle document. More...
 
const long BUNDLE_INSTALL_ERROR = 0
 
const long BUNDLE_INSTALL_SUCCESS = 1
 
readonly attribute boolean restartRequired
 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. More...
 

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
sbIBundleDataListener, sbIBundleInstallListener

Definition at line 50 of file sbIBundle.idl.

Member Function Documentation

void sbIBundle::addBundleDataListener ( in sbIBundleDataListener  aListener)

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

Parameters
observerThe observer object to register
See Also
sbIBundleDataListener
void sbIBundle::addBundleInstallListener ( in sbIBundleInstallListener  aListener)

Add a bundle install listener This method registers a bundle install listener in order to get error and completion callbacks.

Parameters
listenerThe listener object to register
See Also
sbIBundleInstallListener
AString sbIBundle::getExtensionAttribute ( in long  aIndex,
in AString  aAttributeName 
)

Gets an extension's attribute from its xml document source This method returns the corresponding attribute for a specified extension entry in the XML bundle document.

Parameters
aIndexThe index of the extension within the bundle document (zero based)
aAttributeThe name of the attribute to retrieve
Returns
value of the attribute
See Also
bundleDataDocument
boolean sbIBundle::getExtensionInstallFlag ( in long  aIndex)

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 installFlaggedExtensions to determine which, extension should be installed.

Parameters
idxIndex of the extension whose flag you wish to retrieve
Returns
The extension's installation flag
See Also
setExtensionInstallFlag, installFlaggedExtensions
long sbIBundle::installFlaggedExtensions ( in nsIDOMWindow  aWindow)

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.

const long BUNDLE_INSTALL_ERROR = 0; const long BUNDLE_INSTALL_SUCCESS = 1;

Parameters
windowThe parent for the progress dialog box
See Also
setExtensionInstallFlag, getExtensionInstallFlag
Returns
The result of the download and installation attempt
void sbIBundle::removeBundleDataListener ( in sbIBundleDataListener  aListener)

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

Parameters
observerThe observer object to unregister
See Also
sbIBundleDataListener
void sbIBundle::removeBundleInstallListener ( in sbIBundleInstallListener  aListener)

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

Parameters
listenerThe listener object to unregister
See Also
sbIBundleInstallListener
void sbIBundle::removeExtension ( in long  aIndex)

Remove an extension from the bundle extension list.

Parameters
aIndexThe index of the extension to remove
void sbIBundle::retrieveBundleData ( in long  aTimeout)

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

Parameters
timeoutMaximum time in milliseconds to wait for the server response. Specify 0 to use the system socket timeout.
See Also
addBundleDataListener, removeBundleDataListener, sbIBundleDataListener
void sbIBundle::retrieveLocalBundleData ( )

Download the bundle data synchronously from a local file.

void sbIBundle::setExtensionInstallFlag ( in long  aIndex,
in boolean  aInstallFlag 
)

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

Parameters
idxIndex of the extension whose flag you wish to set or clear
See Also
getExtensionInstallFlag, installFlaggedExtensions

Member Data Documentation

const long sbIBundle::BUNDLE_DATA_STATUS_DOWNLOADING = 0

Definition at line 108 of file sbIBundle.idl.

const long sbIBundle::BUNDLE_DATA_STATUS_ERROR = -1

Definition at line 107 of file sbIBundle.idl.

const long sbIBundle::BUNDLE_DATA_STATUS_SUCCESS = 1

Definition at line 109 of file sbIBundle.idl.

const long sbIBundle::BUNDLE_INSTALL_ERROR = 0

Definition at line 199 of file sbIBundle.idl.

const long sbIBundle::BUNDLE_INSTALL_SUCCESS = 1

Definition at line 200 of file sbIBundle.idl.

readonly attribute nsIDOMDocument sbIBundle::bundleDataDocument

DOM document for the bundle data. The interface to the bundle DOM document describing the bundled extensions.

Definition at line 115 of file sbIBundle.idl.

readonly attribute long sbIBundle::bundleDataStatus

Status of the bundle download.

const long BUNDLE_DATA_STATUS_ERROR = -1; const long BUNDLE_DATA_STATUS_DOWNLOADING = 0; const long BUNDLE_DATA_STATUS_SUCCESS = 1;

Definition at line 106 of file sbIBundle.idl.

readonly attribute AString sbIBundle::bundleDataText

Bundle document xml in text format. The XML for the bundle document describing the bundled extension, in raw text format.

Definition at line 121 of file sbIBundle.idl.

readonly attribute AString sbIBundle::bundleDataVersion

Version of the downloaded bundle data. The Version of the downloaded bundle, as extracted from the document's data.

Definition at line 127 of file sbIBundle.idl.

readonly attribute long sbIBundle::bundleExtensionCount

Number of extensions in the bundle document.

See Also
bundleDataDocument, getExtensionAttribute

Definition at line 133 of file sbIBundle.idl.

attribute AString sbIBundle::bundleId

Bundle channel ID Sets the bundle channel ID. This is used to construct the bundle data url. Use sbIBundleDataListener to monitor progress.

See Also
addBundleDataListener, removeBundleDataListener, sbIBundleDataListener

Definition at line 58 of file sbIBundle.idl.

attribute AString sbIBundle::bundleURL

Bundle URL Sets the bundle URL. This is the location of the bundle. Use sbIBundleDataListener to monitor progress.

See Also
addBundleDataListener, removeBundleDataListener, sbIBundleDataListener

Definition at line 66 of file sbIBundle.idl.

readonly attribute boolean sbIBundle::restartRequired

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

Definition at line 208 of file sbIBundle.idl.


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