X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FDirectionalChannelInfo.java;h=8e51c3f245195a973a8d1d60d2f98397ff238eff;hb=9e8763c71cd61d55be7c869d973524f75209a3f3;hp=0b6383564586d24709b2bfe0489f02bcc752dbbf;hpb=110f2f104ba8fc34caa7e34e04737f36f064b050;p=ldk-java diff --git a/src/main/java/org/ldk/structs/DirectionalChannelInfo.java b/src/main/java/org/ldk/structs/DirectionalChannelInfo.java index 0b638356..8e51c3f2 100644 --- a/src/main/java/org/ldk/structs/DirectionalChannelInfo.java +++ b/src/main/java/org/ldk/structs/DirectionalChannelInfo.java @@ -11,7 +11,7 @@ public class DirectionalChannelInfo extends CommonBase { @Override @SuppressWarnings("deprecation") protected void finalize() throws Throwable { super.finalize(); - bindings.DirectionalChannelInfo_free(ptr); + if (ptr != 0) { bindings.DirectionalChannelInfo_free(ptr); } } public int get_last_update() { @@ -50,9 +50,22 @@ public class DirectionalChannelInfo extends CommonBase { bindings.DirectionalChannelInfo_set_htlc_minimum_msat(this.ptr, val); } + public RoutingFees get_fees() { + long ret = bindings.DirectionalChannelInfo_get_fees(this.ptr); + RoutingFees ret_hu_conv = new RoutingFees(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; + } + + public void set_fees(RoutingFees val) { + bindings.DirectionalChannelInfo_set_fees(this.ptr, val == null ? 0 : val.ptr & ~1); + this.ptrs_to.add(val); + } + public ChannelUpdate get_last_update_message() { long ret = bindings.DirectionalChannelInfo_get_last_update_message(this.ptr); ChannelUpdate ret_hu_conv = new ChannelUpdate(null, ret); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } @@ -61,15 +74,21 @@ public class DirectionalChannelInfo extends CommonBase { this.ptrs_to.add(val); } - public byte[] write(DirectionalChannelInfo obj) { - byte[] ret = bindings.DirectionalChannelInfo_write(obj == null ? 0 : obj.ptr & ~1); - this.ptrs_to.add(obj); + public DirectionalChannelInfo clone() { + long ret = bindings.DirectionalChannelInfo_clone(this.ptr); + DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; + } + + public byte[] write() { + byte[] ret = bindings.DirectionalChannelInfo_write(this.ptr); return ret; } - public static DirectionalChannelInfo constructor_read(byte[] ser) { + public static Result_DirectionalChannelInfoDecodeErrorZ constructor_read(byte[] ser) { long ret = bindings.DirectionalChannelInfo_read(ser); - DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret); + Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; }