diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /dom/system/nsISystemUpdateProvider.idl | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/system/nsISystemUpdateProvider.idl')
-rw-r--r-- | dom/system/nsISystemUpdateProvider.idl | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/dom/system/nsISystemUpdateProvider.idl b/dom/system/nsISystemUpdateProvider.idl new file mode 100644 index 000000000..38e61eb60 --- /dev/null +++ b/dom/system/nsISystemUpdateProvider.idl @@ -0,0 +1,73 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "nsISupports.idl" + +[scriptable, uuid(775edbf5-b4a9-400c-b0ad-ea3c3a027097)] +interface nsISystemUpdateListener : nsISupports +{ + /** + * callback for notifying an update package is available for download. + */ + void onUpdateAvailable(in DOMString type, + in DOMString version, + in DOMString description, + in unsigned long long buildDate, + in unsigned long long size); + + /** + * callback for notifying the download progress. + */ + void onProgress(in unsigned long long loaded, in unsigned long long total); + + /** + * callback for notifying an update package is ready to apply. + */ + void onUpdateReady(); + + /** + * callback for notifying any error while + * checking/downloading/applying an update package. + */ + void onError(in DOMString errMsg); +}; + +[scriptable, uuid(c9b7c166-b9cf-4396-a6de-39275e1c0a36)] +interface nsISystemUpdateProvider : nsISupports +{ + void checkForUpdate(); + void startDownload(); + void stopDownload(); + void applyUpdate(); + + /** + * Set the available parameter to the update provider. + * The available parameter is implementation-dependent. + * e.g. "update-url", "last-update-date", "update-status", "update-interval" + * + * @param name The number of languages. + * @param languages An array of languages. + * @return true when setting an available parameter, + * false when setting an unavailable parameter. + */ + bool setParameter(in DOMString name, in DOMString value); + /** + * Get the available parameter from the update provider. + * The available parameter is implementation-dependent. + * + * @param name The available parameter. + * @return The corresponding value to the name. + * Return null if try to get unavailable parameter. + */ + DOMString getParameter(in DOMString name); + + /** + * NOTE TO IMPLEMENTORS: + * Need to consider if it is necessary to fire the pending event when + * registering the listener. + * (E.g. UpdateAvailable or UpdateReady event.) + */ + void setListener(in nsISystemUpdateListener listener); + void unsetListener(); +}; |