Init wallet asynchronously

This commit is contained in:
Ilya Kitaev
2016-07-14 13:09:39 +03:00
parent 7df82af75d
commit 71da777375
3 changed files with 28 additions and 17 deletions

View File

@@ -28,6 +28,7 @@ public:
// TODO
Q_UNUSED(txId)
Q_UNUSED(amount)
qDebug() << __FUNCTION__;
}
virtual void moneyReceived(const std::string &txId, uint64_t amount)
@@ -35,16 +36,19 @@ public:
// TODO
Q_UNUSED(txId)
Q_UNUSED(amount)
qDebug() << __FUNCTION__;
}
virtual void updated()
{
qDebug() << __FUNCTION__;
emit m_wallet->updated();
}
// called when wallet refreshed by background thread or explicitly
virtual void refreshed()
{
qDebug() << __FUNCTION__;
emit m_wallet->refreshed();
}
@@ -74,6 +78,11 @@ Wallet::Status Wallet::status() const
return static_cast<Status>(m_walletImpl->status());
}
bool Wallet::connected() const
{
return m_walletImpl->connected();
}
QString Wallet::errorString() const
{
return QString::fromStdString(m_walletImpl->errorString());
@@ -99,6 +108,11 @@ bool Wallet::init(const QString &daemonAddress, quint64 upperTransactionLimit)
return m_walletImpl->init(daemonAddress.toStdString(), upperTransactionLimit);
}
void Wallet::initAsync(const QString &daemonAddress, quint64 upperTransactionLimit)
{
m_walletImpl->initAsync(daemonAddress.toStdString(), upperTransactionLimit);
}
bool Wallet::connectToDaemon()
{
return m_walletImpl->connectToDaemon();
@@ -183,7 +197,7 @@ void Wallet::setPaymentId(const QString &paymentId)
Wallet::Wallet(Bitmonero::Wallet *w, QObject *parent)
: QObject(parent), m_walletImpl(w), m_history(nullptr)
{
m_walletImpl->setListener(new WalletListenerImpl(this));
}
Wallet::~Wallet()