mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-25 05:40:39 -05:00
Rewritten watch feature.
This commit is contained in:
@@ -139,7 +139,7 @@ void xmrig::Config::getJSON(rapidjson::Document &doc) const
|
||||
}
|
||||
|
||||
|
||||
xmrig::Config *xmrig::Config::load(int argc, char **argv, IWatcherListener *listener)
|
||||
xmrig::Config *xmrig::Config::load(int argc, char **argv, IConfigListener *listener)
|
||||
{
|
||||
return static_cast<Config*>(ConfigLoader::load(argc, argv, new ConfigCreator(), listener));
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace xmrig {
|
||||
|
||||
class ConfigLoader;
|
||||
class IThread;
|
||||
class IWatcherListener;
|
||||
class IConfigListener;
|
||||
|
||||
|
||||
/**
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
inline int64_t affinity() const { return m_threads.mask; }
|
||||
inline ThreadsMode threadsMode() const { return m_threads.mode; }
|
||||
|
||||
static Config *load(int argc, char **argv, IWatcherListener *listener);
|
||||
static Config *load(int argc, char **argv, IConfigListener *listener);
|
||||
|
||||
protected:
|
||||
bool finalize() override;
|
||||
|
||||
@@ -5,8 +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
|
||||
@@ -122,6 +122,7 @@ static struct option const options[] = {
|
||||
{ "max-cpu-usage", 1, nullptr, xmrig::IConfig::MaxCPUUsageKey },
|
||||
{ "nicehash", 0, nullptr, xmrig::IConfig::NicehashKey },
|
||||
{ "no-color", 0, nullptr, xmrig::IConfig::ColorKey },
|
||||
{ "no-watch", 0, nullptr, xmrig::IConfig::WatchKey },
|
||||
{ "no-huge-pages", 0, nullptr, xmrig::IConfig::HugePagesKey },
|
||||
{ "variant", 1, nullptr, xmrig::IConfig::VariantKey },
|
||||
{ "pass", 1, nullptr, xmrig::IConfig::PasswordKey },
|
||||
@@ -163,6 +164,7 @@ static struct option const config_options[] = {
|
||||
{ "syslog", 0, nullptr, xmrig::IConfig::SyslogKey },
|
||||
{ "threads", 1, nullptr, xmrig::IConfig::ThreadsKey },
|
||||
{ "user-agent", 1, nullptr, xmrig::IConfig::UserAgentKey },
|
||||
{ "watch", 0, nullptr, xmrig::IConfig::WatchKey },
|
||||
{ "hw-aes", 0, nullptr, xmrig::IConfig::HardwareAESKey },
|
||||
{ "asm", 1, nullptr, xmrig::IConfig::AssemblyKey },
|
||||
{ "autosave", 0, nullptr, xmrig::IConfig::AutoSaveKey },
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -25,7 +26,7 @@
|
||||
#define XMRIG_CONTROLLER_H
|
||||
|
||||
|
||||
#include "common/interfaces/IWatcherListener.h"
|
||||
#include "base/kernel/interfaces/IConfigListener.h"
|
||||
|
||||
|
||||
class Network;
|
||||
@@ -40,11 +41,11 @@ class ControllerPrivate;
|
||||
class IControllerListener;
|
||||
|
||||
|
||||
class Controller : public IWatcherListener
|
||||
class Controller : public IConfigListener
|
||||
{
|
||||
public:
|
||||
Controller();
|
||||
~Controller();
|
||||
~Controller() override;
|
||||
|
||||
bool isDone() const;
|
||||
bool isReady() const;
|
||||
|
||||
Reference in New Issue
Block a user