X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FReplyChannelRange.java;h=ca7243da6d12c8dc9b79060a09563fbcc1d9cabd;hb=fed2245c60159f6c074c9ed5c0f3ce273ad9841b;hp=3a3067186e6a5bb1b64980bcda5dee96ecfc62f4;hpb=592c4f92dd3011a2f2a7988ce66ed166c3a8f58c;p=ldk-java diff --git a/src/main/java/org/ldk/structs/ReplyChannelRange.java b/src/main/java/org/ldk/structs/ReplyChannelRange.java index 3a306718..ca7243da 100644 --- a/src/main/java/org/ldk/structs/ReplyChannelRange.java +++ b/src/main/java/org/ldk/structs/ReplyChannelRange.java @@ -2,73 +2,80 @@ 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 ReplyChannelRange extends CommonBase { ReplyChannelRange(Object _dummy, long ptr) { super(ptr); } @Override @SuppressWarnings("deprecation") protected void finalize() throws Throwable { super.finalize(); - bindings.ReplyChannelRange_free(ptr); + if (ptr != 0) { bindings.ReplyChannelRange_free(ptr); } } - public ReplyChannelRange(ReplyChannelRange orig) { - super(bindings.ReplyChannelRange_clone(orig == null ? 0 : orig.ptr & ~1)); - this.ptrs_to.add(orig); + public ReplyChannelRange clone() { + long ret = bindings.ReplyChannelRange_clone(this.ptr); + ReplyChannelRange ret_hu_conv = new ReplyChannelRange(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; } - public byte[] get_chain_hash(ReplyChannelRange this_ptr) { - byte[] ret = bindings.ReplyChannelRange_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.ReplyChannelRange_get_chain_hash(this.ptr); return ret; } - public void set_chain_hash(ReplyChannelRange this_ptr, byte[] val) { - bindings.ReplyChannelRange_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.ReplyChannelRange_set_chain_hash(this.ptr, val); } - public int get_first_blocknum(ReplyChannelRange this_ptr) { - int ret = bindings.ReplyChannelRange_get_first_blocknum(this_ptr == null ? 0 : this_ptr.ptr & ~1); - this.ptrs_to.add(this_ptr); + public int get_first_blocknum() { + int ret = bindings.ReplyChannelRange_get_first_blocknum(this.ptr); return ret; } - public void set_first_blocknum(ReplyChannelRange this_ptr, int val) { - bindings.ReplyChannelRange_set_first_blocknum(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); - this.ptrs_to.add(this_ptr); + public void set_first_blocknum(int val) { + bindings.ReplyChannelRange_set_first_blocknum(this.ptr, val); } - public int get_number_of_blocks(ReplyChannelRange this_ptr) { - int ret = bindings.ReplyChannelRange_get_number_of_blocks(this_ptr == null ? 0 : this_ptr.ptr & ~1); - this.ptrs_to.add(this_ptr); + public int get_number_of_blocks() { + int ret = bindings.ReplyChannelRange_get_number_of_blocks(this.ptr); return ret; } - public void set_number_of_blocks(ReplyChannelRange this_ptr, int val) { - bindings.ReplyChannelRange_set_number_of_blocks(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); - this.ptrs_to.add(this_ptr); + public void set_number_of_blocks(int val) { + bindings.ReplyChannelRange_set_number_of_blocks(this.ptr, val); } - public boolean get_full_information(ReplyChannelRange this_ptr) { - boolean ret = bindings.ReplyChannelRange_get_full_information(this_ptr == null ? 0 : this_ptr.ptr & ~1); - this.ptrs_to.add(this_ptr); + public boolean get_full_information() { + boolean ret = bindings.ReplyChannelRange_get_full_information(this.ptr); return ret; } - public void set_full_information(ReplyChannelRange this_ptr, boolean val) { - bindings.ReplyChannelRange_set_full_information(this_ptr == null ? 0 : this_ptr.ptr & ~1, val); - this.ptrs_to.add(this_ptr); + public void set_full_information(boolean val) { + bindings.ReplyChannelRange_set_full_information(this.ptr, val); } - // Skipped ReplyChannelRange_set_short_channel_ids - // Skipped ReplyChannelRange_new - public ReplyChannelRange(byte[] ser) { - super(bindings.ReplyChannelRange_read(ser)); + public void set_short_channel_ids(long[] val) { + bindings.ReplyChannelRange_set_short_channel_ids(this.ptr, val); } - public byte[] write(ReplyChannelRange obj) { - byte[] ret = bindings.ReplyChannelRange_write(obj == null ? 0 : obj.ptr & ~1); - this.ptrs_to.add(obj); + public static ReplyChannelRange constructor_new(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg, boolean full_information_arg, long[] short_channel_ids_arg) { + long ret = bindings.ReplyChannelRange_new(chain_hash_arg, first_blocknum_arg, number_of_blocks_arg, full_information_arg, short_channel_ids_arg); + ReplyChannelRange ret_hu_conv = new ReplyChannelRange(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; + } + + public static Result_ReplyChannelRangeDecodeErrorZ constructor_read(byte[] ser) { + long ret = bindings.ReplyChannelRange_read(ser); + Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + + public byte[] write() { + byte[] ret = bindings.ReplyChannelRange_write(this.ptr); return ret; }