xmrig v2.13.0 rebase
This commit is contained in:
commit
cb22009ee5
111 changed files with 5210 additions and 1292 deletions
|
@ -4,8 +4,9 @@
|
|||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2016-2017 XMRig <support@xmrig.com>
|
||||
*
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* 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,13 +22,16 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __ICLIENTLISTENER_H__
|
||||
#define __ICLIENTLISTENER_H__
|
||||
#ifndef XMRIG_ICLIENTLISTENER_H
|
||||
#define XMRIG_ICLIENTLISTENER_H
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
|
||||
|
||||
class Client;
|
||||
class Job;
|
||||
class SubmitResult;
|
||||
|
@ -36,7 +40,7 @@ class SubmitResult;
|
|||
class IClientListener
|
||||
{
|
||||
public:
|
||||
virtual ~IClientListener() {}
|
||||
virtual ~IClientListener() = default;
|
||||
|
||||
virtual void onClose(Client *client, int failures) = 0;
|
||||
virtual void onJobReceived(Client *client, const Job &job) = 0;
|
||||
|
@ -45,4 +49,7 @@ public:
|
|||
};
|
||||
|
||||
|
||||
#endif // __ICLIENTLISTENER_H__
|
||||
} /* namespace xmrig */
|
||||
|
||||
|
||||
#endif // XMRIG_ICLIENTLISTENER_H
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2016-2018 XMRig <support@xmrig.com>
|
||||
* Copyright 2018 MoneroOcean <https://github.com/MoneroOcean>, <support@moneroocean.stream>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright 2018-2019 MoneroOcean <https://github.com/MoneroOcean>, <support@moneroocean.stream>
|
||||
*
|
||||
* 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
|
||||
|
@ -32,6 +34,9 @@
|
|||
namespace xmrig {
|
||||
|
||||
|
||||
class String;
|
||||
|
||||
|
||||
class IConfig
|
||||
{
|
||||
public:
|
||||
|
@ -48,7 +53,6 @@ public:
|
|||
ColorKey = 1002,
|
||||
ConfigKey = 'c',
|
||||
DonateLevelKey = 1003,
|
||||
HelpKey = 'h',
|
||||
KeepAliveKey = 'k',
|
||||
LogFileKey = 'l',
|
||||
PasswordKey = 'p',
|
||||
|
@ -62,7 +66,6 @@ public:
|
|||
UserpassKey = 'O',
|
||||
VariantKey = 1010,
|
||||
VerboseKey = 1100,
|
||||
VersionKey = 'V',
|
||||
WatchKey = 1105,
|
||||
TlsKey = 1013,
|
||||
FingerprintKey = 1014,
|
||||
|
@ -128,7 +131,7 @@ public:
|
|||
CudaMaxUsageKey = 1206,
|
||||
};
|
||||
|
||||
virtual ~IConfig() {}
|
||||
virtual ~IConfig() = default;
|
||||
|
||||
virtual bool finalize() = 0;
|
||||
virtual bool isWatch() const = 0;
|
||||
|
@ -137,7 +140,7 @@ public:
|
|||
virtual bool parseUint64(int key, uint64_t arg) = 0;
|
||||
virtual bool save() = 0;
|
||||
virtual const Algorithm &algorithm() const = 0;
|
||||
virtual const char *fileName() const = 0;
|
||||
virtual const String &fileName() const = 0;
|
||||
virtual void getJSON(rapidjson::Document &doc) const = 0;
|
||||
virtual void parseJSON(const rapidjson::Document &doc) = 0;
|
||||
virtual void setFileName(const char *fileName) = 0;
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2016-2018 XMRig <support@xmrig.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* 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
|
||||
|
@ -20,8 +22,8 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __ICONFIGCREATOR_H__
|
||||
#define __ICONFIGCREATOR_H__
|
||||
#ifndef XMRIG_ICONFIGCREATOR_H
|
||||
#define XMRIG_ICONFIGCREATOR_H
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
|
@ -33,7 +35,7 @@ class IConfig;
|
|||
class IConfigCreator
|
||||
{
|
||||
public:
|
||||
virtual ~IConfigCreator() {}
|
||||
virtual ~IConfigCreator() = default;
|
||||
|
||||
virtual IConfig *create() const = 0;
|
||||
};
|
||||
|
@ -42,4 +44,4 @@ public:
|
|||
} /* namespace xmrig */
|
||||
|
||||
|
||||
#endif // __ICONFIGCREATOR_H__
|
||||
#endif // XMRIG_ICONFIGCREATOR_H
|
||||
|
|
|
@ -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
|
||||
|
@ -34,7 +35,7 @@ class Config;
|
|||
class IControllerListener
|
||||
{
|
||||
public:
|
||||
virtual ~IControllerListener() {}
|
||||
virtual ~IControllerListener() = default;
|
||||
|
||||
virtual void onConfigChanged(Config *config, Config *previousConfig) = 0;
|
||||
};
|
||||
|
|
|
@ -33,23 +33,27 @@ class JobResult;
|
|||
|
||||
|
||||
namespace xmrig {
|
||||
class Algorithm;
|
||||
}
|
||||
|
||||
|
||||
class Algorithm;
|
||||
|
||||
|
||||
class IStrategy
|
||||
{
|
||||
public:
|
||||
virtual ~IStrategy() {}
|
||||
virtual ~IStrategy() = default;
|
||||
|
||||
virtual bool isActive() const = 0;
|
||||
virtual int64_t submit(const JobResult &result) = 0;
|
||||
virtual void connect() = 0;
|
||||
virtual void resume() = 0;
|
||||
virtual void setAlgo(const xmrig::Algorithm &algo) = 0;
|
||||
virtual void setAlgo(const Algorithm &algo) = 0;
|
||||
virtual void stop() = 0;
|
||||
virtual void tick(uint64_t now) = 0;
|
||||
};
|
||||
|
||||
|
||||
} /* namespace xmrig */
|
||||
|
||||
|
||||
#endif // XMRIG_ISTRATEGY_H
|
||||
|
|
|
@ -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,13 +22,16 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __ISTRATEGYLISTENER_H__
|
||||
#define __ISTRATEGYLISTENER_H__
|
||||
#ifndef XMRIG_ISTRATEGYLISTENER_H
|
||||
#define XMRIG_ISTRATEGYLISTENER_H
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
|
||||
|
||||
class Client;
|
||||
class IStrategy;
|
||||
class Job;
|
||||
|
@ -37,7 +41,7 @@ class SubmitResult;
|
|||
class IStrategyListener
|
||||
{
|
||||
public:
|
||||
virtual ~IStrategyListener() {}
|
||||
virtual ~IStrategyListener() = default;
|
||||
|
||||
virtual void onActive(IStrategy *strategy, Client *client) = 0;
|
||||
virtual void onJob(IStrategy *strategy, Client *client, const Job &job) = 0;
|
||||
|
@ -46,4 +50,7 @@ public:
|
|||
};
|
||||
|
||||
|
||||
#endif // __ISTRATEGYLISTENER_H__
|
||||
} /* namespace xmrig */
|
||||
|
||||
|
||||
#endif // XMRIG_ISTRATEGYLISTENER_H
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
/* XMRig
|
||||
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
|
||||
* Copyright 2012-2014 pooler <pooler@litecoinpool.org>
|
||||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* 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>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __IWATCHERLISTENER_H__
|
||||
#define __IWATCHERLISTENER_H__
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
|
||||
|
||||
class IConfig;
|
||||
|
||||
|
||||
class IWatcherListener
|
||||
{
|
||||
public:
|
||||
virtual ~IWatcherListener() {}
|
||||
|
||||
virtual void onNewConfig(IConfig *config) = 0;
|
||||
};
|
||||
|
||||
|
||||
} /* namespace xmrig */
|
||||
|
||||
|
||||
#endif // __IWATCHERLISTENER_H__
|
Loading…
Add table
Add a link
Reference in a new issue