diff options
| author | Jacob Brydolf <jacob@brydolf.net> | 2016-11-05 10:47:17 +0100 |
|---|---|---|
| committer | Jaquee <jaquee.monero@gmail.com> | 2016-11-26 19:35:16 +0100 |
| commit | 4cdc258b152e54766bdb8c26ceee4b5ddf4bb9b6 (patch) | |
| tree | 3cdf463cb238c79b186731f99317bc6a8235b03b /src/daemon/DaemonManager.h | |
| parent | 26abdee5c47017a80117b1bed5ee36586a240c62 (diff) | |
| download | monzero-gui-4cdc258b152e54766bdb8c26ceee4b5ddf4bb9b6.tar.gz monzero-gui-4cdc258b152e54766bdb8c26ceee4b5ddf4bb9b6.tar.xz monzero-gui-4cdc258b152e54766bdb8c26ceee4b5ddf4bb9b6.zip | |
WalletManager: basic functionality
Diffstat (limited to 'src/daemon/DaemonManager.h')
| -rw-r--r-- | src/daemon/DaemonManager.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/daemon/DaemonManager.h b/src/daemon/DaemonManager.h new file mode 100644 index 00000000..669f9119 --- /dev/null +++ b/src/daemon/DaemonManager.h @@ -0,0 +1,41 @@ +#ifndef DAEMONMANAGER_H +#define DAEMONMANAGER_H + +#include <QObject> +#include <QUrl> +#include <QProcess> + +class DaemonManager : public QObject +{ + Q_OBJECT + +public: + + static DaemonManager * instance(); + + Q_INVOKABLE bool start(); + Q_INVOKABLE bool stop(); + Q_INVOKABLE QString console() const; + + // return true if daemon process is started + Q_INVOKABLE bool running() const; + +signals: + + void daemonStarted(const QProcess &d); + void daemonStopped(); + +public slots: + void printOutput(); + void printError(); + +private: + + explicit DaemonManager(QObject *parent = 0); + static DaemonManager * m_instance; + QProcess *m_daemon; + QString dConsole; + +}; + +#endif // DAEMONMANAGER_H |
