API Documentation
Loading...
Searching...
No Matches
UpdateChecker Class Referenceabstract

Provides logic for checking a source, typically online, for an update to the software. More...

#include <UpdateChecker.h>

Inheritance diagram for UpdateChecker:
[legend]
Collaboration diagram for UpdateChecker:
[legend]

Public Types

enum  ReleaseChannel { e_alpha = 0 , e_beta = 1 , e_release = 2 , e_lts_release = 3 }
 
enum  UpdateStatus {
  e_need_to_check , e_no_new_updates , e_update_available_to_download , e_update_available_to_install ,
  e_could_not_connect
}
 

Signals

void checkForUpdateCompletedSignal (UpdateStatus update)
 
void percentChangedSignal ()
 
void statusChangedSignal ()
 
void updateDownloadCompletedSignal (const File &location)
 

Public Member Functions

void appStartupCheck ()
 
virtual void createUpdateFile (const String &installer_url, File output_location)
 
uint08 currentDownloadSize () const
 
virtual String defaultURLPathName () const
 
fltp08 downloadPercent () const
 
virtual INIFactory getINI ()
 
Time lastUpdateCheckTime () const
 
virtual void processUpdateString (const String &s)
 
virtual void requestCheckForUpdate (const String &current_version="")=0
 
virtual bool requestInstallUpdate (bool wait_for_completion=false)
 
virtual bool requstDownloadUpdate ()
 
void setMaxNoUpdateTime (const TimeSpan &max_no_update_check_time)
 
void setUpdateStatus (UpdateStatus status)
 
void showUpdateDialogIfNeeded ()
 
uint08 totalDownloadSize () const
 
 UpdateChecker ()
 
 UpdateChecker (String update_version)
 
File updateFile () const
 
virtual String updateName () const
 
virtual bool updateRequiresApplicationClose () const
 
UpdateStatus updateStatus () const
 
virtual bool updateSupported () const
 
virtual String updateURLDownload () const
 
virtual String updateURLPage () const =0
 
virtual String updateVersion () const
 

Protected Slots

void checkForUpdateCompleteSlot ()
 
void onUpdateDownloadCompleteSlot ()
 

Protected Member Functions

virtual void onCheckForUpdateComplete ()
 

Protected Attributes

String m_current_version
 
File m_download_location
 
ItemDownloaderm_downloader
 
Time m_last_application_update_check
 
TimeSpan m_max_no_update_time
 
String m_update_file_name
 
String m_update_url
 
String m_update_version
 

Detailed Description

Provides logic for checking a source, typically online, for an update to the software.


Member Enumeration Documentation

◆ ReleaseChannel

Enumerator
e_alpha 
e_beta 
e_release 
e_lts_release 

◆ UpdateStatus

Enumerator
e_need_to_check 
e_no_new_updates 
e_update_available_to_download 
e_update_available_to_install 
e_could_not_connect 

Constructor & Destructor Documentation

◆ UpdateChecker() [1/2]

◆ UpdateChecker() [2/2]

UpdateChecker ( String update_version)

Member Function Documentation

◆ appStartupCheck()

void appStartupCheck ( )

◆ checkForUpdateCompletedSignal

void checkForUpdateCompletedSignal ( UpdateStatus update)
signal

◆ checkForUpdateCompleteSlot

void checkForUpdateCompleteSlot ( )
protectedslot

◆ createUpdateFile()

virtual void createUpdateFile ( const String & installer_url,
File output_location )
virtual

◆ currentDownloadSize()

uint08 currentDownloadSize ( ) const

◆ defaultURLPathName()

virtual String defaultURLPathName ( ) const
virtual

◆ downloadPercent()

fltp08 downloadPercent ( ) const

◆ getINI()

virtual INIFactory getINI ( )
virtual

◆ lastUpdateCheckTime()

Time lastUpdateCheckTime ( ) const

◆ onCheckForUpdateComplete()

virtual void onCheckForUpdateComplete ( )
inlineprotectedvirtual

Reimplemented in NDEVRUpdateChecker.

◆ onUpdateDownloadCompleteSlot

void onUpdateDownloadCompleteSlot ( )
protectedslot

◆ percentChangedSignal

void percentChangedSignal ( )
signal

◆ processUpdateString()

virtual void processUpdateString ( const String & s)
virtual

◆ requestCheckForUpdate()

virtual void requestCheckForUpdate ( const String & current_version = "")
pure virtual

Implemented in NDEVRUpdateChecker.

◆ requestInstallUpdate()

virtual bool requestInstallUpdate ( bool wait_for_completion = false)
virtual

◆ requstDownloadUpdate()

virtual bool requstDownloadUpdate ( )
virtual

◆ setMaxNoUpdateTime()

void setMaxNoUpdateTime ( const TimeSpan & max_no_update_check_time)

◆ setUpdateStatus()

void setUpdateStatus ( UpdateStatus status)

◆ showUpdateDialogIfNeeded()

void showUpdateDialogIfNeeded ( )

◆ statusChangedSignal

void statusChangedSignal ( )
signal

◆ totalDownloadSize()

uint08 totalDownloadSize ( ) const

◆ updateDownloadCompletedSignal

void updateDownloadCompletedSignal ( const File & location)
signal

◆ updateFile()

File updateFile ( ) const

◆ updateName()

virtual String updateName ( ) const
inlinevirtual

◆ updateRequiresApplicationClose()

virtual bool updateRequiresApplicationClose ( ) const
virtual

◆ updateStatus()

UpdateStatus updateStatus ( ) const

◆ updateSupported()

virtual bool updateSupported ( ) const
virtual

◆ updateURLDownload()

virtual String updateURLDownload ( ) const
inlinevirtual

◆ updateURLPage()

virtual String updateURLPage ( ) const
pure virtual

Implemented in NDEVRUpdateChecker.

◆ updateVersion()

virtual String updateVersion ( ) const
inlinevirtual

Member Data Documentation

◆ m_current_version

String m_current_version
protected

◆ m_download_location

File m_download_location
protected

◆ m_downloader

ItemDownloader* m_downloader
protected

◆ m_last_application_update_check

Time m_last_application_update_check
protected

◆ m_max_no_update_time

TimeSpan m_max_no_update_time
protected

◆ m_update_file_name

String m_update_file_name
protected

◆ m_update_url

String m_update_url
protected

◆ m_update_version

String m_update_version
protected

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