New config subsystem
This commit is contained in:
parent
85ee55f309
commit
fa2a0b9b79
37 changed files with 1628 additions and 1254 deletions
|
@ -26,45 +26,35 @@
|
|||
#define XMRIG_CONTROLLER_H
|
||||
|
||||
|
||||
#include "base/kernel/interfaces/IConfigListener.h"
|
||||
#include "base/kernel/Base.h"
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
|
||||
|
||||
class Api;
|
||||
class Config;
|
||||
class ControllerPrivate;
|
||||
class IControllerListener;
|
||||
class Network;
|
||||
class Process;
|
||||
|
||||
|
||||
class Controller : public IConfigListener
|
||||
class Controller : public Base
|
||||
{
|
||||
public:
|
||||
Controller(Process *process);
|
||||
~Controller() override;
|
||||
|
||||
Api *api() const;
|
||||
bool isReady() const;
|
||||
Config *config() const;
|
||||
int init();
|
||||
Network *network() const;
|
||||
void addListener(IControllerListener *listener);
|
||||
void save();
|
||||
void start();
|
||||
void stop();
|
||||
bool isReady() const override;
|
||||
int init() override;
|
||||
void start() override;
|
||||
void stop() override;
|
||||
|
||||
protected:
|
||||
void onNewConfig(IConfig *config) override;
|
||||
Network *network() const;
|
||||
|
||||
private:
|
||||
ControllerPrivate *d_ptr;
|
||||
Network *m_network;
|
||||
};
|
||||
|
||||
|
||||
} /* namespace xmrig */
|
||||
} // namespace xmrig
|
||||
|
||||
|
||||
#endif /* XMRIG_CONTROLLER_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue