aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2_api.cpp
diff options
context:
space:
mode:
authorIlya Kitaev <mbg033@gmail.com>2016-02-20 19:04:56 +0300
committerIlya Kitaev <mbg033@gmail.com>2016-03-16 14:27:57 +0300
commit930bed7074c6a54601105bda8f26638ca45e60fd (patch)
tree8c7fff973121add66effcb7554f8095e83225c51 /src/wallet/wallet2_api.cpp
parentwallet2 public api. initial commit (diff)
downloadmonero-930bed7074c6a54601105bda8f26638ca45e60fd.tar.xz
tests for wallet2_api
Diffstat (limited to 'src/wallet/wallet2_api.cpp')
-rw-r--r--src/wallet/wallet2_api.cpp36
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()
}
+
+
+
}