ArcdpsExtension
 
Loading...
Searching...
No Matches
ArcdpsExtension::UpdateCheckerBase Class Referenceabstract

#include <UpdateCheckerBase.h>

Inheritance diagram for ArcdpsExtension::UpdateCheckerBase:

Classes

struct  UpdateState
 

Public Types

enum class  Status {
  Unknown , UpdateAvailable , Dismissed , UpdateInProgress ,
  UpdateSuccessful , UpdateError
}
 
using Version = std::array< WORD, 4 >
 

Public Member Functions

void ClearFiles (HMODULE pDll) noexcept
 
std::unique_ptr< UpdateStateCheckForUpdate (HMODULE pDll, const Version &pCurrentVersion, std::string &&pRepo, bool pAllowPreRelease) noexcept
 
std::unique_ptr< UpdateStateGetInstallState (std::string &&pInstallPath, std::string &&pRepo, bool pAllowPreRelease) noexcept
 
void PerformInstallOrUpdate (UpdateState &pState) noexcept
 
virtual std::optional< std::string > GetPathFromHModule (HMODULE pDll) noexcept
 
std::unique_ptr< UpdateStateGetUpdateInternal (std::string &&pInstallPath, const std::optional< Version > &pCurrentVersion, std::string &&pRepo, bool pAllowPreRelease) noexcept
 
virtual bool IsNewer (const Version &pRepoVersion, const Version &pCurrentVersion)
 
virtual void Log (std::string &&pMessage)
 
virtual Version ParseVersion (std::string_view versionString)
 
bool PerformDownload (const std::string &pUrl, const std::string &pDestinationPath)
 
std::optional< std::tuple< Version, std::string > > GetLatestRelease (std::string &&pRepo, bool pAllowPreRelease)
 
virtual bool HttpDownload (const std::string &pUrl, const std::filesystem::path &pOutputFile)=0
 
virtual std::optional< std::string > HttpGet (const std::string &pUrl)=0
 

Static Public Member Functions

static std::expected< Version, std::string > GetCurrentVersion (HMODULE dll) noexcept
 
static std::string GetVersionAsString (const Version &pVersion)
 

Member Typedef Documentation

◆ Version

using ArcdpsExtension::UpdateCheckerBase::Version = std::array<WORD, 4>

Member Enumeration Documentation

◆ Status

Enumerator
Unknown 
UpdateAvailable 
Dismissed 
UpdateInProgress 
UpdateSuccessful 
UpdateError 

Member Function Documentation

◆ CheckForUpdate()

std::unique_ptr< ArcdpsExtension::UpdateCheckerBase::UpdateState > ArcdpsExtension::UpdateCheckerBase::CheckForUpdate ( HMODULE  pDll,
const Version pCurrentVersion,
std::string &&  pRepo,
bool  pAllowPreRelease 
)
noexcept

◆ ClearFiles()

void ArcdpsExtension::UpdateCheckerBase::ClearFiles ( HMODULE  pDll)
noexcept

◆ GetCurrentVersion()

std::expected< ArcdpsExtension::UpdateCheckerBase::Version, std::string > ArcdpsExtension::UpdateCheckerBase::GetCurrentVersion ( HMODULE  dll)
staticnoexcept

◆ GetInstallState()

std::unique_ptr< ArcdpsExtension::UpdateCheckerBase::UpdateState > ArcdpsExtension::UpdateCheckerBase::GetInstallState ( std::string &&  pInstallPath,
std::string &&  pRepo,
bool  pAllowPreRelease 
)
noexcept

◆ GetLatestRelease()

std::optional< std::tuple< ArcdpsExtension::UpdateCheckerBase::Version, std::string > > ArcdpsExtension::UpdateCheckerBase::GetLatestRelease ( std::string &&  pRepo,
bool  pAllowPreRelease 
)

◆ GetPathFromHModule()

std::optional< std::string > ArcdpsExtension::UpdateCheckerBase::GetPathFromHModule ( HMODULE  pDll)
virtualnoexcept

◆ GetUpdateInternal()

std::unique_ptr< ArcdpsExtension::UpdateCheckerBase::UpdateState > ArcdpsExtension::UpdateCheckerBase::GetUpdateInternal ( std::string &&  pInstallPath,
const std::optional< Version > &  pCurrentVersion,
std::string &&  pRepo,
bool  pAllowPreRelease 
)
noexcept

◆ GetVersionAsString()

std::string ArcdpsExtension::UpdateCheckerBase::GetVersionAsString ( const Version pVersion)
static

◆ HttpDownload()

virtual bool ArcdpsExtension::UpdateCheckerBase::HttpDownload ( const std::string &  pUrl,
const std::filesystem::path &  pOutputFile 
)
pure virtual

◆ HttpGet()

virtual std::optional< std::string > ArcdpsExtension::UpdateCheckerBase::HttpGet ( const std::string &  pUrl)
pure virtual

◆ IsNewer()

bool ArcdpsExtension::UpdateCheckerBase::IsNewer ( const Version pRepoVersion,
const Version pCurrentVersion 
)
virtual

◆ Log()

void ArcdpsExtension::UpdateCheckerBase::Log ( std::string &&  pMessage)
virtual

◆ ParseVersion()

ArcdpsExtension::UpdateCheckerBase::Version ArcdpsExtension::UpdateCheckerBase::ParseVersion ( std::string_view  versionString)
virtual

◆ PerformDownload()

bool ArcdpsExtension::UpdateCheckerBase::PerformDownload ( const std::string &  pUrl,
const std::string &  pDestinationPath 
)

◆ PerformInstallOrUpdate()

void ArcdpsExtension::UpdateCheckerBase::PerformInstallOrUpdate ( UpdateState pState)
noexcept

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