Rewrite the world, with several interdependant changes (but several still WIP)
[ldk-java] / src / main / java / org / ldk / structs / QueryShortChannelIds.java
index 4a04a4044cb213a4cba275ff50b4e1ecfcc6fd05..c68d42091feb185c9e131198afef851a66945842 100644 (file)
@@ -2,7 +2,10 @@ 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")
@@ -11,26 +14,36 @@ public class QueryShortChannelIds extends CommonBase {
                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) {