X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FRoutingFees.java;h=da1c5c48000790507505b2d2dc6599c037313df4;hb=9e8763c71cd61d55be7c869d973524f75209a3f3;hp=59f65ce5763cd066ed4601f115421f7332ed4f61;hpb=2ed9081562d00a8645604b07629e963231d49e0f;p=ldk-java diff --git a/src/main/java/org/ldk/structs/RoutingFees.java b/src/main/java/org/ldk/structs/RoutingFees.java index 59f65ce5..da1c5c48 100644 --- a/src/main/java/org/ldk/structs/RoutingFees.java +++ b/src/main/java/org/ldk/structs/RoutingFees.java @@ -2,48 +2,59 @@ 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 RoutingFees extends CommonBase { RoutingFees(Object _dummy, long ptr) { super(ptr); } @Override @SuppressWarnings("deprecation") protected void finalize() throws Throwable { - bindings.RoutingFees_free(ptr); super.finalize(); + super.finalize(); + if (ptr != 0) { bindings.RoutingFees_free(ptr); } } - public RoutingFees(RoutingFees orig) { - super(bindings.RoutingFees_clone(orig == null ? 0 : orig.ptr & ~1)); - this.ptrs_to.add(orig); + public int get_base_msat() { + int ret = bindings.RoutingFees_get_base_msat(this.ptr); + return ret; + } + + public void set_base_msat(int val) { + bindings.RoutingFees_set_base_msat(this.ptr, val); } - public int get_base_msat(RoutingFees this_ptr) { - int ret = bindings.RoutingFees_get_base_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1); - this.ptrs_to.add(this_ptr); + public int get_proportional_millionths() { + int ret = bindings.RoutingFees_get_proportional_millionths(this.ptr); return ret; } - public void set_base_msat(RoutingFees this_ptr, int val) { - bindings.RoutingFees_set_base_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); - this.ptrs_to.add(this_ptr); + public void set_proportional_millionths(int val) { + bindings.RoutingFees_set_proportional_millionths(this.ptr, val); } - public int get_proportional_millionths(RoutingFees this_ptr) { - int ret = bindings.RoutingFees_get_proportional_millionths(this_ptr == null ? 0 : this_ptr.ptr & ~1); - this.ptrs_to.add(this_ptr); - return ret; + public static RoutingFees constructor_new(int base_msat_arg, int proportional_millionths_arg) { + long ret = bindings.RoutingFees_new(base_msat_arg, proportional_millionths_arg); + RoutingFees ret_hu_conv = new RoutingFees(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; } - public void set_proportional_millionths(RoutingFees this_ptr, int val) { - bindings.RoutingFees_set_proportional_millionths(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); - this.ptrs_to.add(this_ptr); + public RoutingFees clone() { + long ret = bindings.RoutingFees_clone(this.ptr); + RoutingFees ret_hu_conv = new RoutingFees(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; } - public RoutingFees(int base_msat_arg, int proportional_millionths_arg) { - super(bindings.RoutingFees_new(base_msat_arg, proportional_millionths_arg)); + public static Result_RoutingFeesDecodeErrorZ constructor_read(byte[] ser) { + long ret = bindings.RoutingFees_read(ser); + Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; } - public RoutingFees(byte[] ser) { - super(bindings.RoutingFees_read(ser)); + public byte[] write() { + byte[] ret = bindings.RoutingFees_write(this.ptr); + return ret; } - // Skipped RoutingFees_write }