X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FQueryShortChannelIds.java;h=e65af98faecc2f6513f8a9cac64d56b20ae56f28;hb=55fbcecedad3fd98420db299c2177fb3f40d607e;hp=68cc1304d41303660df3a29db13c0d20b066fd63;hpb=166ff04616cfee975ce991607ca0df88857193df;p=ldk-java diff --git a/src/main/java/org/ldk/structs/QueryShortChannelIds.java b/src/main/java/org/ldk/structs/QueryShortChannelIds.java index 68cc1304..e65af98f 100644 --- a/src/main/java/org/ldk/structs/QueryShortChannelIds.java +++ b/src/main/java/org/ldk/structs/QueryShortChannelIds.java @@ -2,35 +2,53 @@ 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 { - bindings.QueryShortChannelIds_free(ptr); super.finalize(); + super.finalize(); + if (ptr != 0) { bindings.QueryShortChannelIds_free(ptr); } } - public QueryShortChannelIds(QueryShortChannelIds orig) { - super(bindings.QueryShortChannelIds_clone(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.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.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() { + byte[] ret = bindings.QueryShortChannelIds_write(this.ptr); + return ret; } - // Skipped QueryShortChannelIds_write }