forked from lthn/blockchain
added class drafts for plain wallet api for mobile app - added missing files
This commit is contained in:
parent
41d4a9b0d3
commit
dc215dacb4
4 changed files with 94 additions and 0 deletions
39
src/wallet/plain_wallet_api.cpp
Normal file
39
src/wallet/plain_wallet_api.cpp
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
// Copyright (c) 2014-2020 Zano Project
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
||||
#include "plain_wallet_api.h"
|
||||
#include "plain_wallet_api_impl.h"
|
||||
|
||||
namespace wallet
|
||||
{
|
||||
hwallet create_instance(const std::string port, const std::string ip)
|
||||
{
|
||||
|
||||
}
|
||||
void destroy_instance(hwallet)
|
||||
{
|
||||
|
||||
}
|
||||
std::string open(const std::string& path, const std::string password)
|
||||
{
|
||||
|
||||
}
|
||||
void start_sync_thread(hwallet)
|
||||
{
|
||||
|
||||
}
|
||||
std::string get_sync_status(hwallet)
|
||||
{
|
||||
|
||||
}
|
||||
std::string sync(hwallet)
|
||||
{
|
||||
|
||||
}
|
||||
std::string invoke(hwallet h, const std::string& params)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
20
src/wallet/plain_wallet_api.h
Normal file
20
src/wallet/plain_wallet_api.h
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright (c) 2014-2020 Zano Project
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace wallet
|
||||
{
|
||||
typedef void* hwallet;
|
||||
hwallet create_instance(const std::string port, const std::string ip);
|
||||
void destroy_instance(hwallet);
|
||||
std::string open(const std::string& path, const std::string password);
|
||||
void start_sync_thread(hwallet);
|
||||
std::string get_sync_status(hwallet);
|
||||
std::string sync(hwallet);
|
||||
std::string invoke(hwallet h, const std::string& params);
|
||||
}
|
||||
13
src/wallet/plain_wallet_api_impl.cpp
Normal file
13
src/wallet/plain_wallet_api_impl.cpp
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
// Copyright (c) 2014-2018 Zano Project
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "plain_wallet_api_impl.h"
|
||||
|
||||
namespace wallet
|
||||
{
|
||||
bool plain_wallet_api_impl::init(const std::string ip, const std::string port)
|
||||
{
|
||||
return true;//TODO
|
||||
}
|
||||
}
|
||||
22
src/wallet/plain_wallet_api_impl.h
Normal file
22
src/wallet/plain_wallet_api_impl.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright (c) 2014-2020 Zano Project
|
||||
// Distributed under the MIT/X11 software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "wallet2.h"
|
||||
|
||||
|
||||
namespace wallet
|
||||
{
|
||||
class plain_wallet_api_impl
|
||||
{
|
||||
public:
|
||||
bool init(const std::string ip, const std::string port);
|
||||
private:
|
||||
std::shared_ptr<tools::wallet2> m_wallet;
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue