started WalletListener

This commit is contained in:
Ilya Kitaev
2016-05-05 22:24:00 +03:00
parent e6fdd5dd10
commit 374577018d
3 changed files with 65 additions and 1 deletions

View File

@@ -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;
};
/**