AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
UpdateFetcher::AppliedFileEntry Struct Reference

Public Member Functions

 AppliedFileEntry (std::string const &name_, std::string const &hash_, State state_, uint64 timestamp_)
 
std::string GetStateAsString () const
 

Static Public Member Functions

static State StateConvert (std::string const &state)
 
static std::string StateConvert (State const state)
 

Public Attributes

std::string const name
 
std::string const hash
 
State const state
 
uint64 const timestamp
 

Detailed Description

Constructor & Destructor Documentation

◆ AppliedFileEntry()

UpdateFetcher::AppliedFileEntry::AppliedFileEntry ( std::string const &  name_,
std::string const &  hash_,
State  state_,
uint64  timestamp_ 
)
inline
82 : name(name_), hash(hash_), state(state_), timestamp(timestamp_) { }
uint64 const timestamp
Definition: UpdateFetcher.h:87
State const state
Definition: UpdateFetcher.h:86
std::string const name
Definition: UpdateFetcher.h:84
std::string const hash
Definition: UpdateFetcher.h:85

Member Function Documentation

◆ GetStateAsString()

std::string UpdateFetcher::AppliedFileEntry::GetStateAsString ( ) const
inline
119 {
120 return StateConvert(state);
121 }
static State StateConvert(std::string const &state)
Definition: UpdateFetcher.h:89

Referenced by UpdateFetcher::UpdateEntry().

◆ StateConvert() [1/2]

static std::string UpdateFetcher::AppliedFileEntry::StateConvert ( State const  state)
inlinestatic
102 {
103 switch (state)
104 {
105 case RELEASED:
106 return "RELEASED";
107 case CUSTOM:
108 return "CUSTOM";
109 case MODULE:
110 return "MODULE";
111 case ARCHIVED:
112 return "ARCHIVED";
113 default:
114 return "";
115 }
116 }
@ CUSTOM
Definition: UpdateFetcher.h:74
@ RELEASED
Definition: UpdateFetcher.h:73
@ ARCHIVED
Definition: UpdateFetcher.h:76
@ MODULE
Definition: UpdateFetcher.h:75

◆ StateConvert() [2/2]

static State UpdateFetcher::AppliedFileEntry::StateConvert ( std::string const &  state)
inlinestatic
90 {
91 if (state == "RELEASED")
92 return RELEASED;
93 else if (state == "CUSTOM")
94 return CUSTOM;
95 else if (state == "MODULE")
96 return MODULE;
97
98 return ARCHIVED;
99 }

Referenced by UpdateFetcher::FillFileListRecursively(), UpdateFetcher::ReceiveAppliedFiles(), UpdateFetcher::ReceiveIncludedDirectories(), UpdateFetcher::Update(), and UpdateFetcher::UpdateState().

Member Data Documentation

◆ hash

std::string const UpdateFetcher::AppliedFileEntry::hash

◆ name

std::string const UpdateFetcher::AppliedFileEntry::name

◆ state

State const UpdateFetcher::AppliedFileEntry::state

◆ timestamp

uint64 const UpdateFetcher::AppliedFileEntry::timestamp