From 5dbd2b8fc3aa97f3a2e14a378cf6b7afd16bd4e2 Mon Sep 17 00:00:00 2001 From: Ilya Kitaev Date: Thu, 5 May 2016 22:24:00 +0300 Subject: started WalletListener --- src/wallet/wallet2_api.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/wallet/wallet2_api.h') 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; }; /** -- cgit v1.2.3