OpenTTD Source 20241224-master-gf74b0cf984
|
Structure holding filename and MD5 information about a single file. More...
#include <base_media_base.h>
Public Types | |
enum | ChecksumResult { CR_UNKNOWN , CR_MATCH , CR_MISMATCH , CR_NO_FILE } |
The result of a checksum check. More... | |
Public Member Functions | |
ChecksumResult | CheckMD5 (Subdirectory subdir, size_t max_size) const |
Calculate and check the MD5 hash of the supplied filename. | |
Data Fields | |
std::string | filename |
filename | |
MD5Hash | hash |
md5 sum of the file | |
std::string | missing_warning |
warning when this file is missing | |
ChecksumResult | check_result |
cached result of md5 check | |
Structure holding filename and MD5 information about a single file.
Definition at line 25 of file base_media_base.h.
The result of a checksum check.
Definition at line 27 of file base_media_base.h.
MD5File::ChecksumResult MD5File::CheckMD5 | ( | Subdirectory | subdir, |
size_t | max_size | ||
) | const |
Calculate and check the MD5 hash of the supplied filename.
subdir | The sub directory to get the files from |
max_size | Only calculate the hash for this many bytes from the file start. |
Definition at line 436 of file gfxinit.cpp.
References CR_MATCH, CR_MISMATCH, CR_NO_FILE, filename, FioFOpenFile(), and hash.
Referenced by BaseSet< T, Tnum_files, Tsearch_in_tars >::CheckMD5(), and GraphicsSet::CheckMD5().
ChecksumResult MD5File::check_result |
cached result of md5 check
Definition at line 37 of file base_media_base.h.
std::string MD5File::filename |
filename
Definition at line 34 of file base_media_base.h.
Referenced by CheckExternalFiles(), GraphicsSet::CheckMD5(), CheckMD5(), BaseSet< T, Tnum_files, Tsearch_in_tars >::FillSetDetails(), and LoadSpriteTables().
MD5Hash MD5File::hash |
md5 sum of the file
Definition at line 35 of file base_media_base.h.
Referenced by CheckMD5(), and TryGetBaseSetFile().
std::string MD5File::missing_warning |
warning when this file is missing
Definition at line 36 of file base_media_base.h.
Referenced by CheckExternalFiles().