![]() |
NDEVR
API Documentation
|
Allows the application to check a given location for an update.txt file which it can then use to download and update the software. More...
Public Member Functions | |
| NDEVRUpdateChecker () | |
| Constructs an update checker with no initial version. | |
| NDEVRUpdateChecker (const StringView ¤t_version) | |
| Constructs an update checker for the given application version. | |
| void | onCheckForUpdateComplete () override |
| Called when the asynchronous update check completes to process the result. | |
| void | requestCheckForUpdate (const StringView ¤t_version=StringView()) override |
| Initiates an asynchronous check for software updates. | |
| String | updateURLPage () const override |
| Returns the URL of the page where the user can manually download the update. | |
| Public Member Functions inherited from UpdateChecker | |
| UpdateChecker () | |
| Constructs an UpdateChecker with default settings. | |
| UpdateChecker (StringView update_version) | |
| Constructs an UpdateChecker with a known current version. | |
| void | appStartupCheck () |
| Performs an update check at application startup if enough time has elapsed. | |
| const Buffer< ApplicationResource::ReleaseType > & | availableReleaseTypes () const |
| Returns the list of available release types for this application. | |
| void | checkForUpdateCompletedSignal (UpdateStatus update) |
| Signal emitted when an update check completes. | |
| virtual void | createUpdateFile (const String &installer_url, File output_location) |
| Creates an update file from the given installer URL. | |
| uint08 | currentDownloadSize () const |
| Returns the number of bytes downloaded so far. | |
| virtual String | defaultURLPathName () const |
| Returns the default URL path segment used for update requests. | |
| fltp08 | downloadPercent () const |
| Returns the download progress as a percentage. | |
| virtual INIFactory | getINI () |
| Returns an INI factory configured for update settings. | |
| Time | lastUpdateCheckTime () const |
| Returns the time of the last update check. | |
| void | percentChangedSignal () |
| Signal emitted when download progress changes. | |
| virtual void | processUpdateString (const String &s) |
| Parses an update response string to extract version and URL information. | |
| ApplicationResource::ReleaseType | recommendedReleaseType () const |
| Returns the recommended release type based on user preference and availability. | |
| void | releaseTypesChangedSignal () |
| Signal emitted when the available release types change. | |
| virtual bool | requestInstallUpdate (bool wait_for_completion=false) |
| Requests installation of the downloaded update. | |
| virtual bool | requstDownloadUpdate () |
| Requests download of the available update. | |
| void | setMaxNoUpdateTime (const TimeSpan &max_no_update_check_time) |
| Sets the maximum time between automatic update checks. | |
| void | setReleaseTypes (const Buffer< ApplicationResource::ReleaseType > &types) |
| Sets the available release types for the update checker. | |
| void | setUpdateStatus (UpdateStatus status) |
| Sets the current update status and emits statusChangedSignal. | |
| void | showUpdateDialogIfNeeded () |
| Shows a dialog prompting the user to update if one is available. | |
| void | statusChangedSignal () |
| Signal emitted when the update status changes. | |
| uint08 | totalDownloadSize () const |
| Returns the total size of the update download. | |
| void | updateDownloadCompletedSignal (const File &location) |
| Signal emitted when an update download completes. | |
| File | updateFile () const |
| Returns the local file path of the downloaded update. | |
| virtual String | updateName () const |
| Returns the file name of the available update. | |
| virtual bool | updateRequiresApplicationClose () const |
| Returns whether the update requires closing the application first. | |
| UpdateStatus | updateStatus () const |
| Returns the current update status. | |
| virtual bool | updateSupported () const |
| Returns whether software updates are supported on this platform. | |
| virtual String | updateURLDownload () const |
| Returns the direct download URL for the update. | |
| virtual String | updateVersion () const |
| Returns the version string of the available update. | |
Public Attributes | |
| Resource< String > | manual_update_location |
| The URL for manual update downloads. | |
| Resource< String > | update_address |
| The network address to check for update.txt. | |
Protected Attributes | |
| ItemDownloader * | m_check_update |
| The downloader used to fetch the update check file. | |
| Protected Attributes inherited from UpdateChecker | |
| String | m_current_version |
| The current application version string. | |
| File | m_download_location |
| The local file path for downloaded updates. | |
| QPointer< ItemDownloader > | m_downloader |
| The downloader managing the update file transfer. | |
| Time | m_last_application_update_check |
| The time of the last update check. | |
| TimeSpan | m_max_no_update_time |
| The maximum allowed time between automatic update checks. | |
| Buffer< ApplicationResource::ReleaseType > | m_release_types |
| The available release types. | |
| String | m_update_file_name |
| The file name of the available update. | |
| String | m_update_url |
| The download URL for the available update. | |
| String | m_update_version |
| The version string of the available update. | |
Additional Inherited Members | |
| Public Types inherited from UpdateChecker | |
| enum | UpdateStatus { e_need_to_check , e_no_new_updates , e_update_available_to_download , e_update_available_to_install , e_could_not_connect , e_unsupported } |
| The possible states of the update check/download lifecycle. More... | |
| Static Public Attributes inherited from UpdateChecker | |
| static ApplicationOption< ApplicationResource::ReleaseType > | release_check_type |
| The user's preferred release type for update checks. | |
| Protected Member Functions inherited from UpdateChecker | |
| void | checkForUpdateCompleteSlot () |
| Slot invoked when the update check network request completes. | |
| void | onUpdateDownloadCompleteSlot () |
| Slot invoked when the update file download completes. | |
Allows the application to check a given location for an update.txt file which it can then use to download and update the software.
Definition at line 13 of file NDEVRUpdateChecker.h.
| NDEVRUpdateChecker::NDEVRUpdateChecker | ( | const StringView & | current_version | ) |
Constructs an update checker for the given application version.
| [in] | current_version | The current version string of the application. |
|
overridevirtual |
Initiates an asynchronous check for software updates.
| [in] | current_version | The current version to compare against. If empty, uses the stored version. |
Implements UpdateChecker.
|
overridevirtual |
Returns the URL of the page where the user can manually download the update.
Implements UpdateChecker.