defined setListener()

This commit is contained in:
woodser
2019-05-28 15:38:05 -04:00
parent 64cba97d1a
commit dbb2e9658a
2 changed files with 11 additions and 3 deletions
+5
View File
@@ -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");
+6 -3
View File
@@ -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);