X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FRoutingFees.java;h=0671b5456c61ff5b9807ce2ccc405267b5142011;hb=90f8a21c87ba652884d5b94404b9b24a18f0cefc;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..0671b545 100644 --- a/src/main/java/org/ldk/structs/RoutingFees.java +++ b/src/main/java/org/ldk/structs/RoutingFees.java @@ -2,48 +2,58 @@ 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 static RoutingFees constructor_clone(RoutingFees orig) { + long ret = bindings.RoutingFees_clone(orig == null ? 0 : orig.ptr & ~1); + RoutingFees ret_hu_conv = new RoutingFees(null, ret); + ret_hu_conv.ptrs_to.add(orig); + return ret_hu_conv; } - 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_base_msat() { + int ret = bindings.RoutingFees_get_base_msat(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_base_msat(int val) { + bindings.RoutingFees_set_base_msat(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); + public int get_proportional_millionths() { + int ret = bindings.RoutingFees_get_proportional_millionths(this.ptr); return ret; } - 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 void set_proportional_millionths(int val) { + bindings.RoutingFees_set_proportional_millionths(this.ptr, val); } - public RoutingFees(int base_msat_arg, int proportional_millionths_arg) { - super(bindings.RoutingFees_new(base_msat_arg, proportional_millionths_arg)); + 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); + return ret_hu_conv; } - public RoutingFees(byte[] ser) { - super(bindings.RoutingFees_read(ser)); + public static RoutingFees constructor_read(byte[] ser) { + long ret = bindings.RoutingFees_read(ser); + RoutingFees ret_hu_conv = new RoutingFees(null, ret); + return ret_hu_conv; + } + + public byte[] write() { + byte[] ret = bindings.RoutingFees_write(this.ptr); + return ret; } - // Skipped RoutingFees_write }