Molybden API
|
An application update available for download and installation. More...
#include <app_update.hpp>
Public Member Functions | |
virtual std::shared_ptr< App > | app ()=0 |
The current application. | |
virtual std::string | version ()=0 |
The application version in this update. | |
virtual void | install ()=0 |
Downloads and installs the application update. | |
virtual void | dismiss ()=0 |
Dismisses the application update if it is not needed. | |
Additional Inherited Members | |
Public Attributes inherited from molybden::AppUpdateEvents | |
Event< AppUpdateInstalled > | onAppUpdateInstalled |
Invoked when the application update has been installed. | |
Event< AppUpdateFailed > | onAppUpdateFailed |
Invoked when the application update has failed to be installed. | |
Event< AppUpdateProgressChanged > | onAppUpdateProgressChanged |
Invoked when the progress of the application update has been changed. | |
An application update available for download and installation.
|
pure virtual |
Dismisses the application update if it is not needed.
This method does nothing if the application update is already installed or dismissed.
|
pure virtual |
Downloads and installs the application update.
To apply the update, you need to restart the application.
On Windows, the method downloads and extracts the update to a new version directory, e.g. if the current application directory is "~/AppData/Local/MyApp/app-1.0.0" then the new one will be "~/AppData/Local/MyApp/app-1.1.0". After the restart, the older version will be deleted.
On macOS, the method downloads and extracts the update to a temporary directory. The application bundle updates only after quit or restart.
This method does nothing if the application update is already installed or dismissed.