X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FUpdateFailMalformedHTLC.java;h=0b28fc68a61b663f0b05ed0309b8288575d2f15b;hb=9e8763c71cd61d55be7c869d973524f75209a3f3;hp=66e394dd494186a999bef0708757139894ab0007;hpb=ad15b3a4dbf3fbc7f08ef22d656bae79e8182008;p=ldk-java diff --git a/src/main/java/org/ldk/structs/UpdateFailMalformedHTLC.java b/src/main/java/org/ldk/structs/UpdateFailMalformedHTLC.java index 66e394dd..0b28fc68 100644 --- a/src/main/java/org/ldk/structs/UpdateFailMalformedHTLC.java +++ b/src/main/java/org/ldk/structs/UpdateFailMalformedHTLC.java @@ -2,56 +2,61 @@ package org.ldk.structs; import org.ldk.impl.bindings; import org.ldk.enums.*; +import org.ldk.util.*; +import java.util.Arrays; +@SuppressWarnings("unchecked") // We correctly assign various generic arrays public class UpdateFailMalformedHTLC extends CommonBase { UpdateFailMalformedHTLC(Object _dummy, long ptr) { super(ptr); } @Override @SuppressWarnings("deprecation") protected void finalize() throws Throwable { super.finalize(); - bindings.UpdateFailMalformedHTLC_free(ptr); + if (ptr != 0) { bindings.UpdateFailMalformedHTLC_free(ptr); } } - public UpdateFailMalformedHTLC(UpdateFailMalformedHTLC orig) { - super(bindings.UpdateFailMalformedHTLC_clone(orig == null ? 0 : orig.ptr & ~1)); - this.ptrs_to.add(orig); + public byte[] get_channel_id() { + byte[] ret = bindings.UpdateFailMalformedHTLC_get_channel_id(this.ptr); + return ret; + } + + public void set_channel_id(byte[] val) { + bindings.UpdateFailMalformedHTLC_set_channel_id(this.ptr, val); } - public byte[] get_channel_id(UpdateFailMalformedHTLC this_ptr) { - byte[] ret = bindings.UpdateFailMalformedHTLC_get_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1); - this.ptrs_to.add(this_ptr); + public long get_htlc_id() { + long ret = bindings.UpdateFailMalformedHTLC_get_htlc_id(this.ptr); return ret; } - public void set_channel_id(UpdateFailMalformedHTLC this_ptr, byte[] val) { - bindings.UpdateFailMalformedHTLC_set_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); - this.ptrs_to.add(this_ptr); + public void set_htlc_id(long val) { + bindings.UpdateFailMalformedHTLC_set_htlc_id(this.ptr, val); } - public long get_htlc_id(UpdateFailMalformedHTLC this_ptr) { - long ret = bindings.UpdateFailMalformedHTLC_get_htlc_id(this_ptr == null ? 0 : this_ptr.ptr & ~1); - this.ptrs_to.add(this_ptr); + public short get_failure_code() { + short ret = bindings.UpdateFailMalformedHTLC_get_failure_code(this.ptr); return ret; } - public void set_htlc_id(UpdateFailMalformedHTLC this_ptr, long val) { - bindings.UpdateFailMalformedHTLC_set_htlc_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); - this.ptrs_to.add(this_ptr); + public void set_failure_code(short val) { + bindings.UpdateFailMalformedHTLC_set_failure_code(this.ptr, val); } - public short get_failure_code(UpdateFailMalformedHTLC this_ptr) { - short ret = bindings.UpdateFailMalformedHTLC_get_failure_code(this_ptr == null ? 0 : this_ptr.ptr & ~1); - this.ptrs_to.add(this_ptr); - return ret; + public UpdateFailMalformedHTLC clone() { + long ret = bindings.UpdateFailMalformedHTLC_clone(this.ptr); + UpdateFailMalformedHTLC ret_hu_conv = new UpdateFailMalformedHTLC(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; } - public void set_failure_code(UpdateFailMalformedHTLC this_ptr, short val) { - bindings.UpdateFailMalformedHTLC_set_failure_code(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); - this.ptrs_to.add(this_ptr); + public byte[] write() { + byte[] ret = bindings.UpdateFailMalformedHTLC_write(this.ptr); + return ret; } - // Skipped UpdateFailMalformedHTLC_write - public UpdateFailMalformedHTLC(byte[] ser) { - super(bindings.UpdateFailMalformedHTLC_read(ser)); + public static Result_UpdateFailMalformedHTLCDecodeErrorZ constructor_read(byte[] ser) { + long ret = bindings.UpdateFailMalformedHTLC_read(ser); + Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; } }