aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2_api.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/wallet/wallet2_api.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wallet/wallet2_api.h b/src/wallet/wallet2_api.h
index 43f5c9472..8e0830746 100644
--- a/src/wallet/wallet2_api.h
+++ b/src/wallet/wallet2_api.h
@@ -103,6 +103,13 @@ struct TransactionHistory
};
+struct WalletListener
+{
+ virtual ~WalletListener() = 0;
+ virtual void moneySpent(const std::string &txId, uint64_t amount);
+ virtual void moneyReceived(const std::string &txId, uint64_t amount);
+};
+
/**
* @brief Interface for wallet operations.
@@ -141,6 +148,7 @@ struct Wallet
virtual PendingTransaction * createTransaction(const std::string &dst_addr, uint64_t amount) = 0;
virtual void disposeTransaction(PendingTransaction * t) = 0;
virtual TransactionHistory * history() const = 0;
+ virtual void setListener(WalletListener *) = 0;
};
/**