Create structs and traits that are (a bit) more human-friendly!
[ldk-java] / src / main / java / org / ldk / structs / ChannelHandshakeConfig.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5
6 public class ChannelHandshakeConfig extends CommonBase {
7         ChannelHandshakeConfig(Object _dummy, long ptr) { super(ptr); }
8         @Override @SuppressWarnings("deprecation")
9         protected void finalize() throws Throwable {
10                 bindings.ChannelHandshakeConfig_free(ptr); super.finalize();
11         }
12
13         public ChannelHandshakeConfig(ChannelHandshakeConfig orig) {
14                 super(bindings.ChannelHandshakeConfig_clone(orig.ptr & ~1));
15                 this.ptrs_to.add(orig);
16         }
17
18         public int get_minimum_depth(ChannelHandshakeConfig this_ptr) {
19                 int ret = bindings.ChannelHandshakeConfig_get_minimum_depth(this_ptr.ptr & ~1);
20                 this.ptrs_to.add(this_ptr);
21                 return ret;
22         }
23
24         public void set_minimum_depth(ChannelHandshakeConfig this_ptr, int val) {
25                 bindings.ChannelHandshakeConfig_set_minimum_depth(this_ptr.ptr & ~1, val);
26                 this.ptrs_to.add(this_ptr);
27         }
28
29         public short get_our_to_self_delay(ChannelHandshakeConfig this_ptr) {
30                 short ret = bindings.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr.ptr & ~1);
31                 this.ptrs_to.add(this_ptr);
32                 return ret;
33         }
34
35         public void set_our_to_self_delay(ChannelHandshakeConfig this_ptr, short val) {
36                 bindings.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr.ptr & ~1, val);
37                 this.ptrs_to.add(this_ptr);
38         }
39
40         public long get_our_htlc_minimum_msat(ChannelHandshakeConfig this_ptr) {
41                 long ret = bindings.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr.ptr & ~1);
42                 this.ptrs_to.add(this_ptr);
43                 return ret;
44         }
45
46         public void set_our_htlc_minimum_msat(ChannelHandshakeConfig this_ptr, long val) {
47                 bindings.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr.ptr & ~1, val);
48                 this.ptrs_to.add(this_ptr);
49         }
50
51         public ChannelHandshakeConfig(int minimum_depth_arg, short our_to_self_delay_arg, long our_htlc_minimum_msat_arg) {
52                 super(bindings.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg));
53         }
54
55         public ChannelHandshakeConfig() {
56                 super(bindings.ChannelHandshakeConfig_default());
57         }
58
59 }