]> git.bitcoin.ninja Git - ldk-java/blob - src/main/java/org/ldk/structs/UserConfig.java
Fix race in tests
[ldk-java] / src / main / java / org / ldk / structs / UserConfig.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5 import org.ldk.util.*;
6 import java.util.Arrays;
7
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 {
13                 super.finalize();
14                 if (ptr != 0) { bindings.UserConfig_free(ptr); }
15         }
16
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);
21                 return ret_hu_conv;
22         }
23
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);
27                 return ret_hu_conv;
28         }
29
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);
33         }
34
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);
38                 return ret_hu_conv;
39         }
40
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);
44         }
45
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);
49                 return ret_hu_conv;
50         }
51
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);
55         }
56
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);
63                 return ret_hu_conv;
64         }
65
66         public static UserConfig constructor_default() {
67                 long ret = bindings.UserConfig_default();
68                 UserConfig ret_hu_conv = new UserConfig(null, ret);
69                 return ret_hu_conv;
70         }
71
72 }