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
83 : name(name_), hash(hash_), state(state_), timestamp(timestamp_) { }
uint64 const timestamp
Definition UpdateFetcher.h:88
State const state
Definition UpdateFetcher.h:87
std::string const name
Definition UpdateFetcher.h:85
std::string const hash
Definition UpdateFetcher.h:86

Member Function Documentation

◆ GetStateAsString()

std::string UpdateFetcher::AppliedFileEntry::GetStateAsString ( ) const
inline
124 {
125 return StateConvert(state);
126 }
static State StateConvert(std::string const &state)
Definition UpdateFetcher.h:90

Referenced by UpdateFetcher::UpdateEntry().

◆ StateConvert() [1/2]

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

◆ StateConvert() [2/2]

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

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

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