mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-07 07:55:04 -05:00
Rename App to MinerApp.
This commit is contained in:
@@ -50,7 +50,6 @@ include(src/backend/backend.cmake)
|
||||
|
||||
set(HEADERS
|
||||
"${HEADERS_BACKEND}"
|
||||
src/App.h
|
||||
src/backend/common/interfaces/IMemoryPool.h
|
||||
src/core/config/Config_default.h
|
||||
src/core/config/Config_platform.h
|
||||
@@ -79,6 +78,7 @@ set(HEADERS
|
||||
src/crypto/common/Nonce.h
|
||||
src/crypto/common/portable/mm_malloc.h
|
||||
src/crypto/common/VirtualMemory.h
|
||||
src/MinerApp.h
|
||||
src/net/interfaces/IJobResultListener.h
|
||||
src/net/JobResult.h
|
||||
src/net/JobResults.h
|
||||
@@ -96,7 +96,6 @@ endif()
|
||||
|
||||
set(SOURCES
|
||||
"${SOURCES_BACKEND}"
|
||||
src/App.cpp
|
||||
src/core/config/Config.cpp
|
||||
src/core/config/ConfigTransform.cpp
|
||||
src/core/Controller.cpp
|
||||
@@ -111,6 +110,7 @@ set(SOURCES
|
||||
src/crypto/common/MemoryPool.cpp
|
||||
src/crypto/common/Nonce.cpp
|
||||
src/crypto/common/VirtualMemory.cpp
|
||||
src/MinerApp.cpp
|
||||
src/net/JobResults.cpp
|
||||
src/net/Network.cpp
|
||||
src/net/strategies/DonateStrategy.cpp
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <uv.h>
|
||||
|
||||
|
||||
#include "App.h"
|
||||
#include "MinerApp.h"
|
||||
#include "backend/cpu/Cpu.h"
|
||||
#include "base/io/Console.h"
|
||||
#include "base/io/log/Log.h"
|
||||
@@ -41,19 +41,19 @@
|
||||
#include "version.h"
|
||||
|
||||
|
||||
xmrig::App::App()
|
||||
xmrig::MinerApp::MinerApp()
|
||||
{
|
||||
m_controller = std::make_shared<Controller>();
|
||||
}
|
||||
|
||||
|
||||
xmrig::App::~App()
|
||||
xmrig::MinerApp::~MinerApp()
|
||||
{
|
||||
Cpu::release();
|
||||
}
|
||||
|
||||
|
||||
int xmrig::App::exec()
|
||||
int xmrig::MinerApp::exec()
|
||||
{
|
||||
if (!m_controller->isReady()) {
|
||||
LOG_EMERG("no valid configuration found, try https://xmrig.com/wizard");
|
||||
@@ -89,7 +89,7 @@ int xmrig::App::exec()
|
||||
}
|
||||
|
||||
|
||||
void xmrig::App::onConsoleCommand(char command)
|
||||
void xmrig::MinerApp::onConsoleCommand(char command)
|
||||
{
|
||||
if (command == 3) {
|
||||
LOG_WARN("%s " YELLOW("Ctrl+C received, exiting"), Tags::signal());
|
||||
@@ -101,7 +101,7 @@ void xmrig::App::onConsoleCommand(char command)
|
||||
}
|
||||
|
||||
|
||||
void xmrig::App::onSignal(int signum)
|
||||
void xmrig::MinerApp::onSignal(int signum)
|
||||
{
|
||||
switch (signum)
|
||||
{
|
||||
@@ -116,7 +116,7 @@ void xmrig::App::onSignal(int signum)
|
||||
}
|
||||
|
||||
|
||||
void xmrig::App::close()
|
||||
void xmrig::MinerApp::close()
|
||||
{
|
||||
m_signals.reset();
|
||||
m_console.reset();
|
||||
@@ -23,8 +23,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef XMRIG_APP_H
|
||||
#define XMRIG_APP_H
|
||||
#ifndef XMRIG_MINERAPP_H
|
||||
#define XMRIG_MINERAPP_H
|
||||
|
||||
|
||||
#include "base/kernel/interfaces/IConsoleListener.h"
|
||||
@@ -45,13 +45,13 @@ class Process;
|
||||
class Signals;
|
||||
|
||||
|
||||
class App : public IConsoleListener, public ISignalListener
|
||||
class MinerApp : public IConsoleListener, public ISignalListener
|
||||
{
|
||||
public:
|
||||
XMRIG_DISABLE_COPY_MOVE(App)
|
||||
XMRIG_DISABLE_COPY_MOVE(MinerApp)
|
||||
|
||||
App();
|
||||
~App() override;
|
||||
MinerApp();
|
||||
~MinerApp() override;
|
||||
|
||||
int exec();
|
||||
|
||||
@@ -72,4 +72,4 @@ private:
|
||||
} /* namespace xmrig */
|
||||
|
||||
|
||||
#endif /* XMRIG_APP_H */
|
||||
#endif /* XMRIG_MINERAPP_H */
|
||||
@@ -16,7 +16,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "App.h"
|
||||
#include "MinerApp.h"
|
||||
#include "base/kernel/Entry.h"
|
||||
#include "base/kernel/Process.h"
|
||||
#include "core/config/usage.h"
|
||||
@@ -46,7 +46,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
App app;
|
||||
MinerApp app;
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user