2020-10-07 10:36:04 +00:00
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2022-02-10 10:26:41 +00:00
|
|
|
// SPDX-FileCopyrightText: 2020-2022 The Monero Project
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
#ifndef FEATHER_CLI_H
|
|
|
|
#define FEATHER_CLI_H
|
|
|
|
|
|
|
|
#include <QtCore>
|
|
|
|
#include "appcontext.h"
|
|
|
|
|
|
|
|
class CLI : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2021-05-18 15:59:18 +00:00
|
|
|
|
2020-10-07 10:36:04 +00:00
|
|
|
public:
|
2021-05-18 15:59:18 +00:00
|
|
|
enum Mode {
|
2022-02-10 12:25:08 +00:00
|
|
|
Invalid,
|
2021-05-18 15:59:18 +00:00
|
|
|
ExportContacts,
|
|
|
|
ExportTxHistory,
|
|
|
|
BruteforcePassword
|
|
|
|
};
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2021-05-18 15:59:18 +00:00
|
|
|
explicit CLI(Mode mode, QCommandLineParser *cmdargs, QObject *parent = nullptr);
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2021-05-18 15:59:18 +00:00
|
|
|
private slots:
|
|
|
|
void onWalletOpened(Wallet *wallet);
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
private:
|
2021-05-18 15:59:18 +00:00
|
|
|
void finished(const QString &message);
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2021-05-18 15:59:18 +00:00
|
|
|
Mode m_mode;
|
|
|
|
QCommandLineParser *m_cmdargs;
|
|
|
|
WalletManager *m_walletManager;
|
2020-10-07 10:36:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //FEATHER_CLI_H
|