summaryrefslogtreecommitdiff
path: root/libbridge
diff options
context:
space:
mode:
authorCzarek Nakamoto <cyjan@mrcyjanek.net>2024-01-05 14:59:45 +0100
committerCzarek Nakamoto <cyjan@mrcyjanek.net>2024-01-05 14:59:45 +0100
commita2ef1040df905f00482597b50eaec62f4f7b99b1 (patch)
tree5ed6305498fb8aa624c2c13954b7680f7547c1cf /libbridge
parent9511e3bb3098f53fc17b932241813fca68565cc0 (diff)
coins update
Diffstat (limited to 'libbridge')
-rw-r--r--libbridge/src/main/cpp/wallet2_api_c.cpp10
-rw-r--r--libbridge/src/main/cpp/wallet2_api_c.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/libbridge/src/main/cpp/wallet2_api_c.cpp b/libbridge/src/main/cpp/wallet2_api_c.cpp
index 388c0b0..3e56263 100644
--- a/libbridge/src/main/cpp/wallet2_api_c.cpp
+++ b/libbridge/src/main/cpp/wallet2_api_c.cpp
@@ -499,6 +499,16 @@ void* MONERO_Coins_coin(void* coins_ptr, int index) {
Monero::Coins *coins = reinterpret_cast<Monero::Coins*>(coins_ptr);
return coins->coin(index);
}
+
+int MONERO_Coins_getAll_size(void* coins_ptr) {
+ Monero::Coins *coins = reinterpret_cast<Monero::Coins*>(coins_ptr);
+ return coins->getAll().size();
+}
+void* MONERO_Coins_getAll_byIndex(void* coins_ptr, int index) {
+ Monero::Coins *coins = reinterpret_cast<Monero::Coins*>(coins_ptr);
+ return coins->getAll()[index];
+}
+
// virtual std::vector<CoinsInfo*> getAll() const = 0;
// virtual void refresh() = 0;
void MONERO_Coins_refresh(void* coins_ptr) {
diff --git a/libbridge/src/main/cpp/wallet2_api_c.h b/libbridge/src/main/cpp/wallet2_api_c.h
index 53b75f2..27aa2e3 100644
--- a/libbridge/src/main/cpp/wallet2_api_c.h
+++ b/libbridge/src/main/cpp/wallet2_api_c.h
@@ -304,6 +304,8 @@ int MONERO_Coins_count(void* coins_ptr);
// virtual CoinsInfo * coin(int index) const = 0;
void* MONERO_Coins_coin(void* coins_ptr, int index);
// virtual std::vector<CoinsInfo*> getAll() const = 0;
+int MONERO_Coins_getAll_size(void* coins_ptr);
+void* MONERO_Coins_getAll_byIndex(void* coins_ptr, int index);
// virtual void refresh() = 0;
void MONERO_Coins_refresh(void* coins_ptr);
// virtual void setFrozen(std::string public_key) = 0;