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