diff options
| author | Czarek Nakamoto <cyjan@mrcyjanek.net> | 2026-05-06 13:48:00 -0400 |
|---|---|---|
| committer | Czarek Nakamoto <cyjan@mrcyjanek.net> | 2026-05-07 11:28:22 -0400 |
| commit | 7b95d7276fc321cf7eab88475c51b2829b8e4188 (patch) | |
| tree | 2cfe0c0984d86cacbf53ee1cb33ee536fc3979df /monero_libwallet2_api_c/src/main | |
| parent | bc8d1a0b75b97156d71579581b4cdfe58c777ed2 (diff) | |
trezorcyjan-twip
Diffstat (limited to 'monero_libwallet2_api_c/src/main')
| -rw-r--r-- | monero_libwallet2_api_c/src/main/cpp/monero_wallet2_api_c.cpp | 40 | ||||
| -rw-r--r-- | monero_libwallet2_api_c/src/main/cpp/monero_wallet2_api_c.h | 20 |
2 files changed, 30 insertions, 30 deletions
diff --git a/monero_libwallet2_api_c/src/main/cpp/monero_wallet2_api_c.cpp b/monero_libwallet2_api_c/src/main/cpp/monero_wallet2_api_c.cpp index b9ff95f..73a4b8b 100644 --- a/monero_libwallet2_api_c/src/main/cpp/monero_wallet2_api_c.cpp +++ b/monero_libwallet2_api_c/src/main/cpp/monero_wallet2_api_c.cpp @@ -2148,63 +2148,63 @@ uint64_t MONERO_Wallet_getBytesSent(void* wallet_ptr) { DEBUG_END() } -bool MONERO_Wallet_getStateIsConnected() { +bool MONERO_Wallet_getStateIsConnected(int device) { DEBUG_START() - return Monero::Wallet::getStateIsConnected(); + return Monero::Wallet::getStateIsConnected(static_cast<Monero::Wallet::Device>(device)); DEBUG_END() } -unsigned char* MONERO_Wallet_getSendToDevice() { +unsigned char* MONERO_Wallet_getSendToDevice(int device) { DEBUG_START() - return Monero::Wallet::getSendToDevice(); + return Monero::Wallet::getSendToDevice(static_cast<Monero::Wallet::Device>(device)); DEBUG_END() } -size_t MONERO_Wallet_getSendToDeviceLength() { +size_t MONERO_Wallet_getSendToDeviceLength(int device) { DEBUG_START() - return Monero::Wallet::getSendToDeviceLength(); + return Monero::Wallet::getSendToDeviceLength(static_cast<Monero::Wallet::Device>(device)); DEBUG_END() } -unsigned char* MONERO_Wallet_getReceivedFromDevice() { +unsigned char* MONERO_Wallet_getReceivedFromDevice(int device) { DEBUG_START() - return Monero::Wallet::getReceivedFromDevice(); + return Monero::Wallet::getReceivedFromDevice(static_cast<Monero::Wallet::Device>(device)); DEBUG_END() } -size_t MONERO_Wallet_getReceivedFromDeviceLength() { +size_t MONERO_Wallet_getReceivedFromDeviceLength(int device) { DEBUG_START() - return Monero::Wallet::getReceivedFromDeviceLength(); + return Monero::Wallet::getReceivedFromDeviceLength(static_cast<Monero::Wallet::Device>(device)); DEBUG_END() } -bool MONERO_Wallet_getWaitsForDeviceSend() { +bool MONERO_Wallet_getWaitsForDeviceSend(int device) { DEBUG_START() - return Monero::Wallet::getWaitsForDeviceSend(); + return Monero::Wallet::getWaitsForDeviceSend(static_cast<Monero::Wallet::Device>(device)); DEBUG_END() } -bool MONERO_Wallet_getWaitsForDeviceReceive() { +bool MONERO_Wallet_getWaitsForDeviceReceive(int device) { DEBUG_START() - return Monero::Wallet::getWaitsForDeviceReceive(); + return Monero::Wallet::getWaitsForDeviceReceive(static_cast<Monero::Wallet::Device>(device)); DEBUG_END() } -void MONERO_Wallet_setDeviceReceivedData(unsigned char* data, size_t len) { +void MONERO_Wallet_setDeviceReceivedData(int device, unsigned char* data, size_t len) { DEBUG_START() - Monero::Wallet::setDeviceReceivedData(data, len); + Monero::Wallet::setDeviceReceivedData(static_cast<Monero::Wallet::Device>(device), data, len); DEBUG_END() } -void MONERO_Wallet_setDeviceSendData(unsigned char* data, size_t len) { +void MONERO_Wallet_setDeviceSendData(int device, unsigned char* data, size_t len) { DEBUG_START() - Monero::Wallet::setDeviceSendData(data, len); + Monero::Wallet::setDeviceSendData(static_cast<Monero::Wallet::Device>(device), data, len); DEBUG_END() } -void MONERO_Wallet_setLedgerCallback(void (*sendToLedgerDevice)(unsigned char *command, unsigned int cmd_len)) { +void MONERO_Wallet_setDeviceCallback(int device, void (*sendToDeviceCallback)(unsigned char *command, unsigned int cmd_len)) { DEBUG_START() - Monero::Wallet::setLedgerCallback(sendToLedgerDevice); + Monero::Wallet::setDeviceCallback(static_cast<Monero::Wallet::Device>(device), sendToDeviceCallback); DEBUG_END() } diff --git a/monero_libwallet2_api_c/src/main/cpp/monero_wallet2_api_c.h b/monero_libwallet2_api_c/src/main/cpp/monero_wallet2_api_c.h index 39bca89..ad9c486 100644 --- a/monero_libwallet2_api_c/src/main/cpp/monero_wallet2_api_c.h +++ b/monero_libwallet2_api_c/src/main/cpp/monero_wallet2_api_c.h @@ -837,16 +837,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(); -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)); +extern ADDAPI bool MONERO_Wallet_getStateIsConnected(int device); +extern ADDAPI unsigned char* MONERO_Wallet_getSendToDevice(int device); +extern ADDAPI size_t MONERO_Wallet_getSendToDeviceLength(int device); +extern ADDAPI unsigned char* MONERO_Wallet_getReceivedFromDevice(int device); +extern ADDAPI size_t MONERO_Wallet_getReceivedFromDeviceLength(int device); +extern ADDAPI bool MONERO_Wallet_getWaitsForDeviceSend(int device); +extern ADDAPI bool MONERO_Wallet_getWaitsForDeviceReceive(int device); +extern ADDAPI void MONERO_Wallet_setDeviceReceivedData(int device, unsigned char* data, size_t len); +extern ADDAPI void MONERO_Wallet_setDeviceSendData(int device, unsigned char* data, size_t len); +extern ADDAPI void MONERO_Wallet_setDeviceCallback(int device, void (*sendToDeviceCallback)(unsigned char *command, unsigned int cmd_len)); extern ADDAPI const char* MONERO_Wallet_serializeCacheToJson(void* wallet_ptr); // }; |
