Rename files.

This commit is contained in:
XMRig 2019-03-15 01:50:35 +07:00
parent be5d609856
commit ba01f2a9c4
34 changed files with 88 additions and 87 deletions

View file

@ -23,14 +23,24 @@ set(HEADERS
src/App.h
src/base/io/Json.h
src/base/io/Watcher.h
src/base/kernel/Entry.h
src/base/kernel/interfaces/IClientListener.h
src/base/kernel/interfaces/IConfigListener.h
src/base/kernel/interfaces/ISignalListener.h
src/base/kernel/interfaces/IStrategy.h
src/base/kernel/interfaces/IStrategyListener.h
src/base/kernel/interfaces/IWatcherListener.h
src/base/kernel/Entry.h
src/base/kernel/Process.h
src/base/kernel/Signals.h
src/base/net/Pool.h
src/base/net/Pools.h
src/base/net/stratum/Client.h
src/base/net/stratum/Id.h
src/base/net/stratum/Job.h
src/base/net/stratum/Pool.h
src/base/net/stratum/Pools.h
src/base/net/stratum/strategies/FailoverStrategy.h
src/base/net/stratum/strategies/SinglePoolStrategy.h
src/base/net/stratum/SubmitResult.h
src/base/net/tools/Storage.h
src/base/tools/Arguments.h
src/base/tools/Chrono.h
src/base/tools/Handle.h
@ -42,32 +52,22 @@ set(HEADERS
src/common/cpu/Cpu.h
src/common/crypto/Algorithm.h
src/common/crypto/keccak.h
src/common/interfaces/IClientListener.h
src/common/interfaces/IConfig.h
src/common/interfaces/IConfigCreator.h
src/common/interfaces/IConsoleListener.h
src/common/interfaces/IControllerListener.h
src/common/interfaces/ICpuInfo.h
src/common/interfaces/ILogBackend.h
src/common/interfaces/IStrategy.h
src/common/interfaces/IStrategyListener.h
src/common/log/BasicLog.h
src/common/log/ConsoleLog.h
src/common/log/FileLog.h
src/common/log/Log.h
src/common/net/Client.h
src/common/net/Id.h
src/common/net/Job.h
src/common/net/Storage.h
src/common/net/strategies/FailoverStrategy.h
src/common/net/strategies/SinglePoolStrategy.h
src/common/net/SubmitResult.h
src/common/Platform.h
src/common/utils/c_str.h
src/common/utils/mm_malloc.h
src/common/xmrig.h
src/core/ConfigLoader_platform.h
src/core/ConfigLoader_default.h
src/core/ConfigLoader_platform.h
src/core/Controller.h
src/interfaces/IJobResultListener.h
src/interfaces/IThread.h
@ -116,8 +116,13 @@ set(SOURCES
src/base/kernel/Entry.cpp
src/base/kernel/Process.cpp
src/base/kernel/Signals.cpp
src/base/net/Pool.cpp
src/base/net/Pools.cpp
src/base/net/stratum/Client.cpp
src/base/net/stratum/Job.cpp
src/base/net/stratum/Pool.cpp
src/base/net/stratum/Pools.cpp
src/base/net/stratum/strategies/FailoverStrategy.cpp
src/base/net/stratum/strategies/SinglePoolStrategy.cpp
src/base/net/stratum/SubmitResult.cpp
src/base/tools/Arguments.cpp
src/base/tools/Handle.cpp
src/base/tools/String.cpp
@ -131,11 +136,6 @@ set(SOURCES
src/common/log/ConsoleLog.cpp
src/common/log/FileLog.cpp
src/common/log/Log.cpp
src/common/net/Client.cpp
src/common/net/Job.cpp
src/common/net/strategies/FailoverStrategy.cpp
src/common/net/strategies/SinglePoolStrategy.cpp
src/common/net/SubmitResult.cpp
src/common/Platform.cpp
src/core/Config.cpp
src/core/Controller.cpp

View file

@ -11,7 +11,7 @@ if (WITH_TLS)
find_package(OpenSSL)
if (OPENSSL_FOUND)
set(TLS_SOURCES src/common/net/Tls.h src/common/net/Tls.cpp)
set(TLS_SOURCES src/base/net/stratum/Tls.h src/base/net/stratum/Tls.cpp)
include_directories(${OPENSSL_INCLUDE_DIR})
else()
message(FATAL_ERROR "OpenSSL NOT found: use `-DWITH_TLS=OFF` to build without TLS support")

View file

@ -28,7 +28,7 @@
#include <uv.h>
#include "base/net/Pool.h"
#include "base/net/stratum/Pool.h"
#include "common/cpu/Cpu.h"
#include "common/log/Log.h"
#include "core/Config.h"

View file

@ -34,11 +34,11 @@
#include "api/ApiRouter.h"
#include "base/net/stratum/Job.h"
#include "common/api/HttpReply.h"
#include "common/api/HttpRequest.h"
#include "common/cpu/Cpu.h"
#include "common/crypto/keccak.h"
#include "common/net/Job.h"
#include "common/Platform.h"
#include "core/Config.h"
#include "core/Controller.h"

View file

@ -30,8 +30,8 @@
#include "api/NetworkState.h"
#include "base/net/stratum/SubmitResult.h"
#include "base/tools/Chrono.h"
#include "common/net/SubmitResult.h"
xmrig::NetworkState::NetworkState() :

View file

@ -33,14 +33,14 @@
#ifndef XMRIG_NO_TLS
# include <openssl/ssl.h>
# include <openssl/err.h>
# include "common/net/Tls.h"
# include "base/net/stratum/Tls.h"
#endif
#include "base/kernel/interfaces/IClientListener.h"
#include "base/net/stratum/Client.h"
#include "base/tools/Chrono.h"
#include "common/interfaces/IClientListener.h"
#include "common/log/Log.h"
#include "common/net/Client.h"
#include "net/JobResult.h"
#include "rapidjson/document.h"
#include "rapidjson/error/en.h"

View file

@ -32,12 +32,12 @@
#include <vector>
#include "base/net/Pool.h"
#include "base/net/stratum/Id.h"
#include "base/net/stratum/Job.h"
#include "base/net/stratum/Pool.h"
#include "base/net/stratum/SubmitResult.h"
#include "base/net/tools/Storage.h"
#include "common/crypto/Algorithm.h"
#include "common/net/Id.h"
#include "common/net/Job.h"
#include "common/net/Storage.h"
#include "common/net/SubmitResult.h"
#include "rapidjson/fwd.h"

View file

@ -28,7 +28,7 @@
#include <string.h>
#include "common/net/Job.h"
#include "base/net/stratum/Job.h"
unsigned char hf_hex2bin(char c, bool &err)

View file

@ -32,7 +32,7 @@
#include "common/crypto/Algorithm.h"
#include "common/net/Id.h"
#include "base/net/stratum/Id.h"
namespace xmrig {

View file

@ -30,7 +30,7 @@
#include "base/io/Json.h"
#include "base/net/Pool.h"
#include "base/net/stratum/Pool.h"
#include "rapidjson/document.h"

View file

@ -23,10 +23,10 @@
*/
#include "base/net/Pools.h"
#include "base/net/stratum/Pools.h"
#include "base/net/stratum/strategies/FailoverStrategy.h"
#include "base/net/stratum/strategies/SinglePoolStrategy.h"
#include "common/log/Log.h"
#include "common/net/strategies/FailoverStrategy.h"
#include "common/net/strategies/SinglePoolStrategy.h"
#include "rapidjson/document.h"

View file

@ -29,7 +29,7 @@
#include <vector>
#include "base/net/Pool.h"
#include "base/net/stratum/Pool.h"
namespace xmrig {

View file

@ -26,7 +26,7 @@
#include <uv.h>
#include "common/net/SubmitResult.h"
#include "base/net/stratum/SubmitResult.h"
xmrig::SubmitResult::SubmitResult(int64_t seq, uint32_t diff, uint64_t actualDiff, int64_t reqId) :

View file

@ -27,8 +27,8 @@
#include <assert.h>
#include "common/net/Client.h"
#include "common/net/Tls.h"
#include "base/net/stratum/Client.h"
#include "base/net/stratum/Tls.h"
#include "common/log/Log.h"

View file

@ -29,7 +29,7 @@
#include <openssl/ssl.h>
#include "common/net/Client.h"
#include "base/net/stratum/Client.h"
namespace xmrig {

View file

@ -23,9 +23,9 @@
*/
#include "common/interfaces/IStrategyListener.h"
#include "common/net/Client.h"
#include "common/net/strategies/FailoverStrategy.h"
#include "base/kernel/interfaces/IStrategyListener.h"
#include "base/net/stratum/Client.h"
#include "base/net/stratum/strategies/FailoverStrategy.h"
#include "common/Platform.h"

View file

@ -29,9 +29,9 @@
#include <vector>
#include "base/net/Pool.h"
#include "common/interfaces/IClientListener.h"
#include "common/interfaces/IStrategy.h"
#include "base/kernel/interfaces/IClientListener.h"
#include "base/kernel/interfaces/IStrategy.h"
#include "base/net/stratum/Pool.h"
namespace xmrig {

View file

@ -23,9 +23,9 @@
*/
#include "common/interfaces/IStrategyListener.h"
#include "common/net/Client.h"
#include "common/net/strategies/SinglePoolStrategy.h"
#include "base/kernel/interfaces/IStrategyListener.h"
#include "base/net/stratum/Client.h"
#include "base/net/stratum/strategies/SinglePoolStrategy.h"
#include "common/Platform.h"

View file

@ -26,8 +26,8 @@
#define XMRIG_SINGLEPOOLSTRATEGY_H
#include "common/interfaces/IClientListener.h"
#include "common/interfaces/IStrategy.h"
#include "base/kernel/interfaces/IClientListener.h"
#include "base/kernel/interfaces/IStrategy.h"
namespace xmrig {

View file

@ -5,7 +5,8 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2016-2018 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -21,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __STORAGE_H__
#define __STORAGE_H__
#ifndef XMRIG_STORAGE_H
#define XMRIG_STORAGE_H
#include <assert.h>
@ -53,11 +54,10 @@ public:
inline static void *ptr(uintptr_t id) { return reinterpret_cast<void *>(id); }
inline TYPE *get(void *id) const { return get(reinterpret_cast<uintptr_t>(id)); }
inline TYPE *get(const void *id) const { return get(reinterpret_cast<uintptr_t>(id)); }
inline TYPE *get(uintptr_t id) const
{
assert(m_data.count(id) > 0);
if (m_data.count(id) == 0) {
return nullptr;
}
@ -66,20 +66,22 @@ public:
}
inline void remove(void *id) { remove(reinterpret_cast<uintptr_t>(id)); }
inline void remove(uintptr_t id)
inline void remove(const void *id) { delete release(reinterpret_cast<uintptr_t>(id)); }
inline void remove(uintptr_t id) { delete release(id); }
inline TYPE *release(const void *id) { release(reinterpret_cast<uintptr_t>(id)); }
inline TYPE *release(uintptr_t id)
{
TYPE *obj = get(id);
if (obj == nullptr) {
return;
if (obj != nullptr) {
auto it = m_data.find(id);
if (it != m_data.end()) {
m_data.erase(it);
}
}
auto it = m_data.find(id);
if (it != m_data.end()) {
m_data.erase(it);
}
delete obj;
return obj;
}
@ -92,4 +94,4 @@ private:
} /* namespace xmrig */
#endif /* __STORAGE_H__ */
#endif /* XMRIG_STORAGE_H */

View file

@ -26,7 +26,7 @@
#define XMRIG_COMMONCONFIG_H
#include "base/net/Pools.h"
#include "base/net/stratum/Pools.h"
#include "base/tools/String.h"
#include "common/interfaces/IConfig.h"
#include "common/xmrig.h"

View file

@ -31,7 +31,7 @@
#include <stdint.h>
#include "common/net/Job.h"
#include "base/net/stratum/Job.h"
namespace xmrig {

View file

@ -32,10 +32,10 @@
#include "api/Api.h"
#include "base/net/stratum/Client.h"
#include "base/net/stratum/SubmitResult.h"
#include "base/tools/Chrono.h"
#include "common/log/Log.h"
#include "common/net/Client.h"
#include "common/net/SubmitResult.h"
#include "core/Config.h"
#include "core/Controller.h"
#include "net/Network.h"

View file

@ -31,8 +31,8 @@
#include "api/NetworkState.h"
#include "base/kernel/interfaces/IStrategyListener.h"
#include "common/interfaces/IControllerListener.h"
#include "common/interfaces/IStrategyListener.h"
#include "interfaces/IJobResultListener.h"

View file

@ -23,12 +23,11 @@
*/
#include "base/net/stratum/Client.h"
#include "base/net/stratum/Job.h"
#include "base/net/stratum/strategies/FailoverStrategy.h"
#include "base/net/stratum/strategies/SinglePoolStrategy.h"
#include "common/crypto/keccak.h"
#include "common/interfaces/IStrategyListener.h"
#include "common/net/Client.h"
#include "common/net/Job.h"
#include "common/net/strategies/FailoverStrategy.h"
#include "common/net/strategies/SinglePoolStrategy.h"
#include "common/Platform.h"
#include "common/xmrig.h"
#include "net/strategies/DonateStrategy.h"

View file

@ -30,10 +30,10 @@
#include <vector>
#include "base/net/Pool.h"
#include "common/interfaces/IClientListener.h"
#include "common/interfaces/IStrategy.h"
#include "common/interfaces/IStrategyListener.h"
#include "base/kernel/interfaces/IClientListener.h"
#include "base/kernel/interfaces/IStrategy.h"
#include "base/kernel/interfaces/IStrategyListener.h"
#include "base/net/stratum/Pool.h"
namespace xmrig {

View file

@ -27,7 +27,7 @@
#define XMRIG_MULTIWORKER_H
#include "common/net/Job.h"
#include "base/net/stratum/Job.h"
#include "Mem.h"
#include "net/JobResult.h"
#include "workers/Worker.h"

View file

@ -31,7 +31,7 @@
#include <uv.h>
#include <vector>
#include "common/net/Job.h"
#include "base/net/stratum/Job.h"
#include "net/JobResult.h"
#include "rapidjson/fwd.h"