X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FChannelMessageHandler.java;h=b2c0a1225c07d79a878e6a60cfb9fc2f6d1439f0;hb=592c4f92dd3011a2f2a7988ce66ed166c3a8f58c;hp=a981ecab48e354f70a0b6d11e574fbafe53a7253;hpb=2ed9081562d00a8645604b07629e963231d49e0f;p=ldk-java diff --git a/src/main/java/org/ldk/structs/ChannelMessageHandler.java b/src/main/java/org/ldk/structs/ChannelMessageHandler.java index a981ecab..b2c0a122 100644 --- a/src/main/java/org/ldk/structs/ChannelMessageHandler.java +++ b/src/main/java/org/ldk/structs/ChannelMessageHandler.java @@ -15,99 +15,89 @@ public class ChannelMessageHandler extends CommonBase { bindings.ChannelMessageHandler_free(ptr); super.finalize(); } - public void call_handle_open_channel(byte[] their_node_id, InitFeatures their_features, OpenChannel msg) { - bindings.ChannelMessageHandler_call_handle_open_channel(this.ptr, their_node_id, their_features == null ? 0 : their_features.ptr & ~1, msg == null ? 0 : msg.ptr & ~1); - this.ptrs_to.add(their_features); + // Skipped ChannelMessageHandler_handle_open_channel + // Skipped ChannelMessageHandler_handle_accept_channel + public void handle_funding_created(byte[] their_node_id, FundingCreated msg) { + bindings.ChannelMessageHandler_handle_funding_created(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); this.ptrs_to.add(msg); } - public void call_handle_accept_channel(byte[] their_node_id, InitFeatures their_features, AcceptChannel msg) { - bindings.ChannelMessageHandler_call_handle_accept_channel(this.ptr, their_node_id, their_features == null ? 0 : their_features.ptr & ~1, msg == null ? 0 : msg.ptr & ~1); - this.ptrs_to.add(their_features); + public void handle_funding_signed(byte[] their_node_id, FundingSigned msg) { + bindings.ChannelMessageHandler_handle_funding_signed(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); this.ptrs_to.add(msg); } - public void call_handle_funding_created(byte[] their_node_id, FundingCreated msg) { - bindings.ChannelMessageHandler_call_handle_funding_created(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); + public void handle_funding_locked(byte[] their_node_id, FundingLocked msg) { + bindings.ChannelMessageHandler_handle_funding_locked(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); this.ptrs_to.add(msg); } - public void call_handle_funding_signed(byte[] their_node_id, FundingSigned msg) { - bindings.ChannelMessageHandler_call_handle_funding_signed(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); + public void handle_shutdown(byte[] their_node_id, Shutdown msg) { + bindings.ChannelMessageHandler_handle_shutdown(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); this.ptrs_to.add(msg); } - public void call_handle_funding_locked(byte[] their_node_id, FundingLocked msg) { - bindings.ChannelMessageHandler_call_handle_funding_locked(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); + public void handle_closing_signed(byte[] their_node_id, ClosingSigned msg) { + bindings.ChannelMessageHandler_handle_closing_signed(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); this.ptrs_to.add(msg); } - public void call_handle_shutdown(byte[] their_node_id, Shutdown msg) { - bindings.ChannelMessageHandler_call_handle_shutdown(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); + public void handle_update_add_htlc(byte[] their_node_id, UpdateAddHTLC msg) { + bindings.ChannelMessageHandler_handle_update_add_htlc(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); this.ptrs_to.add(msg); } - public void call_handle_closing_signed(byte[] their_node_id, ClosingSigned msg) { - bindings.ChannelMessageHandler_call_handle_closing_signed(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); + public void handle_update_fulfill_htlc(byte[] their_node_id, UpdateFulfillHTLC msg) { + bindings.ChannelMessageHandler_handle_update_fulfill_htlc(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); this.ptrs_to.add(msg); } - public void call_handle_update_add_htlc(byte[] their_node_id, UpdateAddHTLC msg) { - bindings.ChannelMessageHandler_call_handle_update_add_htlc(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); + public void handle_update_fail_htlc(byte[] their_node_id, UpdateFailHTLC msg) { + bindings.ChannelMessageHandler_handle_update_fail_htlc(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); this.ptrs_to.add(msg); } - public void call_handle_update_fulfill_htlc(byte[] their_node_id, UpdateFulfillHTLC msg) { - bindings.ChannelMessageHandler_call_handle_update_fulfill_htlc(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); + public void handle_update_fail_malformed_htlc(byte[] their_node_id, UpdateFailMalformedHTLC msg) { + bindings.ChannelMessageHandler_handle_update_fail_malformed_htlc(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); this.ptrs_to.add(msg); } - public void call_handle_update_fail_htlc(byte[] their_node_id, UpdateFailHTLC msg) { - bindings.ChannelMessageHandler_call_handle_update_fail_htlc(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); + public void handle_commitment_signed(byte[] their_node_id, CommitmentSigned msg) { + bindings.ChannelMessageHandler_handle_commitment_signed(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); this.ptrs_to.add(msg); } - public void call_handle_update_fail_malformed_htlc(byte[] their_node_id, UpdateFailMalformedHTLC msg) { - bindings.ChannelMessageHandler_call_handle_update_fail_malformed_htlc(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); + public void handle_revoke_and_ack(byte[] their_node_id, RevokeAndACK msg) { + bindings.ChannelMessageHandler_handle_revoke_and_ack(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); this.ptrs_to.add(msg); } - public void call_handle_commitment_signed(byte[] their_node_id, CommitmentSigned msg) { - bindings.ChannelMessageHandler_call_handle_commitment_signed(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); + public void handle_update_fee(byte[] their_node_id, UpdateFee msg) { + bindings.ChannelMessageHandler_handle_update_fee(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); this.ptrs_to.add(msg); } - public void call_handle_revoke_and_ack(byte[] their_node_id, RevokeAndACK msg) { - bindings.ChannelMessageHandler_call_handle_revoke_and_ack(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); + public void handle_announcement_signatures(byte[] their_node_id, AnnouncementSignatures msg) { + bindings.ChannelMessageHandler_handle_announcement_signatures(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); this.ptrs_to.add(msg); } - public void call_handle_update_fee(byte[] their_node_id, UpdateFee msg) { - bindings.ChannelMessageHandler_call_handle_update_fee(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); - this.ptrs_to.add(msg); - } - - public void call_handle_announcement_signatures(byte[] their_node_id, AnnouncementSignatures msg) { - bindings.ChannelMessageHandler_call_handle_announcement_signatures(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); - this.ptrs_to.add(msg); - } - - public void call_peer_disconnected(byte[] their_node_id, boolean no_connection_possible) { - bindings.ChannelMessageHandler_call_peer_disconnected(this.ptr, their_node_id, no_connection_possible); + public void peer_disconnected(byte[] their_node_id, boolean no_connection_possible) { + bindings.ChannelMessageHandler_peer_disconnected(this.ptr, their_node_id, no_connection_possible); } - public void call_peer_connected(byte[] their_node_id, Init msg) { - bindings.ChannelMessageHandler_call_peer_connected(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); + public void peer_connected(byte[] their_node_id, Init msg) { + bindings.ChannelMessageHandler_peer_connected(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); this.ptrs_to.add(msg); } - public void call_handle_channel_reestablish(byte[] their_node_id, ChannelReestablish msg) { - bindings.ChannelMessageHandler_call_handle_channel_reestablish(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); + public void handle_channel_reestablish(byte[] their_node_id, ChannelReestablish msg) { + bindings.ChannelMessageHandler_handle_channel_reestablish(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); this.ptrs_to.add(msg); } - public void call_handle_error(byte[] their_node_id, ErrorMessage msg) { - bindings.ChannelMessageHandler_call_handle_error(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); + public void handle_error(byte[] their_node_id, ErrorMessage msg) { + bindings.ChannelMessageHandler_handle_error(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1); this.ptrs_to.add(msg); }