mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-11 10:17:24 -04:00
async connectionStatus and init
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
|
||||
#include <QObject>
|
||||
#include <QTime>
|
||||
#include <QMutex>
|
||||
#include <QtConcurrent/QtConcurrent>
|
||||
|
||||
#include "wallet/wallet2_api.h" // we need to have an access to the Monero::Wallet::Status enum here;
|
||||
#include "PendingTransaction.h" // we need to have an access to the PendingTransaction::Priority enum here;
|
||||
@@ -75,7 +77,8 @@ public:
|
||||
bool testnet() const;
|
||||
|
||||
//! returns whether the wallet is connected, and version status
|
||||
ConnectionStatus connected() const;
|
||||
ConnectionStatus connected(bool forceCheck = false);
|
||||
void updateConnectionStatusAsync();
|
||||
|
||||
//! returns true if wallet was ever synchronized
|
||||
bool synchronized() const;
|
||||
@@ -98,10 +101,10 @@ public:
|
||||
Q_INVOKABLE bool store(const QString &path = "");
|
||||
|
||||
//! initializes wallet
|
||||
Q_INVOKABLE bool init(const QString &daemonAddress, quint64 upperTransactionLimit, bool isRecovering = false, quint64 restoreHeight = 0);
|
||||
Q_INVOKABLE bool init(const QString &daemonAddress, quint64 upperTransactionLimit = 0, bool isRecovering = false, quint64 restoreHeight = 0);
|
||||
|
||||
//! initializes wallet asynchronously
|
||||
Q_INVOKABLE void initAsync(const QString &daemonAddress, quint64 upperTransactionLimit, bool isRecovering = false, quint64 restoreHeight = 0);
|
||||
Q_INVOKABLE void initAsync(const QString &daemonAddress, quint64 upperTransactionLimit = 0, bool isRecovering = false, quint64 restoreHeight = 0);
|
||||
|
||||
//! create a view only wallet
|
||||
Q_INVOKABLE bool createViewOnly(const QString &path, const QString &password) const;
|
||||
@@ -231,13 +234,13 @@ signals:
|
||||
void moneySpent(const QString &txId, quint64 amount);
|
||||
void moneyReceived(const QString &txId, quint64 amount);
|
||||
void unconfirmedMoneyReceived(const QString &txId, quint64 amount);
|
||||
void newBlock(quint64 height);
|
||||
void newBlock(quint64 height, quint64 targetHeight);
|
||||
void historyModelChanged() const;
|
||||
|
||||
// emitted when transaction is created async
|
||||
void transactionCreated(PendingTransaction * transaction, QString address, QString paymentId, quint32 mixinCount);
|
||||
|
||||
void connectionStatusChanged() const;
|
||||
void connectionStatusChanged(ConnectionStatus status) const;
|
||||
|
||||
private:
|
||||
Wallet(QObject * parent = nullptr);
|
||||
@@ -266,6 +269,8 @@ private:
|
||||
mutable bool m_initialized;
|
||||
AddressBook * m_addressBook;
|
||||
mutable AddressBookModel * m_addressBookModel;
|
||||
QMutex m_connectionStatusMutex;
|
||||
bool m_connectionStatusRunning;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user