status-desktop/src-cpp/app_service/include/accounts/service_interface.h

44 lines
1.1 KiB
C
Raw Normal View History

2022-01-06 19:29:19 +00:00
#pragma once
#include "../app_service.h"
#include "account.h"
#include "generated_account.h"
#include <QJsonValue>
#include <QString>
#include <QVector>
namespace Accounts
{
class ServiceInterface : public AppService
{
public:
virtual QVector<AccountDto> openedAccounts() = 0;
2022-01-20 15:50:10 +00:00
virtual QVector<GeneratedAccountDto> generatedAccounts() = 0;
2022-01-20 15:50:10 +00:00
virtual bool setupAccount(const QString& accountId, const QString& password) = 0;
2022-01-20 15:50:10 +00:00
virtual AccountDto getLoggedInAccount() = 0;
2022-01-20 15:50:10 +00:00
virtual GeneratedAccountDto getImportedAccount() = 0;
2022-01-20 15:50:10 +00:00
virtual bool isFirstTimeAccountLogin() = 0;
2022-01-20 15:50:10 +00:00
virtual QString validateMnemonic(const QString& mnemonic) = 0;
2022-01-20 15:50:10 +00:00
virtual bool importMnemonic(const QString& mnemonic) = 0;
2022-01-20 15:50:10 +00:00
virtual QString login(const AccountDto& account, const QString& password) = 0;
2022-01-20 15:50:10 +00:00
virtual void clear() = 0;
2022-01-20 15:50:10 +00:00
virtual QString generateAlias(const QString& publicKey) = 0;
2022-01-20 15:50:10 +00:00
virtual QString generateIdenticon(const QString& publicKey) = 0;
2022-01-20 15:50:10 +00:00
virtual bool verifyAccountPassword(const QString& account, const QString& password) = 0;
2022-01-06 19:29:19 +00:00
};
} // namespace Accounts