X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-c-bindings%2Fsrc%2Fln%2Fpeer_handler.rs;h=9f3f8409cfc9484da166c1abb6ae0b45487621a7;hb=b2f0ccc7e0ef8b31567cb017d0b7cce9f7204803;hp=6cb11f35636f5a0a3754b3e5ae8cb8bdf307be51;hpb=04fcb2d0d013cfb63ed656de156f0659f1b1411e;p=ldk-c-bindings diff --git a/lightning-c-bindings/src/ln/peer_handler.rs b/lightning-c-bindings/src/ln/peer_handler.rs index 6cb11f3..9f3f840 100644 --- a/lightning-c-bindings/src/ln/peer_handler.rs +++ b/lightning-c-bindings/src/ln/peer_handler.rs @@ -1,3 +1,11 @@ +// This file is Copyright its original authors, visible in version control +// history and in the source files from which this was generated. +// +// This file is licensed under the license available in the LICENSE or LICENSE.md +// file in the root of this repository or, if no such file exists, the same +// license as that which applies to the original source files from which this +// source was automatically generated. + //! Top level peer message handling and socket handling logic lives here. //! //! Instead of actually servicing sockets ourselves we require that you implement the @@ -312,6 +320,7 @@ pub extern "C" fn ErroringMessageHandler_as_ChannelMessageHandler(this_arg: &Err peer_disconnected: ErroringMessageHandler_ChannelMessageHandler_peer_disconnected, peer_connected: ErroringMessageHandler_ChannelMessageHandler_peer_connected, handle_channel_reestablish: ErroringMessageHandler_ChannelMessageHandler_handle_channel_reestablish, + handle_channel_update: ErroringMessageHandler_ChannelMessageHandler_handle_channel_update, handle_error: ErroringMessageHandler_ChannelMessageHandler_handle_error, MessageSendEventsProvider: crate::util::events::MessageSendEventsProvider { this_arg: unsafe { (*this_arg).inner as *mut c_void }, @@ -369,6 +378,9 @@ extern "C" fn ErroringMessageHandler_ChannelMessageHandler_handle_announcement_s extern "C" fn ErroringMessageHandler_ChannelMessageHandler_handle_channel_reestablish(this_arg: *const c_void, mut their_node_id: crate::c_types::PublicKey, msg: &crate::ln::msgs::ChannelReestablish) { >::handle_channel_reestablish(unsafe { &mut *(this_arg as *mut nativeErroringMessageHandler) }, &their_node_id.into_rust(), unsafe { &*msg.inner }) } +extern "C" fn ErroringMessageHandler_ChannelMessageHandler_handle_channel_update(this_arg: *const c_void, mut _their_node_id: crate::c_types::PublicKey, _msg: &crate::ln::msgs::ChannelUpdate) { + >::handle_channel_update(unsafe { &mut *(this_arg as *mut nativeErroringMessageHandler) }, &_their_node_id.into_rust(), unsafe { &*_msg.inner }) +} extern "C" fn ErroringMessageHandler_ChannelMessageHandler_peer_disconnected(this_arg: *const c_void, mut _their_node_id: crate::c_types::PublicKey, mut _no_connection_possible: bool) { >::peer_disconnected(unsafe { &mut *(this_arg as *mut nativeErroringMessageHandler) }, &_their_node_id.into_rust(), _no_connection_possible) } @@ -512,8 +524,8 @@ pub struct SocketDescriptor { /// Note that the ultimate copy of the SocketDescriptor will have all function pointers the same as the original. /// May be NULL if no action needs to be taken, the this_arg pointer will be copied into the new SocketDescriptor. pub clone: Option *mut c_void>, -/// Frees any resources associated with this object given its this_arg pointer. -/// Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + /// Frees any resources associated with this object given its this_arg pointer. + /// Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. pub free: Option, } impl std::cmp::Eq for SocketDescriptor {}