wowlet/src/cli.h

50 lines
995 B
C
Raw Permalink Normal View History

// SPDX-License-Identifier: BSD-3-Clause
2020-12-26 19:56:06 +00:00
// Copyright (c) 2020-2021, The Monero Project.
2021-03-30 10:52:29 +01:00
#ifndef WOWLET_CLI_H
#define WOWLET_CLI_H
#include <QtCore>
#include "appcontext.h"
#include <utils/wsserver.h>
enum CLIMode {
CLIModeExportContacts,
CLIModeExportTxHistory,
CLIDaemonize
};
class CLI : public QObject
{
Q_OBJECT
public:
CLIMode mode;
explicit CLI(AppContext *ctx, QObject *parent = nullptr);
~CLI() override;
QString backgroundWebsocketAddress;
quint16 backgroundWebsocketPort;
QString backgroundWebsocketPassword;
public slots:
void run();
//libwalletqt
void onWalletOpened();
void onWalletOpenedError(const QString& err);
2020-10-21 07:45:25 +01:00
void onWalletOpenPasswordRequired(bool invalidPassword, const QString &path);
private:
AppContext *ctx;
WSServer *m_wsServer;
private slots:
void finished(const QString &msg);
void finishedError(const QString &err);
signals:
void closeApplication();
};
2021-03-30 10:52:29 +01:00
#endif //WOWLET_CLI_H