aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/DaemonManager.h
diff options
context:
space:
mode:
authorJaquee <jaquee.monero@gmail.com>2017-02-23 19:47:58 +0100
committerJaquee <jaquee.monero@gmail.com>2017-02-23 19:52:06 +0100
commitfaacd3d6a11efcb6dcf9a54ce55ed20e573b40f5 (patch)
treeed5d7ba5a02dcdc5d705b71075e2d0f8bc03c9f6 /src/daemon/DaemonManager.h
parentc6688dc876d4ab8e0cea6f34f4607bf3be9a3648 (diff)
downloadmonzero-gui-faacd3d6a11efcb6dcf9a54ce55ed20e573b40f5.tar.gz
monzero-gui-faacd3d6a11efcb6dcf9a54ce55ed20e573b40f5.tar.xz
monzero-gui-faacd3d6a11efcb6dcf9a54ce55ed20e573b40f5.zip
start daemon automatically and detached
Diffstat (limited to 'src/daemon/DaemonManager.h')
-rw-r--r--src/daemon/DaemonManager.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/daemon/DaemonManager.h b/src/daemon/DaemonManager.h
index 2a2b38df..bd13ef60 100644
--- a/src/daemon/DaemonManager.h
+++ b/src/daemon/DaemonManager.h
@@ -13,26 +13,27 @@ public:
static DaemonManager * instance(const QStringList *args);
- Q_INVOKABLE bool start(const QString &flags);
- Q_INVOKABLE bool stop();
+ Q_INVOKABLE bool start(const QString &flags, bool testnet);
+ Q_INVOKABLE bool stop(bool testnet);
// return true if daemon process is started
- Q_INVOKABLE bool running() const;
- Q_INVOKABLE bool sendCommand(const QString &cmd, bool testnet);
+ Q_INVOKABLE bool running(bool testnet) const;
+ // Send daemon command from qml and prints output in console window.
+ Q_INVOKABLE bool sendCommand(const QString &cmd, bool testnet) const;
+private:
+ bool sendCommand(const QString &cmd, bool testnet, QString &message) const;
signals:
- void daemonStarted();
- void daemonStopped();
- void daemonConsoleUpdated(QString message);
+ void daemonStarted() const;
+ void daemonStopped() const;
+ void daemonConsoleUpdated(QString message) const;
public slots:
void printOutput();
void printError();
- void closing();
void stateChanged(QProcess::ProcessState state);
private:
-
explicit DaemonManager(QObject *parent = 0);
static DaemonManager * m_instance;
static QStringList m_clArgs;