aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/wallet2_api.h
diff options
context:
space:
mode:
authornaughtyfox <mail.for.milo@gmail.com>2018-03-21 20:34:15 +0300
committernaughtyfox <mail.for.milo@gmail.com>2018-03-28 16:11:16 +0300
commit47fdb7427357773874c33aac194270caaf46388e (patch)
tree6b5a63f1c8b1d78ed50c9c7ffafbb1de91776b05 /src/wallet/api/wallet2_api.h
parentMerge pull request #3434 (diff)
downloadmonero-47fdb7427357773874c33aac194270caaf46388e.tar.xz
Refactored: work with wallet api statuses to make setting and getting operations atomic along with error strings
WalletApi: added method statusWithErrorString to atomically retrieve error with error string
Diffstat (limited to 'src/wallet/api/wallet2_api.h')
-rw-r--r--src/wallet/api/wallet2_api.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
index d4e41c5aa..6ffef4400 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -358,9 +358,11 @@ struct Wallet
virtual std::string getSeedLanguage() const = 0;
virtual void setSeedLanguage(const std::string &arg) = 0;
//! returns wallet status (Status_Ok | Status_Error)
- virtual int status() const = 0;
+ virtual int status() const = 0; //deprecated: use safe alternative statusWithErrorString
//! in case error status, returns error string
- virtual std::string errorString() const = 0;
+ virtual std::string errorString() const = 0; //deprecated: use safe alternative statusWithErrorString
+ //! returns both error and error string atomically. suggested to use in instead of status() and errorString()
+ virtual void statusWithErrorString(int& status, std::string& errorString) const = 0;
virtual bool setPassword(const std::string &password) = 0;
virtual std::string address(uint32_t accountIndex = 0, uint32_t addressIndex = 0) const = 0;
std::string mainAddress() const { return address(0, 0); }