mirror of
https://git.wownero.com/wowlet/wowlet.git
synced 2024-08-15 01:03:14 +00:00
aee60f33b7
- Refactored CMake related to Tor/XMRig - Move executables to `src/assets/exec` - Embedding executables require passing definition to CMake, e.g: - `-DTOR=/path/to/tor` - `-DXMRIG=/path/to/xmrig` - Allow solo mining for XMRig - Redesign XMRig settings screen
48 lines
1.1 KiB
C++
48 lines
1.1 KiB
C++
// SPDX-License-Identifier: BSD-3-Clause
|
|
// Copyright (c) 2020, The Monero Project.
|
|
|
|
#ifndef FEATHER_XMRIG_H
|
|
#define FEATHER_XMRIG_H
|
|
|
|
#include <cstdio>
|
|
#include <cstdlib>
|
|
#include <iostream>
|
|
#include <QtCore>
|
|
#include <QRegExp>
|
|
#include <QtNetwork>
|
|
#include <QApplication>
|
|
#include <QMainWindow>
|
|
|
|
#include "utils/childproc.h"
|
|
|
|
class XmRig : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit XmRig(const QString &configDir, QObject *parent = nullptr);
|
|
void prepare();
|
|
|
|
void start(const QString &path, unsigned int threads, const QString &address, const QString &username, const QString &password, bool tor = false, bool tls = true);
|
|
void stop();
|
|
void terminate();
|
|
bool unpackBins();
|
|
|
|
QString rigDir;
|
|
QString rigPath;
|
|
|
|
signals:
|
|
void error(const QString &msg);
|
|
void output(const QByteArray &data);
|
|
void hashrate(const QString &rate);
|
|
|
|
private slots:
|
|
void stateChanged(QProcess::ProcessState);
|
|
void handleProcessOutput();
|
|
void handleProcessError(QProcess::ProcessError error);
|
|
|
|
private:
|
|
ChildProcess m_process;
|
|
};
|
|
|
|
#endif //FEATHER_XMRIG_H
|