32 lines
513 B
C++
32 lines
513 B
C++
#include "stdafx.h"
|
|
#include "SiaApi.h"
|
|
|
|
using namespace Sia::Api;
|
|
|
|
CSiaApi::CSiaApi(const SiaHostConfig& hostConfig) :
|
|
_siaCurl(hostConfig),
|
|
_wallet(new CSiaWallet(_siaCurl)),
|
|
_renter(new CSiaRenter(_siaCurl))
|
|
{
|
|
}
|
|
|
|
CSiaApi::~CSiaApi()
|
|
{
|
|
//TODO Make this an option to lock on exit
|
|
_wallet->Lock();
|
|
}
|
|
|
|
String CSiaApi::GetServerVersion() const
|
|
{
|
|
return _siaCurl.GetServerVersion();
|
|
}
|
|
|
|
CSiaWalletPtr CSiaApi::GetWallet() const
|
|
{
|
|
return _wallet;
|
|
}
|
|
|
|
CSiaRenterPtr CSiaApi::GetRenter() const
|
|
{
|
|
return _renter;
|
|
} |