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

#include <UpdateChecker.h>

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

Public Types

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 updateDownloadCompletedSignal (const File &location)
 
void percentChangedSignal ()
 
void statusChangedSignal ()
 

Public Member Functions

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

Static Public Member Functions

static void setApplicationUpdateChecker (UpdateChecker *checker)
 
static UpdateCheckerApplicationUpdateChecker ()
 
static Time CompileTime ()
 

Protected Slots

void onUpdateDownloadCompleteSlot ()
 
void checkForUpdateCompleteSlot ()
 

Protected Member Functions

virtual void _onCheckForUpdateComplete ()
 

Protected Attributes

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

Static Protected Attributes

static UpdateCheckers_app_update_checker = nullptr
 

Member Enumeration Documentation

◆ 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

◆ _onCheckForUpdateComplete()

virtual void _onCheckForUpdateComplete ( )
inlineprotectedvirtual

Reimplemented in NDEVRUpdateChecker.

◆ ApplicationUpdateChecker()

UpdateChecker * ApplicationUpdateChecker ( )
static

◆ appStartupCheck()

void appStartupCheck ( )

◆ checkForUpdateCompletedSignal

void checkForUpdateCompletedSignal ( UpdateStatus update)
signal

◆ checkForUpdateCompleteSlot

void checkForUpdateCompleteSlot ( )
protectedslot

◆ CompileTime()

Time CompileTime ( )
static

◆ createUpdateFile()

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

◆ currentDownloadSize()

uint08 currentDownloadSize ( ) const

◆ defaultURLPathName()

String defaultURLPathName ( ) const
virtual

◆ downloadPercent()

fltp08 downloadPercent ( ) const

◆ getINI()

INIFactory getINI ( )
virtual

◆ lastUpdateCheckTime()

Time lastUpdateCheckTime ( ) const

◆ onUpdateDownloadCompleteSlot

void onUpdateDownloadCompleteSlot ( )
protectedslot

◆ percentChangedSignal

void percentChangedSignal ( )
signal

◆ processUpdateString()

void processUpdateString ( const String & s)
virtual

◆ requestCheckForUpdate()

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

Implemented in NDEVRUpdateChecker.

◆ requestInstallUpdate()

bool requestInstallUpdate ( bool wait_for_completion = false)
virtual

◆ requstDownloadUpdate()

bool requstDownloadUpdate ( )
virtual

◆ setApplicationUpdateChecker()

void setApplicationUpdateChecker ( UpdateChecker * checker)
static

◆ 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()

bool updateRequiresApplicationClose ( ) const
virtual

◆ updateStatus()

UpdateChecker::UpdateStatus updateStatus ( ) const

◆ updateSupported()

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

◆ s_app_update_checker

UpdateChecker * s_app_update_checker = nullptr
staticprotected

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