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 {
10 bindings.UserConfig_free(ptr); super.finalize();
13 public UserConfig(UserConfig orig) {
14 super(bindings.UserConfig_clone(orig.ptr & ~1));
15 this.ptrs_to.add(orig);
18 public ChannelHandshakeConfig get_own_channel_config(UserConfig this_ptr) {
19 ChannelHandshakeConfig ret = new ChannelHandshakeConfig(null, bindings.UserConfig_get_own_channel_config(this_ptr.ptr & ~1));
20 this.ptrs_to.add(this_ptr);
24 public void set_own_channel_config(UserConfig this_ptr, ChannelHandshakeConfig val) {
25 bindings.UserConfig_set_own_channel_config(this_ptr.ptr & ~1, val.ptr & ~1);
26 this.ptrs_to.add(this_ptr);
27 this.ptrs_to.add(val);
30 public ChannelHandshakeLimits get_peer_channel_config_limits(UserConfig this_ptr) {
31 ChannelHandshakeLimits ret = new ChannelHandshakeLimits(null, bindings.UserConfig_get_peer_channel_config_limits(this_ptr.ptr & ~1));
32 this.ptrs_to.add(this_ptr);
36 public void set_peer_channel_config_limits(UserConfig this_ptr, ChannelHandshakeLimits val) {
37 bindings.UserConfig_set_peer_channel_config_limits(this_ptr.ptr & ~1, val.ptr & ~1);
38 this.ptrs_to.add(this_ptr);
39 this.ptrs_to.add(val);
42 public ChannelConfig get_channel_options(UserConfig this_ptr) {
43 ChannelConfig ret = new ChannelConfig(null, bindings.UserConfig_get_channel_options(this_ptr.ptr & ~1));
44 this.ptrs_to.add(this_ptr);
48 public void set_channel_options(UserConfig this_ptr, ChannelConfig val) {
49 bindings.UserConfig_set_channel_options(this_ptr.ptr & ~1, val.ptr & ~1);
50 this.ptrs_to.add(this_ptr);
51 this.ptrs_to.add(val);
54 public UserConfig(ChannelHandshakeConfig own_channel_config_arg, ChannelHandshakeLimits peer_channel_config_limits_arg, ChannelConfig channel_options_arg) {
55 super(bindings.UserConfig_new(own_channel_config_arg.ptr & ~1, peer_channel_config_limits_arg.ptr & ~1, channel_options_arg.ptr & ~1));
56 this.ptrs_to.add(own_channel_config_arg);
57 this.ptrs_to.add(peer_channel_config_limits_arg);
58 this.ptrs_to.add(channel_options_arg);
62 super(bindings.UserConfig_default());