1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class UserConfig extends CommonBase {
10 UserConfig(Object _dummy, long ptr) { super(ptr); }
11 @Override @SuppressWarnings("deprecation")
12 protected void finalize() throws Throwable {
14 if (ptr != 0) { bindings.UserConfig_free(ptr); }
17 public static UserConfig constructor_clone(UserConfig orig) {
18 long ret = bindings.UserConfig_clone(orig == null ? 0 : orig.ptr & ~1);
19 UserConfig ret_hu_conv = new UserConfig(null, ret);
20 ret_hu_conv.ptrs_to.add(orig);
24 public ChannelHandshakeConfig get_own_channel_config() {
25 long ret = bindings.UserConfig_get_own_channel_config(this.ptr);
26 ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
30 public void set_own_channel_config(ChannelHandshakeConfig val) {
31 bindings.UserConfig_set_own_channel_config(this.ptr, val == null ? 0 : val.ptr & ~1);
32 this.ptrs_to.add(val);
35 public ChannelHandshakeLimits get_peer_channel_config_limits() {
36 long ret = bindings.UserConfig_get_peer_channel_config_limits(this.ptr);
37 ChannelHandshakeLimits ret_hu_conv = new ChannelHandshakeLimits(null, ret);
41 public void set_peer_channel_config_limits(ChannelHandshakeLimits val) {
42 bindings.UserConfig_set_peer_channel_config_limits(this.ptr, val == null ? 0 : val.ptr & ~1);
43 this.ptrs_to.add(val);
46 public ChannelConfig get_channel_options() {
47 long ret = bindings.UserConfig_get_channel_options(this.ptr);
48 ChannelConfig ret_hu_conv = new ChannelConfig(null, ret);
52 public void set_channel_options(ChannelConfig val) {
53 bindings.UserConfig_set_channel_options(this.ptr, val == null ? 0 : val.ptr & ~1);
54 this.ptrs_to.add(val);
57 public static UserConfig constructor_new(ChannelHandshakeConfig own_channel_config_arg, ChannelHandshakeLimits peer_channel_config_limits_arg, ChannelConfig channel_options_arg) {
58 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);
59 UserConfig ret_hu_conv = new UserConfig(null, ret);
60 ret_hu_conv.ptrs_to.add(own_channel_config_arg);
61 ret_hu_conv.ptrs_to.add(peer_channel_config_limits_arg);
62 ret_hu_conv.ptrs_to.add(channel_options_arg);
66 public static UserConfig constructor_default() {
67 long ret = bindings.UserConfig_default();
68 UserConfig ret_hu_conv = new UserConfig(null, ret);