1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
5 import org.ldk.enums.*;
7 public class ChannelMessageHandler extends CommonBase {
8 ChannelMessageHandler(Object _dummy, long ptr) { super(ptr); }
9 public ChannelMessageHandler(bindings.LDKChannelMessageHandler arg, bindings.LDKMessageSendEventsProvider MessageSendEventsProvider) {
10 super(bindings.LDKChannelMessageHandler_new(arg, MessageSendEventsProvider));
11 this.ptrs_to.add(arg);
13 @Override @SuppressWarnings("deprecation")
14 protected void finalize() throws Throwable {
15 bindings.ChannelMessageHandler_free(ptr); super.finalize();
18 public void call_handle_open_channel(byte[] their_node_id, InitFeatures their_features, OpenChannel msg) {
19 bindings.ChannelMessageHandler_call_handle_open_channel(this.ptr, their_node_id, their_features.ptr & ~1, msg.ptr & ~1);
20 this.ptrs_to.add(their_features);
21 this.ptrs_to.add(msg);
24 public void call_handle_accept_channel(byte[] their_node_id, InitFeatures their_features, AcceptChannel msg) {
25 bindings.ChannelMessageHandler_call_handle_accept_channel(this.ptr, their_node_id, their_features.ptr & ~1, msg.ptr & ~1);
26 this.ptrs_to.add(their_features);
27 this.ptrs_to.add(msg);
30 public void call_handle_funding_created(byte[] their_node_id, FundingCreated msg) {
31 bindings.ChannelMessageHandler_call_handle_funding_created(this.ptr, their_node_id, msg.ptr & ~1);
32 this.ptrs_to.add(msg);
35 public void call_handle_funding_signed(byte[] their_node_id, FundingSigned msg) {
36 bindings.ChannelMessageHandler_call_handle_funding_signed(this.ptr, their_node_id, msg.ptr & ~1);
37 this.ptrs_to.add(msg);
40 public void call_handle_funding_locked(byte[] their_node_id, FundingLocked msg) {
41 bindings.ChannelMessageHandler_call_handle_funding_locked(this.ptr, their_node_id, msg.ptr & ~1);
42 this.ptrs_to.add(msg);
45 public void call_handle_shutdown(byte[] their_node_id, Shutdown msg) {
46 bindings.ChannelMessageHandler_call_handle_shutdown(this.ptr, their_node_id, msg.ptr & ~1);
47 this.ptrs_to.add(msg);
50 public void call_handle_closing_signed(byte[] their_node_id, ClosingSigned msg) {
51 bindings.ChannelMessageHandler_call_handle_closing_signed(this.ptr, their_node_id, msg.ptr & ~1);
52 this.ptrs_to.add(msg);
55 public void call_handle_update_add_htlc(byte[] their_node_id, UpdateAddHTLC msg) {
56 bindings.ChannelMessageHandler_call_handle_update_add_htlc(this.ptr, their_node_id, msg.ptr & ~1);
57 this.ptrs_to.add(msg);
60 public void call_handle_update_fulfill_htlc(byte[] their_node_id, UpdateFulfillHTLC msg) {
61 bindings.ChannelMessageHandler_call_handle_update_fulfill_htlc(this.ptr, their_node_id, msg.ptr & ~1);
62 this.ptrs_to.add(msg);
65 public void call_handle_update_fail_htlc(byte[] their_node_id, UpdateFailHTLC msg) {
66 bindings.ChannelMessageHandler_call_handle_update_fail_htlc(this.ptr, their_node_id, msg.ptr & ~1);
67 this.ptrs_to.add(msg);
70 public void call_handle_update_fail_malformed_htlc(byte[] their_node_id, UpdateFailMalformedHTLC msg) {
71 bindings.ChannelMessageHandler_call_handle_update_fail_malformed_htlc(this.ptr, their_node_id, msg.ptr & ~1);
72 this.ptrs_to.add(msg);
75 public void call_handle_commitment_signed(byte[] their_node_id, CommitmentSigned msg) {
76 bindings.ChannelMessageHandler_call_handle_commitment_signed(this.ptr, their_node_id, msg.ptr & ~1);
77 this.ptrs_to.add(msg);
80 public void call_handle_revoke_and_ack(byte[] their_node_id, RevokeAndACK msg) {
81 bindings.ChannelMessageHandler_call_handle_revoke_and_ack(this.ptr, their_node_id, msg.ptr & ~1);
82 this.ptrs_to.add(msg);
85 public void call_handle_update_fee(byte[] their_node_id, UpdateFee msg) {
86 bindings.ChannelMessageHandler_call_handle_update_fee(this.ptr, their_node_id, msg.ptr & ~1);
87 this.ptrs_to.add(msg);
90 public void call_handle_announcement_signatures(byte[] their_node_id, AnnouncementSignatures msg) {
91 bindings.ChannelMessageHandler_call_handle_announcement_signatures(this.ptr, their_node_id, msg.ptr & ~1);
92 this.ptrs_to.add(msg);
95 public void call_peer_disconnected(byte[] their_node_id, boolean no_connection_possible) {
96 bindings.ChannelMessageHandler_call_peer_disconnected(this.ptr, their_node_id, no_connection_possible);
99 public void call_peer_connected(byte[] their_node_id, Init msg) {
100 bindings.ChannelMessageHandler_call_peer_connected(this.ptr, their_node_id, msg.ptr & ~1);
101 this.ptrs_to.add(msg);
104 public void call_handle_channel_reestablish(byte[] their_node_id, ChannelReestablish msg) {
105 bindings.ChannelMessageHandler_call_handle_channel_reestablish(this.ptr, their_node_id, msg.ptr & ~1);
106 this.ptrs_to.add(msg);
109 public void call_handle_error(byte[] their_node_id, ErrorMessage msg) {
110 bindings.ChannelMessageHandler_call_handle_error(this.ptr, their_node_id, msg.ptr & ~1);
111 this.ptrs_to.add(msg);