From 60fe1b61e04db33c9a5147f950a860a08f9ffe38 Mon Sep 17 00:00:00 2001 From: MoroccanMalinois Date: Sun, 8 Jan 2017 22:53:24 +0000 Subject: Add parse_uri to wallet2_api --- src/wallet/api/wallet.cpp | 5 +++++ src/wallet/api/wallet.h | 1 + src/wallet/wallet2_api.h | 2 ++ 3 files changed, 8 insertions(+) diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index 3a4493ec3..e3006698e 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -1089,6 +1089,11 @@ void WalletImpl::doInit(const string &daemon_address, uint64_t upper_transaction } +bool WalletImpl::parse_uri(const std::string &uri, std::string &address, std::string &payment_id, uint64_t &amount, std::string &tx_description, std::string &recipient_name, std::vector &unknown_parameters, std::string &error) +{ + return m_wallet->parse_uri(uri, address, payment_id, amount, tx_description, recipient_name, unknown_parameters, error); +} + } // namespace namespace Bitmonero = Monero; diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h index d245a78d0..6c0b8ef23 100644 --- a/src/wallet/api/wallet.h +++ b/src/wallet/api/wallet.h @@ -109,6 +109,7 @@ public: virtual bool verifySignedMessage(const std::string &message, const std::string &address, const std::string &signature) const; virtual void startRefresh(); virtual void pauseRefresh(); + virtual bool parse_uri(const std::string &uri, std::string &address, std::string &payment_id, uint64_t &amount, std::string &tx_description, std::string &recipient_name, std::vector &unknown_parameters, std::string &error); private: void clearStatus(); diff --git a/src/wallet/wallet2_api.h b/src/wallet/wallet2_api.h index 2e1d95b58..7cfeef080 100644 --- a/src/wallet/wallet2_api.h +++ b/src/wallet/wallet2_api.h @@ -468,6 +468,8 @@ struct Wallet * \return true if the signature verified, false otherwise */ virtual bool verifySignedMessage(const std::string &message, const std::string &addres, const std::string &signature) const = 0; + + virtual bool parse_uri(const std::string &uri, std::string &address, std::string &payment_id, uint64_t &amount, std::string &tx_description, std::string &recipient_name, std::vector &unknown_parameters, std::string &error) = 0; }; /** -- cgit v1.2.3