DDraceNetwork Documentation
Loading...
Searching...
No Matches
CUpdater Class Reference

#include <updater.h>

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

Public Member Functions

 CUpdater ()
EUpdaterState GetCurrentState () override REQUIRES(!m_Lock)
void GetCurrentFile (char *pBuf, int BufSize) override REQUIRES(!m_Lock)
int GetCurrentPercent () override REQUIRES(!m_Lock)
void InitiateUpdate () REQUIRES(!m_Lock) override
void Init (CHttp *pHttp)
void Update () REQUIRES(!m_Lock) override
Public Member Functions inherited from IInterface
 IInterface ()
virtual void Shutdown ()
virtual ~IInterface ()=default

Private Member Functions

EUpdaterState m_State GUARDED_BY (m_Lock)
char m_aStatus[256] GUARDED_BY (m_Lock)
int m_Percent GUARDED_BY (m_Lock)
void AddFileJob (const char *pFile, bool Job)
void FetchFile (const char *pFile, const char *pDestPath=nullptr) REQUIRES(!m_Lock)
bool MoveFile (const char *pFile)
void ParseUpdate () REQUIRES(!m_Lock)
void PerformUpdate () REQUIRES(!m_Lock)
void RunningUpdate () REQUIRES(!m_Lock)
void CommitUpdate () REQUIRES(!m_Lock)
bool ReplaceClient ()
bool ReplaceServer ()
void SetCurrentState (EUpdaterState NewState) REQUIRES(!m_Lock)

Private Attributes

class IClientm_pClient
class IStoragem_pStorage
class IEnginem_pEngine
class CHttpm_pHttp
CLock m_Lock
char m_aClientExecTmp [64]
char m_aServerExecTmp [64]
std::forward_list< std::pair< std::string, bool > > m_FileJobs
std::shared_ptr< CUpdaterFetchTaskm_pCurrentTask
decltype(m_FileJobs) ::iterator m_CurrentJob
bool m_ClientUpdate
bool m_ServerUpdate
bool m_ClientFetched
bool m_ServerFetched

Friends

class CUpdaterFetchTask

Additional Inherited Members

Public Types inherited from IUpdater
enum  EUpdaterState {
  CLEAN , GETTING_MANIFEST , GOT_MANIFEST , PARSING_UPDATE ,
  DOWNLOADING , MOVE_FILES , NEED_RESTART , FAIL
}
Static Public Member Functions inherited from IUpdater
static const char * InterfaceName ()
Protected Member Functions inherited from IInterface
IKernelKernel ()

Constructor & Destructor Documentation

◆ CUpdater()

CUpdater::CUpdater ( )

Member Function Documentation

◆ AddFileJob()

void CUpdater::AddFileJob ( const char * pFile,
bool Job )
private

◆ CommitUpdate()

void CUpdater::CommitUpdate ( )
private

◆ FetchFile()

void CUpdater::FetchFile ( const char * pFile,
const char * pDestPath = nullptr )
private

◆ GetCurrentFile()

void CUpdater::GetCurrentFile ( char * pBuf,
int BufSize )
overridevirtual

Implements IUpdater.

◆ GetCurrentPercent()

int CUpdater::GetCurrentPercent ( )
overridevirtual

Implements IUpdater.

◆ GetCurrentState()

IUpdater::EUpdaterState CUpdater::GetCurrentState ( )
overridevirtual

Implements IUpdater.

◆ GUARDED_BY() [1/3]

int m_Percent CUpdater::GUARDED_BY ( m_Lock )
private

◆ GUARDED_BY() [2/3]

char m_aStatus[256] CUpdater::GUARDED_BY ( m_Lock )
private

◆ GUARDED_BY() [3/3]

EUpdaterState m_State CUpdater::GUARDED_BY ( m_Lock )
private

◆ Init()

void CUpdater::Init ( CHttp * pHttp)

◆ InitiateUpdate()

void CUpdater::InitiateUpdate ( )
overridevirtual

Implements IUpdater.

◆ MoveFile()

bool CUpdater::MoveFile ( const char * pFile)
private

◆ ParseUpdate()

void CUpdater::ParseUpdate ( )
private

◆ PerformUpdate()

void CUpdater::PerformUpdate ( )
private

◆ ReplaceClient()

bool CUpdater::ReplaceClient ( )
private

◆ ReplaceServer()

bool CUpdater::ReplaceServer ( )
private

◆ RunningUpdate()

void CUpdater::RunningUpdate ( )
private

◆ SetCurrentState()

void CUpdater::SetCurrentState ( EUpdaterState NewState)
private

◆ Update()

void CUpdater::Update ( )
overridevirtual

Implements IUpdater.

◆ CUpdaterFetchTask

friend class CUpdaterFetchTask
friend

Member Data Documentation

◆ m_aClientExecTmp

char CUpdater::m_aClientExecTmp[64]
private

◆ m_aServerExecTmp

char CUpdater::m_aServerExecTmp[64]
private

◆ m_ClientFetched

bool CUpdater::m_ClientFetched
private

◆ m_ClientUpdate

bool CUpdater::m_ClientUpdate
private

◆ m_CurrentJob

decltype(m_FileJobs) ::iterator CUpdater::m_CurrentJob
private

◆ m_FileJobs

std::forward_list<std::pair<std::string, bool> > CUpdater::m_FileJobs
private

◆ m_Lock

CLock CUpdater::m_Lock
private

◆ m_pClient

class IClient* CUpdater::m_pClient
private

◆ m_pCurrentTask

std::shared_ptr<CUpdaterFetchTask> CUpdater::m_pCurrentTask
private

◆ m_pEngine

class IEngine* CUpdater::m_pEngine
private

◆ m_pHttp

class CHttp* CUpdater::m_pHttp
private

◆ m_pStorage

class IStorage* CUpdater::m_pStorage
private

◆ m_ServerFetched

bool CUpdater::m_ServerFetched
private

◆ m_ServerUpdate

bool CUpdater::m_ServerUpdate
private

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