diff options
author | Cozz Lovan <cozzlovan@yahoo.com> | 2013-08-12 17:03:03 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-11-14 14:25:10 +0100 |
commit | 6a86c24db146d9ca5d1d5c83099d935c3feb63bb (patch) | |
tree | 84ea08401061e81d178a4c2caf34233281227da4 /src/qt/walletmodel.h | |
parent | 8dfd8c62dccac96afbda5ad0e66e68ee4820481f (diff) |
Coin Control Features
Diffstat (limited to 'src/qt/walletmodel.h')
-rw-r--r-- | src/qt/walletmodel.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h index f39e9dfca0..f5afe87260 100644 --- a/src/qt/walletmodel.h +++ b/src/qt/walletmodel.h @@ -11,11 +11,19 @@ #include "allocators.h" /* for SecureString */ #include <QObject> +#include <vector> +#include <map> class AddressTableModel; class OptionsModel; class TransactionTableModel; class WalletModelTransaction; +class CKeyID; +class CPubKey; +class COutput; +class COutPoint; +class uint256; +class CCoinControl; class CWallet; @@ -80,7 +88,7 @@ public: AddressTableModel *getAddressTableModel(); TransactionTableModel *getTransactionTableModel(); - qint64 getBalance() const; + qint64 getBalance(const CCoinControl *coinControl=NULL) const; qint64 getUnconfirmedBalance() const; qint64 getImmatureBalance() const; int getNumTransactions() const; @@ -92,13 +100,13 @@ public: // Return status record for SendCoins, contains error id + information struct SendCoinsReturn { - SendCoinsReturn(StatusCode status): + SendCoinsReturn(StatusCode status=Aborted): status(status) {} StatusCode status; }; // prepare transaction for getting txfee before sending coins - SendCoinsReturn prepareTransaction(WalletModelTransaction &transaction); + SendCoinsReturn prepareTransaction(WalletModelTransaction &transaction, const CCoinControl *coinControl=NULL); // Send coins to a list of recipients SendCoinsReturn sendCoins(WalletModelTransaction &transaction); @@ -133,6 +141,15 @@ public: UnlockContext requestUnlock(); + bool getPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const; + void getOutputs(const std::vector<COutPoint>& vOutpoints, std::vector<COutput>& vOutputs); + void listCoins(std::map<QString, std::vector<COutput> >& mapCoins) const; + + bool isLockedCoin(uint256 hash, unsigned int n) const; + void lockCoin(COutPoint& output); + void unlockCoin(COutPoint& output); + void listLockedCoins(std::vector<COutPoint>& vOutpts); + private: CWallet *wallet; |