projects
/
ldk-c-bindings
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update auto-generated bindings to LDK 0.0.118
[ldk-c-bindings]
/
lightning-c-bindings
/
src
/
lightning_background_processor.rs
diff --git
a/lightning-c-bindings/src/lightning_background_processor.rs
b/lightning-c-bindings/src/lightning_background_processor.rs
index 4b8360bfc4369bcedec94f8251c1cda6f5aa4a0a..eb8c0f1dc144439121c16b930f22dc86512122a4 100644
(file)
--- a/
lightning-c-bindings/src/lightning_background_processor.rs
+++ b/
lightning-c-bindings/src/lightning_background_processor.rs
@@
-11,6
+11,7
@@
//! [`BackgroundProcessor`] for more details on the nitty-gritty.
use alloc::str::FromStr;
//! [`BackgroundProcessor`] for more details on the nitty-gritty.
use alloc::str::FromStr;
+use alloc::string::String;
use core::ffi::c_void;
use core::convert::Infallible;
use bitcoin::hashes::Hash;
use core::ffi::c_void;
use core::convert::Infallible;
use bitcoin::hashes::Hash;
@@
-46,6
+47,8
@@
pub(crate) type nativeBackgroundProcessor = nativeBackgroundProcessorImport;
///
/// [`ChannelMonitor`]: lightning::chain::channelmonitor::ChannelMonitor
/// [`Event`]: lightning::events::Event
///
/// [`ChannelMonitor`]: lightning::chain::channelmonitor::ChannelMonitor
/// [`Event`]: lightning::events::Event
+/// [`PeerManager::timer_tick_occurred`]: lightning::ln::peer_handler::PeerManager::timer_tick_occurred
+/// [`PeerManager::process_events`]: lightning::ln::peer_handler::PeerManager::process_events
///BackgroundProcessor will immediately stop on drop. It should be stored until shutdown.
#[must_use]
#[repr(C)]
///BackgroundProcessor will immediately stop on drop. It should be stored until shutdown.
#[must_use]
#[repr(C)]
@@
-148,6
+151,11
@@
impl GossipSync {
/// Frees any resources used by the GossipSync
#[no_mangle]
pub extern "C" fn GossipSync_free(this_ptr: GossipSync) { }
/// Frees any resources used by the GossipSync
#[no_mangle]
pub extern "C" fn GossipSync_free(this_ptr: GossipSync) { }
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+pub(crate) extern "C" fn GossipSync_free_void(this_ptr: *mut c_void) {
+ let _ = unsafe { Box::from_raw(this_ptr as *mut GossipSync) };
+}
#[no_mangle]
/// Utility method to constructs a new P2P-variant GossipSync
pub extern "C" fn GossipSync_p2_p(a: &crate::lightning::routing::gossip::P2PGossipSync) -> GossipSync {
#[no_mangle]
/// Utility method to constructs a new P2P-variant GossipSync
pub extern "C" fn GossipSync_p2_p(a: &crate::lightning::routing::gossip::P2PGossipSync) -> GossipSync {
@@
-225,7
+233,7
@@
pub extern "C" fn BackgroundProcessor_start(mut persister: crate::lightning::uti
/// [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager
#[must_use]
#[no_mangle]
/// [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager
#[must_use]
#[no_mangle]
-pub extern "C" fn BackgroundProcessor_join(mut this_arg: crate::lightning_background_processor::BackgroundProcessor) -> crate::c_types::derived::CResult_NoneErrorZ {
+pub extern "C" fn BackgroundProcessor_join(mut this_arg: crate::lightning_background_processor::BackgroundProcessor) -> crate::c_types::derived::CResult_None
IO
ErrorZ {
let mut ret = (*unsafe { Box::from_raw(this_arg.take_inner()) }).join();
let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::c_types::IOError::from_rust(e) }).into() };
local_ret
let mut ret = (*unsafe { Box::from_raw(this_arg.take_inner()) }).join();
let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::c_types::IOError::from_rust(e) }).into() };
local_ret
@@
-242,7
+250,7
@@
pub extern "C" fn BackgroundProcessor_join(mut this_arg: crate::lightning_backgr
/// [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager
#[must_use]
#[no_mangle]
/// [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager
#[must_use]
#[no_mangle]
-pub extern "C" fn BackgroundProcessor_stop(mut this_arg: crate::lightning_background_processor::BackgroundProcessor) -> crate::c_types::derived::CResult_NoneErrorZ {
+pub extern "C" fn BackgroundProcessor_stop(mut this_arg: crate::lightning_background_processor::BackgroundProcessor) -> crate::c_types::derived::CResult_None
IO
ErrorZ {
let mut ret = (*unsafe { Box::from_raw(this_arg.take_inner()) }).stop();
let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::c_types::IOError::from_rust(e) }).into() };
local_ret
let mut ret = (*unsafe { Box::from_raw(this_arg.take_inner()) }).stop();
let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::c_types::IOError::from_rust(e) }).into() };
local_ret