TS bindings
[ldk-java] / ts / structs / UserConfig.ts
1
2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
4
5 public class UserConfig extends CommonBase {
6         UserConfig(Object _dummy, long ptr) { super(ptr); }
7         @Override @SuppressWarnings("deprecation")
8         protected void finalize() throws Throwable {
9                 super.finalize();
10                 if (ptr != 0) { bindings.UserConfig_free(ptr); }
11         }
12
13         public UserConfig clone() {
14                 uint32_t ret = bindings.UserConfig_clone(this.ptr);
15                 UserConfig ret_hu_conv = new UserConfig(null, ret);
16                 return ret_hu_conv;
17         }
18
19         public ChannelHandshakeConfig get_own_channel_config() {
20                 uint32_t ret = bindings.UserConfig_get_own_channel_config(this.ptr);
21                 ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
22                 return ret_hu_conv;
23         }
24
25         public void set_own_channel_config(ChannelHandshakeConfig val) {
26                 bindings.UserConfig_set_own_channel_config(this.ptr, val == null ? 0 : val.ptr & ~1);
27                 this.ptrs_to.add(val);
28         }
29
30         public ChannelHandshakeLimits get_peer_channel_config_limits() {
31                 uint32_t ret = bindings.UserConfig_get_peer_channel_config_limits(this.ptr);
32                 ChannelHandshakeLimits ret_hu_conv = new ChannelHandshakeLimits(null, ret);
33                 return ret_hu_conv;
34         }
35
36         public void set_peer_channel_config_limits(ChannelHandshakeLimits val) {
37                 bindings.UserConfig_set_peer_channel_config_limits(this.ptr, val == null ? 0 : val.ptr & ~1);
38                 this.ptrs_to.add(val);
39         }
40
41         public ChannelConfig get_channel_options() {
42                 uint32_t ret = bindings.UserConfig_get_channel_options(this.ptr);
43                 ChannelConfig ret_hu_conv = new ChannelConfig(null, ret);
44                 return ret_hu_conv;
45         }
46
47         public void set_channel_options(ChannelConfig val) {
48                 bindings.UserConfig_set_channel_options(this.ptr, val == null ? 0 : val.ptr & ~1);
49                 this.ptrs_to.add(val);
50         }
51
52         public static UserConfig constructor_new(ChannelHandshakeConfig own_channel_config_arg, ChannelHandshakeLimits peer_channel_config_limits_arg, ChannelConfig channel_options_arg) {
53                 uint32_t 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);
54                 UserConfig ret_hu_conv = new UserConfig(null, ret);
55                 ret_hu_conv.ptrs_to.add(own_channel_config_arg);
56                 ret_hu_conv.ptrs_to.add(peer_channel_config_limits_arg);
57                 ret_hu_conv.ptrs_to.add(channel_options_arg);
58                 return ret_hu_conv;
59         }
60
61         public static UserConfig constructor_default() {
62                 uint32_t ret = bindings.UserConfig_default();
63                 UserConfig ret_hu_conv = new UserConfig(null, ret);
64                 return ret_hu_conv;
65         }
66
67 }