Molybden API
Loading...
Searching...
No Matches
molybden::AppUpdate Class Referenceabstract

An application update available for download and installation. More...

#include <app_update.hpp>

Inheritance diagram for molybden::AppUpdate:
molybden::AppUpdateEvents

Public Member Functions

virtual std::shared_ptr< Appapp ()=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< AppUpdateInstalledonAppUpdateInstalled
 Invoked when the application update has been installed.
 
Event< AppUpdateFailedonAppUpdateFailed
 Invoked when the application update has failed to be installed.
 
Event< AppUpdateProgressChangedonAppUpdateProgressChanged
 Invoked when the progress of the application update has been changed.
 

Detailed Description

An application update available for download and installation.

Member Function Documentation

◆ dismiss()

virtual void molybden::AppUpdate::dismiss ( )
pure virtual

Dismisses the application update if it is not needed.

This method does nothing if the application update is already installed or dismissed.

◆ install()

virtual void molybden::AppUpdate::install ( )
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.


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