diff options
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; |