#include <C4Network2Res.h>
Public Member Functions | |
C4Network2ResCore () | |
C4Network2ResType | getType () const |
bool | isNull () const |
int32_t | getID () const |
int32_t | getDerID () const |
bool | isLoadable () const |
uint32_t | getFileSize () const |
uint32_t | getFileCRC () const |
uint32_t | getContentsCRC () const |
bool | hasFileSHA () const |
const uint8_t * | getFileSHA () const |
const char * | getFileName () const |
uint32_t | getChunkSize () const |
uint32_t | getChunkCnt () const |
void | Set (C4Network2ResType eType, int32_t iResID, const char *strFileName, uint32_t iContentsCRC) |
void | SetID (int32_t inID) |
void | SetDerived (int32_t inDerID) |
void | SetLoadable (uint32_t iSize, uint32_t iCRC) |
void | SetFileSHA (BYTE *pSHA) |
void | Clear () |
void | CompileFunc (StdCompiler *pComp) override |
C4NetIOPacket | pack (const C4NetIO::addr_t &addr=C4NetIO::addr_t()) const |
C4NetIOPacket | pack (uint8_t cStatus, const C4NetIO::addr_t &addr=C4NetIO::addr_t()) const |
void | unpack (const C4NetIOPacket &Pkt, char *pStatus=nullptr) |
Protected Attributes | |
C4Network2ResType | eType {NRT_Null} |
int32_t | iID {-1} |
int32_t | iDerID {-1} |
StdCopyStrBuf | FileName |
bool | fLoadable {false} |
uint32_t | iFileSize |
uint32_t | iFileCRC |
uint32_t | iContentsCRC |
uint8_t | fHasFileSHA {false} |
uint8_t | FileSHA [SHA_DIGEST_LENGTH] |
uint32_t | iChunkSize |
Definition at line 68 of file C4Network2Res.h.
C4Network2ResCore::C4Network2ResCore | ( | ) |
Definition at line 74 of file C4Network2Res.cpp.
void C4Network2ResCore::Clear | ( | ) |
Definition at line 97 of file C4Network2Res.cpp.
References StdStrBuf::Clear(), eType, fHasFileSHA, FileName, fLoadable, iContentsCRC, iDerID, iFileCRC, iFileSize, iID, and NRT_Null.
Referenced by C4PlayerInfo::Clear(), C4Network2Res::Clear(), C4PlayerInfo::DiscardResource(), and C4Network2::RemoveDynamic().
|
overridevirtual |
Implements C4PacketBase.
Definition at line 109 of file C4Network2Res.cpp.
References C4NetResChunkSize, C4Network2ResType_EnumMap, eType, StdCompiler::excCorrupt(), fHasFileSHA, FileName, FileSHA, fLoadable, iChunkSize, iContentsCRC, iDerID, iFileCRC, iFileSize, iID, mkHexAdapt(), mkNamingAdapt(), mkNamingCountAdapt(), mkNetFilenameAdapt(), NRT_Null, and StdCompiler::Value().
|
inline |
Definition at line 96 of file C4Network2Res.h.
References iChunkSize, and iFileSize.
Referenced by C4Network2Res::FinishDerive(), C4Network2Res::GetStandalone(), C4Network2Res::SendChunk(), C4Network2Res::SetLoad(), and C4Network2Res::StartLoad().
|
inline |
Definition at line 95 of file C4Network2Res.h.
References iChunkSize.
Referenced by C4Network2ResChunk::AddTo(), and C4Network2ResChunk::Set().
|
inline |
Definition at line 91 of file C4Network2Res.h.
References iContentsCRC.
Referenced by C4Network2Res::SetByCore().
|
inline |
Definition at line 87 of file C4Network2Res.h.
References iDerID.
Referenced by C4Network2Res::FinishDerive().
|
inline |
Definition at line 90 of file C4Network2Res.h.
References iFileCRC.
Referenced by C4Network2Res::GetStandalone().
|
inline |
Definition at line 94 of file C4Network2Res.h.
References FileName, and StdStrBuf::getData().
Referenced by C4Network2ResList::AddByCore(), C4Network2ResList::AddLoad(), C4Network2ResChunk::AddTo(), C4Network2Res::Derive(), C4Network2Res::FinishDerive(), C4GameRes::InitNetwork(), C4Network2Res::OnChunk(), C4Network2ResList::OnResComplete(), C4ControlJoinPlayer::PreRec(), C4GameResList::RetrieveFiles(), C4Network2::RetrieveRes(), C4Network2Res::SetByCore(), C4Network2Res::SetLoad(), and C4Network2Res::StartLoad().
|
inline |
|
inline |
Definition at line 89 of file C4Network2Res.h.
References iFileSize.
Referenced by C4Network2ResChunk::AddTo(), C4Network2Res::GetStandalone(), and C4Network2ResChunk::Set().
|
inline |
Definition at line 86 of file C4Network2Res.h.
References iID.
Referenced by C4Network2ResList::AddByCore(), C4Network2Res::getResClient(), C4Network2Res::getResID(), C4PlayerInfo::LoadResource(), C4ControlJoinPlayer::PreExecute(), C4ControlJoinPlayer::PreRec(), C4MessageInput::ProcessCommand(), C4Network2::RemoveDynamic(), C4Network2::RetrieveRes(), C4Network2Res::SendStatus(), C4Network2Res::SetByCore(), C4Network2Res::SetLoad(), and C4Network2Res::StartLoad().
|
inline |
Definition at line 84 of file C4Network2Res.h.
References eType.
Referenced by C4GameRes::CompileFunc(), C4Network2Res::getType(), C4GameRes::InitNetwork(), C4Network2Res::OptimizeStandalone(), C4Network2Res::SetByCore(), and C4GameRes::SetResCore().
|
inline |
Definition at line 92 of file C4Network2Res.h.
References fHasFileSHA.
Referenced by C4Network2Res::CalculateSHA().
|
inline |
Definition at line 88 of file C4Network2Res.h.
References fLoadable.
Referenced by C4Network2ResList::AddByCore(), C4Network2ResList::AddLoad(), C4Network2Res::GetStandalone(), C4GameRes::InitNetwork(), and C4Network2Res::SetLoad().
|
inline |
Definition at line 85 of file C4Network2Res.h.
References eType, and NRT_Null.
Referenced by C4Network2::Execute(), C4Network2::RetrieveRes(), and C4Network2::SendJoinData().
|
inherited |
Definition at line 150 of file C4Packet2.cpp.
Referenced by MkC4NetIOPacket().
|
inherited |
Definition at line 155 of file C4Packet2.cpp.
References mkDecompileAdapt(), and mkInsertAdapt().
void C4Network2ResCore::Set | ( | C4Network2ResType | eType, |
int32_t | iResID, | ||
const char * | strFileName, | ||
uint32_t | iContentsCRC | ||
) |
Definition at line 80 of file C4Network2Res.cpp.
References C4NetResChunkSize, StdStrBuf::Copy(), eType, FileName, fLoadable, iChunkSize, iContentsCRC, iDerID, iFileCRC, iFileSize, and iID.
Referenced by C4Network2Res::SetByFile(), C4Network2Res::SetByGroup(), and C4Network2Res::SetDerived().
|
inline |
Definition at line 100 of file C4Network2Res.h.
References iDerID.
Referenced by C4Network2Res::FinishDerive(), and C4Network2Res::SetDerived().
|
inline |
Definition at line 102 of file C4Network2Res.h.
References fHasFileSHA, FileSHA, and SHA_DIGEST_LENGTH.
Referenced by C4Network2Res::CalculateSHA().
|
inline |
Definition at line 99 of file C4Network2Res.h.
References iID.
Referenced by C4Network2Res::ChangeID().
void C4Network2ResCore::SetLoadable | ( | uint32_t | iSize, |
uint32_t | iCRC | ||
) |
Definition at line 90 of file C4Network2Res.cpp.
References fLoadable, iFileCRC, iFileSize, and iSize.
Referenced by C4Network2Res::GetStandalone().
|
inherited |
Definition at line 160 of file C4Packet2.cpp.
References C4NetIOPacket::getPBuf(), C4NetIOPacket::getRef(), and C4NetIOPacket::getStatus().
Referenced by C4IDPacket::C4IDPacket(), and C4Network2IO::HandlePacket().
|
protected |
Definition at line 74 of file C4Network2Res.h.
Referenced by Clear(), CompileFunc(), getType(), isNull(), and Set().
|
protected |
Definition at line 79 of file C4Network2Res.h.
Referenced by Clear(), CompileFunc(), hasFileSHA(), and SetFileSHA().
|
protected |
Definition at line 76 of file C4Network2Res.h.
Referenced by Clear(), CompileFunc(), getFileName(), and Set().
|
protected |
Definition at line 80 of file C4Network2Res.h.
Referenced by CompileFunc(), getFileSHA(), and SetFileSHA().
|
protected |
Definition at line 77 of file C4Network2Res.h.
Referenced by Clear(), CompileFunc(), isLoadable(), Set(), and SetLoadable().
|
protected |
Definition at line 81 of file C4Network2Res.h.
Referenced by CompileFunc(), getChunkCnt(), getChunkSize(), and Set().
|
protected |
Definition at line 78 of file C4Network2Res.h.
Referenced by Clear(), CompileFunc(), getContentsCRC(), and Set().
|
protected |
Definition at line 75 of file C4Network2Res.h.
Referenced by Clear(), CompileFunc(), getDerID(), Set(), and SetDerived().
|
protected |
Definition at line 78 of file C4Network2Res.h.
Referenced by Clear(), CompileFunc(), getFileCRC(), Set(), and SetLoadable().
|
protected |
Definition at line 78 of file C4Network2Res.h.
Referenced by Clear(), CompileFunc(), getChunkCnt(), getFileSize(), Set(), and SetLoadable().
|
protected |
Definition at line 75 of file C4Network2Res.h.
Referenced by Clear(), CompileFunc(), getID(), Set(), and SetID().