new funcs:
MONERO_Wallet_setOffline MONERO_Wallet_isOffline MONERO_WalletManager_setProxy MONERO_WalletManagerFactory_setLogLevel
This commit is contained in:
@@ -341,6 +341,17 @@ void* MONERO_Wallet_history(void* wallet_ptr) {
|
||||
Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
|
||||
return reinterpret_cast<void*>(wallet->history());
|
||||
}
|
||||
// virtual void setOffline(bool offline) = 0;
|
||||
void MONERO_Wallet_setOffline(void* wallet_ptr, bool offline) {
|
||||
Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
|
||||
return wallet->setOffline(offline);
|
||||
}
|
||||
// virtual bool isOffline() const = 0;
|
||||
bool MONERO_Wallet_isOffline(void* wallet_ptr) {
|
||||
Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
|
||||
return wallet->isOffline();
|
||||
}
|
||||
|
||||
uint64_t MONERO_Wallet_getBytesReceived(void* wallet_ptr) {
|
||||
Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
|
||||
return wallet->getBytesReceived();
|
||||
@@ -402,8 +413,19 @@ void MONERO_WalletManager_setDaemonAddress(const char* address) {
|
||||
return Monero::WalletManagerFactory::getWalletManager()->setDaemonAddress(std::string(address));
|
||||
}
|
||||
|
||||
bool MONERO_WalletManager_setProxy(const char* address) {
|
||||
return Monero::WalletManagerFactory::getWalletManager()->setProxy(std::string(address));
|
||||
}
|
||||
|
||||
// WalletManagerFactory
|
||||
|
||||
void MONERO_WalletManagerFactory_setLogLevel(int level) {
|
||||
Monero::WalletManagerFactory::setLogLevel(level);
|
||||
}
|
||||
|
||||
// DEBUG functions
|
||||
|
||||
|
||||
// the Answer to the Ultimate Question of Life, the Universe, and Everything.
|
||||
int MONERO_DEBUG_theAnswerToTheUltimateQuestionOfLifeTheUniverseAndEverything(int x) {
|
||||
return x*42;
|
||||
|
||||
@@ -561,7 +561,9 @@ void* MONERO_Wallet_history(void* wallet_ptr);
|
||||
// virtual std::string getDefaultDataDir() const = 0;
|
||||
// virtual bool rescanSpent() = 0;
|
||||
// virtual void setOffline(bool offline) = 0;
|
||||
void MONERO_Wallet_setOffline(void* wallet_ptr, bool offline);
|
||||
// virtual bool isOffline() const = 0;
|
||||
bool MONERO_Wallet_isOffline(void* wallet_ptr);
|
||||
// virtual bool blackballOutputs(const std::vector<std::string> &outputs, bool add) = 0;
|
||||
// virtual bool blackballOutput(const std::string &amount, const std::string &offset) = 0;
|
||||
// virtual bool unblackballOutput(const std::string &amount, const std::string &offset) = 0;
|
||||
@@ -686,8 +688,18 @@ void MONERO_WalletManager_setDaemonAddress(const char* address);
|
||||
// const char *buildtag = nullptr,
|
||||
// const char *current_version = nullptr);
|
||||
// virtual bool setProxy(const std::string &address) = 0;
|
||||
bool MONERO_WalletManager_setProxy(const char* address);
|
||||
// };
|
||||
|
||||
int LogLevel_Silent = -1;
|
||||
int LogLevel_0 = 0;
|
||||
int LogLevel_1 = 1;
|
||||
int LogLevel_2 = 2;
|
||||
int LogLevel_3 = 3;
|
||||
int LogLevel_4 = 4;
|
||||
int LogLevel_Min = LogLevel_Silent;
|
||||
int LogLevel_Max = LogLevel_4;
|
||||
|
||||
// struct WalletManagerFactory
|
||||
// {
|
||||
// enum LogLevel {
|
||||
@@ -702,6 +714,7 @@ void MONERO_WalletManager_setDaemonAddress(const char* address);
|
||||
// };
|
||||
// static WalletManager * getWalletManager();
|
||||
// static void setLogLevel(int level);
|
||||
void MONERO_WalletManagerFactory_setLogLevel(int level);
|
||||
// static void setLogCategories(const std::string &categories);
|
||||
// };
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user