X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FQueryShortChannelIds.java;h=3fb876512fa4134508021ce3d80351f9d9920473;hb=3c88e2f6e84c7f38723ff162ca72d613df5eeb97;hp=4a04a4044cb213a4cba275ff50b4e1ecfcc6fd05;hpb=592c4f92dd3011a2f2a7988ce66ed166c3a8f58c;p=ldk-java diff --git a/src/main/java/org/ldk/structs/QueryShortChannelIds.java b/src/main/java/org/ldk/structs/QueryShortChannelIds.java index 4a04a404..3fb87651 100644 --- a/src/main/java/org/ldk/structs/QueryShortChannelIds.java +++ b/src/main/java/org/ldk/structs/QueryShortChannelIds.java @@ -2,35 +2,48 @@ 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 QueryShortChannelIds extends CommonBase { QueryShortChannelIds(Object _dummy, long ptr) { super(ptr); } @Override @SuppressWarnings("deprecation") protected void finalize() throws Throwable { super.finalize(); - bindings.QueryShortChannelIds_free(ptr); + if (ptr != 0) { bindings.QueryShortChannelIds_free(ptr); } } - public QueryShortChannelIds(QueryShortChannelIds orig) { - super(bindings.QueryShortChannelIds_clone(orig == null ? 0 : orig.ptr & ~1)); - this.ptrs_to.add(orig); + public static QueryShortChannelIds constructor_clone(QueryShortChannelIds orig) { + long ret = bindings.QueryShortChannelIds_clone(orig == null ? 0 : orig.ptr & ~1); + QueryShortChannelIds ret_hu_conv = new QueryShortChannelIds(null, ret); + ret_hu_conv.ptrs_to.add(orig); + return ret_hu_conv; } - public byte[] get_chain_hash(QueryShortChannelIds this_ptr) { - byte[] ret = bindings.QueryShortChannelIds_get_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1); - this.ptrs_to.add(this_ptr); + public byte[] get_chain_hash() { + byte[] ret = bindings.QueryShortChannelIds_get_chain_hash(this.ptr); return ret; } - public void set_chain_hash(QueryShortChannelIds this_ptr, byte[] val) { - bindings.QueryShortChannelIds_set_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); - this.ptrs_to.add(this_ptr); + public void set_chain_hash(byte[] val) { + bindings.QueryShortChannelIds_set_chain_hash(this.ptr, val); } - // Skipped QueryShortChannelIds_set_short_channel_ids - // Skipped QueryShortChannelIds_new - public QueryShortChannelIds(byte[] ser) { - super(bindings.QueryShortChannelIds_read(ser)); + public void set_short_channel_ids(long[] val) { + bindings.QueryShortChannelIds_set_short_channel_ids(this.ptr, val); + } + + public static QueryShortChannelIds constructor_new(byte[] chain_hash_arg, long[] short_channel_ids_arg) { + long ret = bindings.QueryShortChannelIds_new(chain_hash_arg, short_channel_ids_arg); + QueryShortChannelIds ret_hu_conv = new QueryShortChannelIds(null, ret); + return ret_hu_conv; + } + + public static QueryShortChannelIds constructor_read(byte[] ser) { + long ret = bindings.QueryShortChannelIds_read(ser); + QueryShortChannelIds ret_hu_conv = new QueryShortChannelIds(null, ret); + return ret_hu_conv; } public byte[] write(QueryShortChannelIds obj) {