Batch #11564 by cremane: 0 byte-identical, 2 confirmed by peer review. - fn_03975 CEmblemDataMgr::CompleteDownload: logic confirmed by peer review - fn_03967 CEmblemDataDownloadAsyncWork::Complete: logic confirmed by peer review Peer-reviewed-by: Yommy, KWDev Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
40 lines
1.2 KiB
C++
40 lines
1.2 KiB
C++
#ifndef RAGNAROK_SOURCE_CONTENTS_EMBLEMS_EMBLEMDATAMGR_H
|
|
#define RAGNAROK_SOURCE_CONTENTS_EMBLEMS_EMBLEMDATAMGR_H
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
|
|
class LuaScript;
|
|
class CConnection;
|
|
class CAsyncWorkMgr;
|
|
struct AsyncDiagnostic;
|
|
|
|
class CEmblemDataMgr {
|
|
public:
|
|
CEmblemDataMgr();
|
|
virtual ~CEmblemDataMgr();
|
|
static bool Initialize();
|
|
static void Shutdown();
|
|
void RefreshUrls(LuaScript& settings, LuaScript& tables, const char* host, const char* port, const char* overrideKey);
|
|
void Download(
|
|
std::uint32_t guildId, std::uint32_t version, std::uint32_t accountId, const std::string& accountName, const char* token16, CConnection& connection,
|
|
CAsyncWorkMgr& manager
|
|
);
|
|
bool Upload(std::uint32_t guildId, std::string path);
|
|
void CompleteUpload(AsyncDiagnostic diagnostic, std::string response, std::uint32_t guildId);
|
|
void CompleteDownload(AsyncDiagnostic diagnostic, int responseCode, std::string response, std::uint32_t guildId, std::uint32_t version);
|
|
|
|
protected:
|
|
/* 0004 */ bool m_enabled;
|
|
/* 0008 */ std::string m_uploadUrl;
|
|
/* 0020 */ std::string m_downloadUrl;
|
|
/* 0038 */ bool m_uploading;
|
|
};
|
|
|
|
extern CEmblemDataMgr* g_emblemDataMgr;
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(CEmblemDataMgr) == 60);
|
|
#endif
|
|
|
|
#endif
|