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