mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-19 16:18:40 +02:00
defined setListener()
This commit is contained in:
@@ -128,6 +128,11 @@ uint64_t MoneroWallet::getRestoreHeight() const {
|
||||
return wallet2->get_refresh_from_block_height();
|
||||
}
|
||||
|
||||
void MoneroWallet::setListener(MoneroWalletListener* listener) {
|
||||
cout << "setListener()" << endl;
|
||||
throw runtime_error("Not implemented");
|
||||
}
|
||||
|
||||
MoneroSyncResult MoneroWallet::sync() {
|
||||
cout << "sync()" << endl;
|
||||
throw runtime_error("Not implemented");
|
||||
|
||||
@@ -26,7 +26,8 @@ namespace monero {
|
||||
* Models a result of syncing a wallet.
|
||||
*/
|
||||
struct MoneroBlockHeader {
|
||||
// TODO
|
||||
uint64_t height;
|
||||
MoneroBlockHeader() {}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -78,7 +79,7 @@ namespace monero {
|
||||
* @param percentDone is the sync progress as a percentage
|
||||
* @param message is a human-readable description of the current progress
|
||||
*/
|
||||
virtual void onSyncProgress(uint64_t startHeight, uint64_t numBlocksDone, uint64_t numBlocksTotal, double percentDone, string message);
|
||||
virtual void onSyncProgress(uint64_t startHeight, uint64_t numBlocksDone, uint64_t numBlocksTotal, double percentDone, string message) {}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -91,7 +92,7 @@ namespace monero {
|
||||
*
|
||||
* @param block is the newly processed block
|
||||
*/
|
||||
virtual void onNewBlock(MoneroBlock& block);
|
||||
virtual void onNewBlock(MoneroBlock& block) {};
|
||||
};
|
||||
|
||||
// ---------------------------- WALLET INTERFACE ----------------------------
|
||||
@@ -228,6 +229,8 @@ namespace monero {
|
||||
|
||||
uint64_t getRestoreHeight() const;
|
||||
|
||||
void setListener(MoneroWalletListener* listener);
|
||||
|
||||
MoneroSyncResult sync();
|
||||
|
||||
MoneroSyncResult sync(MoneroSyncListener& listener);
|
||||
|
||||
Reference in New Issue
Block a user