mirror of
https://github.com/cculianu/Fulcrum.git
synced 2026-08-16 13:01:07 +02:00
Also added the "Fatal" logging class which logs as Error but then schedules an app exit when invoked. Only to be used for truly terrible errors.
33 lines
738 B
C++
33 lines
738 B
C++
#ifndef CONTROLLER_H
|
|
#define CONTROLLER_H
|
|
|
|
#include "BitcoinD.h"
|
|
#include "Mixins.h"
|
|
#include "Options.h"
|
|
#include "SrvMgr.h"
|
|
|
|
class Controller : public Mgr, public ThreadObjectMixin, public TimersByNameMixin
|
|
{
|
|
public:
|
|
explicit Controller(const std::shared_ptr<Options> & options);
|
|
~Controller() override;
|
|
|
|
void startup() override; ///< may throw
|
|
void cleanup() override;
|
|
|
|
protected:
|
|
Stats stats() const override;
|
|
|
|
protected slots:
|
|
void process(); ///< generic callback to advance state
|
|
|
|
private:
|
|
const std::shared_ptr<Options> options;
|
|
std::unique_ptr<SrvMgr> srvmgr;
|
|
std::unique_ptr<BitcoinDMgr> bitcoindmgr;
|
|
|
|
struct StateMachine;
|
|
std::unique_ptr<StateMachine> sm;
|
|
};
|
|
|
|
#endif // CONTROLLER_H
|