- public int get_number_of_blocks(QueryChannelRange this_ptr) {
- int ret = bindings.QueryChannelRange_get_number_of_blocks(this_ptr.ptr & ~1);
- this.ptrs_to.add(this_ptr);
- return ret;
+ /**
+ * Constructs a new QueryChannelRange given each field
+ */
+ public static QueryChannelRange of(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg) {
+ long ret = bindings.QueryChannelRange_new(chain_hash_arg, first_blocknum_arg, number_of_blocks_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ QueryChannelRange ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new QueryChannelRange(null, ret); }
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;