summaryrefslogtreecommitdiff
path: root/monero_libwallet2_api_c/src
diff options
context:
space:
mode:
Diffstat (limited to 'monero_libwallet2_api_c/src')
-rw-r--r--monero_libwallet2_api_c/src/main/cpp/monero_checksum.h4
-rw-r--r--monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp55
-rw-r--r--monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h19
3 files changed, 40 insertions, 38 deletions
diff --git a/monero_libwallet2_api_c/src/main/cpp/monero_checksum.h b/monero_libwallet2_api_c/src/main/cpp/monero_checksum.h
index 4e0fb1c..d3d7414 100644
--- a/monero_libwallet2_api_c/src/main/cpp/monero_checksum.h
+++ b/monero_libwallet2_api_c/src/main/cpp/monero_checksum.h
@@ -1,6 +1,6 @@
#ifndef MONEROC_CHECKSUMS
#define MONEROC_CHECKSUMS
-const char * MONERO_wallet2_api_c_h_sha256 = "9e80c4b59a0509aa02fbf01e8df2881b89f82225d1765bfa7856cbdbaf7af116";
-const char * MONERO_wallet2_api_c_cpp_sha256 = "d229507db508e574bd2badf4819a38dbead8c16a84311ad32c22c887a6003439-0232839913b13cf0ab0bb7ad25fff0c05f37d2fe";
+const char * MONERO_wallet2_api_c_h_sha256 = "91218f60e937753a606b1db899ee2ed66a1b02144eb2d79b950ce59804397f84";
+const char * MONERO_wallet2_api_c_cpp_sha256 = "282128494f3419c128dff7ed67daadd9c2ad0600d10557e829df03d9bc1ad891-0232839913b13cf0ab0bb7ad25fff0c05f37d2fe";
const char * MONERO_wallet2_api_c_exp_sha256 = "d0f95f1f3bc49f1f59fe4eb0b61826128d7d3bb75405d5a01a252d02db03097d";
#endif
diff --git a/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp b/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp
index 19192cf..fce37c4 100644
--- a/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp
+++ b/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp
@@ -2102,62 +2102,63 @@ uint64_t MONERO_Wallet_getBytesSent(void* wallet_ptr) {
DEBUG_END()
}
-bool MONERO_Wallet_getStateIsConnected(void* wallet_ptr) {
+bool MONERO_Wallet_getStateIsConnected() {
DEBUG_START()
- Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
- return wallet->getStateIsConnected();
+ return Monero::Wallet::getStateIsConnected();
DEBUG_END()
}
-unsigned char* MONERO_Wallet_getSendToDevice(void* wallet_ptr) {
- Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
- return wallet->getSendToDevice();
+unsigned char* MONERO_Wallet_getSendToDevice() {
+ DEBUG_START()
+ return Monero::Wallet::getSendToDevice();
+ DEBUG_END()
}
-size_t MONERO_Wallet_getSendToDeviceLength(void* wallet_ptr) {
+size_t MONERO_Wallet_getSendToDeviceLength() {
DEBUG_START()
- Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
- return wallet->getSendToDeviceLength();
+ return Monero::Wallet::getSendToDeviceLength();
DEBUG_END()
}
-unsigned char* MONERO_Wallet_getReceivedFromDevice(void* wallet_ptr) {
- Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
- return wallet->getReceivedFromDevice();
+unsigned char* MONERO_Wallet_getReceivedFromDevice() {
+ DEBUG_START()
+ return Monero::Wallet::getReceivedFromDevice();
+ DEBUG_END()
}
-size_t MONERO_Wallet_getReceivedFromDeviceLength(void* wallet_ptr) {
+size_t MONERO_Wallet_getReceivedFromDeviceLength() {
DEBUG_START()
- Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
- return wallet->getReceivedFromDeviceLength();
+ return Monero::Wallet::getReceivedFromDeviceLength();
DEBUG_END()
}
-bool MONERO_Wallet_getWaitsForDeviceSend(void* wallet_ptr) {
+bool MONERO_Wallet_getWaitsForDeviceSend() {
DEBUG_START()
- Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
- return wallet->getWaitsForDeviceSend();
+ return Monero::Wallet::getWaitsForDeviceSend();
DEBUG_END()
}
-bool MONERO_Wallet_getWaitsForDeviceReceive(void* wallet_ptr) {
+bool MONERO_Wallet_getWaitsForDeviceReceive() {
DEBUG_START()
- Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
- return wallet->getWaitsForDeviceReceive();
+ return Monero::Wallet::getWaitsForDeviceReceive();
DEBUG_END()
}
-void MONERO_Wallet_setDeviceReceivedData(void* wallet_ptr, unsigned char* data, size_t len) {
+void MONERO_Wallet_setDeviceReceivedData(unsigned char* data, size_t len) {
DEBUG_START()
- Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
- return wallet->setDeviceReceivedData(data, len);
+ Monero::Wallet::setDeviceReceivedData(data, len);
DEBUG_END()
}
-void MONERO_Wallet_setDeviceSendData(void* wallet_ptr, unsigned char* data, size_t len) {
+void MONERO_Wallet_setDeviceSendData(unsigned char* data, size_t len) {
DEBUG_START()
- Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
- return wallet->setDeviceSendData(data, len);
+ Monero::Wallet::setDeviceSendData(data, len);
+ DEBUG_END()
+}
+
+void MONERO_Wallet_setLedgerCallback(void (*sendToLedgerDevice)(unsigned char *command, unsigned int cmd_len)) {
+ DEBUG_START()
+ Monero::Wallet::setLedgerCallback(sendToLedgerDevice);
DEBUG_END()
}
diff --git a/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h b/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h
index 17c647c..580e746 100644
--- a/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h
+++ b/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h
@@ -832,15 +832,16 @@ extern ADDAPI uint64_t MONERO_Wallet_getBytesReceived(void* wallet_ptr);
// virtual uint64_t getBytesSent() = 0;
extern ADDAPI uint64_t MONERO_Wallet_getBytesSent(void* wallet_ptr);
// HIDAPI_DUMMY
-extern ADDAPI bool MONERO_Wallet_getStateIsConnected(void* wallet_ptr);
-extern ADDAPI unsigned char* MONERO_Wallet_getSendToDevice(void* wallet_ptr);
-extern ADDAPI size_t MONERO_Wallet_getSendToDeviceLength(void* wallet_ptr);
-extern ADDAPI unsigned char* MONERO_Wallet_getReceivedFromDevice(void* wallet_ptr);
-extern ADDAPI size_t MONERO_Wallet_getReceivedFromDeviceLength(void* wallet_ptr);
-extern ADDAPI bool MONERO_Wallet_getWaitsForDeviceSend(void* wallet_ptr);
-extern ADDAPI bool MONERO_Wallet_getWaitsForDeviceReceive(void* wallet_ptr);
-extern ADDAPI void MONERO_Wallet_setDeviceReceivedData(void* wallet_ptr, unsigned char* data, size_t len);
-extern ADDAPI void MONERO_Wallet_setDeviceSendData(void* wallet_ptr, unsigned char* data, size_t len);
+extern ADDAPI bool MONERO_Wallet_getStateIsConnected();
+extern ADDAPI unsigned char* MONERO_Wallet_getSendToDevice();
+extern ADDAPI size_t MONERO_Wallet_getSendToDeviceLength();
+extern ADDAPI unsigned char* MONERO_Wallet_getReceivedFromDevice();
+extern ADDAPI size_t MONERO_Wallet_getReceivedFromDeviceLength();
+extern ADDAPI bool MONERO_Wallet_getWaitsForDeviceSend();
+extern ADDAPI bool MONERO_Wallet_getWaitsForDeviceReceive();
+extern ADDAPI void MONERO_Wallet_setDeviceReceivedData(unsigned char* data, size_t len);
+extern ADDAPI void MONERO_Wallet_setDeviceSendData(unsigned char* data, size_t len);
+extern ADDAPI void MONERO_Wallet_setLedgerCallback(void (*sendToLedgerDevice)(unsigned char *command, unsigned int cmd_len));
// };
// struct WalletManager