Transition to json to binary data transfers

This commit is contained in:
Pax1601
2023-06-22 17:28:40 +02:00
parent 9d0e2239e4
commit 1d62b4c115
35 changed files with 827 additions and 862 deletions

View File

@@ -3,4 +3,4 @@
void DllExport log(const std::string& sMessage);
void DllExport log(const std::wstring& sMessage);
void DllExport getLogsJSON(json::value& json, int logsNumber = NULL);
void DllExport getLogsJSON(json::value& json, unsigned int logsNumber = NULL);

View File

@@ -7,7 +7,7 @@ class Logger
public:
void log(const string& sMessage);
void log(const wstring& sMessage);
void toJSON(json::value& json, int logsNumber = NULL);
void toJSON(json::value& json, unsigned int logsNumber = NULL);
static Logger* GetLogger();

View File

@@ -14,7 +14,7 @@ void log(const wstring& message)
LOGGER->log(message);
}
void getLogsJSON(json::value& json, int logsNumber)
void getLogsJSON(json::value& json, unsigned int logsNumber)
{
LOGGER->toJSON(json, logsNumber);
}

View File

@@ -32,10 +32,10 @@ void Logger::Close()
m_Logfile.close();
}
void Logger::toJSON(json::value& json, int logsNumber)
void Logger::toJSON(json::value& json, unsigned int logsNumber)
{
lock_guard<mutex> guard(mutexLock);
int i = 0;
unsigned int i = 0;
for (auto itr = m_logs.end(); itr != m_logs.begin(); --itr)
{
json[to_wstring(m_logs.size() - 1 - i)] = json::value::string(to_wstring(*itr));