1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 public class UserConfig extends CommonBase {
7 UserConfig(Object _dummy, long ptr) { super(ptr); }
8 @Override @SuppressWarnings("deprecation")
9 protected void finalize() throws Throwable {
11 bindings.UserConfig_free(ptr);
14 public UserConfig(UserConfig orig) {
15 super(bindings.UserConfig_clone(orig == null ? 0 : orig.ptr & ~1));
16 this.ptrs_to.add(orig);
19 public ChannelHandshakeConfig get_own_channel_config(UserConfig this_ptr) {
20 ChannelHandshakeConfig ret = new ChannelHandshakeConfig(null, bindings.UserConfig_get_own_channel_config(this_ptr == null ? 0 : this_ptr.ptr & ~1));
21 this.ptrs_to.add(this_ptr);
25 public void set_own_channel_config(UserConfig this_ptr, ChannelHandshakeConfig val) {
26 bindings.UserConfig_set_own_channel_config(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
27 this.ptrs_to.add(this_ptr);
28 this.ptrs_to.add(val);
31 public ChannelHandshakeLimits get_peer_channel_config_limits(UserConfig this_ptr) {
32 ChannelHandshakeLimits ret = new ChannelHandshakeLimits(null, bindings.UserConfig_get_peer_channel_config_limits(this_ptr == null ? 0 : this_ptr.ptr & ~1));
33 this.ptrs_to.add(this_ptr);
37 public void set_peer_channel_config_limits(UserConfig this_ptr, ChannelHandshakeLimits val) {
38 bindings.UserConfig_set_peer_channel_config_limits(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
39 this.ptrs_to.add(this_ptr);
40 this.ptrs_to.add(val);
43 public ChannelConfig get_channel_options(UserConfig this_ptr) {
44 ChannelConfig ret = new ChannelConfig(null, bindings.UserConfig_get_channel_options(this_ptr == null ? 0 : this_ptr.ptr & ~1));
45 this.ptrs_to.add(this_ptr);
49 public void set_channel_options(UserConfig this_ptr, ChannelConfig val) {
50 bindings.UserConfig_set_channel_options(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
51 this.ptrs_to.add(this_ptr);
52 this.ptrs_to.add(val);
55 public UserConfig(ChannelHandshakeConfig own_channel_config_arg, ChannelHandshakeLimits peer_channel_config_limits_arg, ChannelConfig channel_options_arg) {
56 super(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));
57 this.ptrs_to.add(own_channel_config_arg);
58 this.ptrs_to.add(peer_channel_config_limits_arg);
59 this.ptrs_to.add(channel_options_arg);
63 super(bindings.UserConfig_default());