aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet.h')
-rw-r--r--src/wallet.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/wallet.h b/src/wallet.h
index 664a032912..d47416d272 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -64,6 +64,19 @@ public:
)
};
+/** Address book data */
+class CAddressBookData
+{
+public:
+ std::string name;
+ std::string purpose;
+
+ CAddressBookData()
+ {
+ purpose = "unknown";
+ }
+};
+
/** A CWallet is an extension of a keystore, which also maintains a set of transactions and balances,
* and provides the ability to create new transactions.
*/
@@ -124,7 +137,7 @@ public:
int64 nOrderPosNext;
std::map<uint256, int> mapRequestCount;
- std::map<CTxDestination, std::string> mapAddressBook;
+ std::map<CTxDestination, CAddressBookData> mapAddressBook;
CPubKey vchDefaultKey;
@@ -214,6 +227,8 @@ public:
std::set< std::set<CTxDestination> > GetAddressGroupings();
std::map<CTxDestination, int64> GetAddressBalances();
+ std::set<CTxDestination> GetAccountAddresses(std::string strAccount) const;
+
bool IsMine(const CTxIn& txin) const;
int64 GetDebit(const CTxIn& txin) const;
bool IsMine(const CTxOut& txout) const
@@ -281,9 +296,9 @@ public:
DBErrors LoadWallet(bool& fFirstRunRet);
- bool SetAddressBookName(const CTxDestination& address, const std::string& strName);
+ bool SetAddressBook(const CTxDestination& address, const std::string& strName, const std::string& purpose);
- bool DelAddressBookName(const CTxDestination& address);
+ bool DelAddressBook(const CTxDestination& address);
void UpdatedTransaction(const uint256 &hashTx);