wallet2_api: implement runtime proxy configuration

This commit is contained in:
xiphon
2020-07-20 13:45:12 +00:00
parent 5d850dde99
commit 76c16822d0
19 changed files with 212 additions and 54 deletions
+6 -1
View File
@@ -533,9 +533,10 @@ struct Wallet
* \param daemon_username
* \param daemon_password
* \param lightWallet - start wallet in light mode, connect to a openmonero compatible server.
* \param proxy_address - set proxy address, empty string to disable
* \return - true on success
*/
virtual bool init(const std::string &daemon_address, uint64_t upper_transaction_size_limit = 0, const std::string &daemon_username = "", const std::string &daemon_password = "", bool use_ssl = false, bool lightWallet = false) = 0;
virtual bool init(const std::string &daemon_address, uint64_t upper_transaction_size_limit = 0, const std::string &daemon_username = "", const std::string &daemon_password = "", bool use_ssl = false, bool lightWallet = false, const std::string &proxy_address = "") = 0;
/*!
* \brief createWatchOnly - Creates a watch only wallet
@@ -594,6 +595,7 @@ struct Wallet
virtual ConnectionStatus connected() const = 0;
virtual void setTrustedDaemon(bool arg) = 0;
virtual bool trustedDaemon() const = 0;
virtual bool setProxy(const std::string &address) = 0;
virtual uint64_t balance(uint32_t accountIndex = 0) const = 0;
uint64_t balanceAll() const {
uint64_t result = 0;
@@ -1298,6 +1300,9 @@ struct WalletManager
std::string subdir,
const char *buildtag = nullptr,
const char *current_version = nullptr);
//! sets proxy address, empty string to disable
virtual bool setProxy(const std::string &address) = 0;
};