|
Page Updated: March 16, 2005
Latest Version: 0.1.375 |
|
Debug |
Install | File
I/O |
RDF |
Network |
Sound | Utils |
XUL | Zip
|
|
|
Home | Mailing List |
Install |
Source Code |
Downloads | Bugs
| docs
| clients |
AutoUpdate
File: install/autoupdate.js
Status: In Flux
Module Identifier: jslib_autoupdate
Fuction List
- Constructor
- AutoUpdate (aURL, aPackagename)
- Creates the AutoUpdate object.
- aURL - a url string of a remote rdf, xpi, or jar file.
- aPackagename - the name of the target package
- aWindow - a browser content window [content] this param is optional
- aCallback - a callback function optional
- Members
- checkForUpdate (aManual)
- Checks to see if there is an update available for the target package. If there is, a confirm prompt will ask the user if they would like to update the package.
- aManual - bool, set to true if the check is
triggered by the user optional
- datasource
- This getter returns the rdf datasource if one is available.
Example
To use the AutoUpdate library:// include auto update lib
include (jslib_autoupdate);
// an rdf style update
var url = "http://mypackage.mozdev.org/conf/update.rdf";
var update = new AutoUpdate(url, "mypackage", content);
update.checkForUpdate();
jslibPrint("datasource: "+update.datasource);
update.rdf:
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<rdf:Description about="urn:mozilla:package:mypackage"
chrome:packageVersion="0.1.26"
chrome:packageURL="http://mypackage.mozdev.org/install/mypackage_current.xpi" />
</rdf:RDF>