summaryrefslogtreecommitdiff
path: root/libbridge/src/main/cpp/wallet2_api_c.cpp
diff options
context:
space:
mode:
authorCzarek Nakamoto <cyjan@mrcyjanek.net>2023-12-29 16:41:19 +0100
committerCzarek Nakamoto <cyjan@mrcyjanek.net>2023-12-29 16:41:19 +0100
commit66e06c38f605cdb53b859cebb3059e5f44340601 (patch)
treeb3e084a78c71a5abe11cbfaef1c204a826bc1114 /libbridge/src/main/cpp/wallet2_api_c.cpp
parenteabe10d3d9f219933645407c1b80b8c93eb4573c (diff)
new funcs:
MONERO_Wallet_setOffline MONERO_Wallet_isOffline MONERO_WalletManager_setProxy MONERO_WalletManagerFactory_setLogLevel
Diffstat (limited to 'libbridge/src/main/cpp/wallet2_api_c.cpp')
-rw-r--r--libbridge/src/main/cpp/wallet2_api_c.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/libbridge/src/main/cpp/wallet2_api_c.cpp b/libbridge/src/main/cpp/wallet2_api_c.cpp
index 18a17c9..e5f6b79 100644
--- a/libbridge/src/main/cpp/wallet2_api_c.cpp
+++ b/libbridge/src/main/cpp/wallet2_api_c.cpp
@@ -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;