Update auto-updated Java files
[ldk-java] / src / main / java / org / ldk / structs / UserConfig.java
index 055f38fe4903ab3c6a309329e55a32c6ed5da6b6..23078a60fecf41d72617f7aa4960676acc0f3935 100644 (file)
@@ -4,6 +4,7 @@ import org.ldk.impl.bindings;
 import org.ldk.enums.*;
 import org.ldk.util.*;
 import java.util.Arrays;
+import java.lang.ref.Reference;
 import javax.annotation.Nullable;
 
 
@@ -27,6 +28,7 @@ public class UserConfig extends CommonBase {
         */
        public ChannelHandshakeConfig get_own_channel_config() {
                long ret = bindings.UserConfig_get_own_channel_config(this.ptr);
+               Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                ChannelHandshakeConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelHandshakeConfig(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
@@ -38,6 +40,8 @@ public class UserConfig extends CommonBase {
         */
        public void set_own_channel_config(ChannelHandshakeConfig val) {
                bindings.UserConfig_set_own_channel_config(this.ptr, val == null ? 0 : val.ptr & ~1);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
        }
 
        /**
@@ -45,6 +49,7 @@ public class UserConfig extends CommonBase {
         */
        public ChannelHandshakeLimits get_peer_channel_config_limits() {
                long ret = bindings.UserConfig_get_peer_channel_config_limits(this.ptr);
+               Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                ChannelHandshakeLimits ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelHandshakeLimits(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
@@ -56,6 +61,8 @@ public class UserConfig extends CommonBase {
         */
        public void set_peer_channel_config_limits(ChannelHandshakeLimits val) {
                bindings.UserConfig_set_peer_channel_config_limits(this.ptr, val == null ? 0 : val.ptr & ~1);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
        }
 
        /**
@@ -63,6 +70,7 @@ public class UserConfig extends CommonBase {
         */
        public ChannelConfig get_channel_options() {
                long ret = bindings.UserConfig_get_channel_options(this.ptr);
+               Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                ChannelConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelConfig(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
@@ -74,6 +82,8 @@ public class UserConfig extends CommonBase {
         */
        public void set_channel_options(ChannelConfig val) {
                bindings.UserConfig_set_channel_options(this.ptr, val == null ? 0 : val.ptr & ~1);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
        }
 
        /**
@@ -96,6 +106,7 @@ public class UserConfig extends CommonBase {
         */
        public boolean get_accept_forwards_to_priv_channels() {
                boolean ret = bindings.UserConfig_get_accept_forwards_to_priv_channels(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -119,13 +130,40 @@ public class UserConfig extends CommonBase {
         */
        public void set_accept_forwards_to_priv_channels(boolean val) {
                bindings.UserConfig_set_accept_forwards_to_priv_channels(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
+       }
+
+       /**
+        * If this is set to false, we do not accept inbound requests to open a new channel.
+        * Default value: true.
+        */
+       public boolean get_accept_inbound_channels() {
+               boolean ret = bindings.UserConfig_get_accept_inbound_channels(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
+       /**
+        * If this is set to false, we do not accept inbound requests to open a new channel.
+        * Default value: true.
+        */
+       public void set_accept_inbound_channels(boolean val) {
+               bindings.UserConfig_set_accept_inbound_channels(this.ptr, val);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
        }
 
        /**
         * Constructs a new UserConfig given each field
         */
-       public static UserConfig of(ChannelHandshakeConfig own_channel_config_arg, ChannelHandshakeLimits peer_channel_config_limits_arg, ChannelConfig channel_options_arg, boolean accept_forwards_to_priv_channels_arg) {
-               long ret = bindings.UserConfig_new(own_channel_config_arg == null ? 0 : own_channel_config_arg.ptr & ~1, peer_channel_config_limits_arg == null ? 0 : peer_channel_config_limits_arg.ptr & ~1, channel_options_arg == null ? 0 : channel_options_arg.ptr & ~1, accept_forwards_to_priv_channels_arg);
+       public static UserConfig of(ChannelHandshakeConfig own_channel_config_arg, ChannelHandshakeLimits peer_channel_config_limits_arg, ChannelConfig channel_options_arg, boolean accept_forwards_to_priv_channels_arg, boolean accept_inbound_channels_arg) {
+               long ret = bindings.UserConfig_new(own_channel_config_arg == null ? 0 : own_channel_config_arg.ptr & ~1, peer_channel_config_limits_arg == null ? 0 : peer_channel_config_limits_arg.ptr & ~1, channel_options_arg == null ? 0 : channel_options_arg.ptr & ~1, accept_forwards_to_priv_channels_arg, accept_inbound_channels_arg);
+               Reference.reachabilityFence(own_channel_config_arg);
+               Reference.reachabilityFence(peer_channel_config_limits_arg);
+               Reference.reachabilityFence(channel_options_arg);
+               Reference.reachabilityFence(accept_forwards_to_priv_channels_arg);
+               Reference.reachabilityFence(accept_inbound_channels_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                UserConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new UserConfig(null, ret); }
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
@@ -134,6 +172,7 @@ public class UserConfig extends CommonBase {
 
        long clone_ptr() {
                long ret = bindings.UserConfig_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -142,6 +181,7 @@ public class UserConfig extends CommonBase {
         */
        public UserConfig clone() {
                long ret = bindings.UserConfig_clone(this.ptr);
+               Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                UserConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new UserConfig(null, ret); }
                ret_hu_conv.ptrs_to.add(this);