diff options
author | Ilya Kitaev <mbg033@gmail.com> | 2016-02-20 19:04:56 +0300 |
---|---|---|
committer | Ilya Kitaev <mbg033@gmail.com> | 2016-03-16 14:27:57 +0300 |
commit | 930bed7074c6a54601105bda8f26638ca45e60fd (patch) | |
tree | 8c7fff973121add66effcb7554f8095e83225c51 /src/wallet/wallet2_api.cpp | |
parent | wallet2 public api. initial commit (diff) | |
download | monero-930bed7074c6a54601105bda8f26638ca45e60fd.tar.xz |
tests for wallet2_api
Diffstat (limited to 'src/wallet/wallet2_api.cpp')
-rw-r--r-- | src/wallet/wallet2_api.cpp | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/src/wallet/wallet2_api.cpp b/src/wallet/wallet2_api.cpp index 4855d34f3..ffb18c317 100644 --- a/src/wallet/wallet2_api.cpp +++ b/src/wallet/wallet2_api.cpp @@ -32,12 +32,17 @@ #include "wallet2.h" #include <memory> +unsigned int epee::g_test_dbg_lock_sleep = 0; + namespace Bitmonero { struct WalletManagerImpl; namespace { static WalletManagerImpl * g_walletManager = nullptr; + + + } @@ -65,6 +70,8 @@ WalletImpl::WalletImpl() } +Wallet::~Wallet() {} + WalletImpl::~WalletImpl() { //delete m_wallet; @@ -103,6 +110,11 @@ bool WalletImpl::create(const std::string &path, const std::string &password, co return true; } +std::string WalletImpl::seed() const +{ + return ""; +} + ///////////////////////// WalletManager implementation ///////////////////////// @@ -111,13 +123,16 @@ class WalletManagerImpl : public WalletManager public: Wallet * createWallet(const std::string &path, const std::string &password, const std::string &language); + Wallet * openWallet(const std::string &path, const std::string &password); + bool walletExists(const std::string &path); + int lastError() const; private: WalletManagerImpl() {} friend struct WalletManagerFactory; }; -Wallet *WalletManager::createWallet(const std::string &path, const std::string &password, +Wallet *WalletManagerImpl::createWallet(const std::string &path, const std::string &password, const std::string &language) { WalletImpl * wallet = new WalletImpl(); @@ -131,6 +146,22 @@ Wallet *WalletManager::createWallet(const std::string &path, const std::string & } +Wallet *WalletManagerImpl::openWallet(const std::string &path, const std::string &password) +{ + return nullptr; +} + +bool WalletManagerImpl::walletExists(const std::string &path) +{ + return false; +} + +int WalletManagerImpl::lastError() const +{ + return 0; +} + + ///////////////////// WalletManagerFactory implementation ////////////////////// WalletManager *WalletManagerFactory::getWalletManager() { @@ -142,4 +173,7 @@ WalletManager *WalletManagerFactory::getWalletManager() } + + + } |