309e07b14cef6c2a74073f429dcf09a6796da268
[ldk-java] / src / main / java / org / ldk / structs / ChannelHandshakeLimits.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5
6 public class ChannelHandshakeLimits extends CommonBase {
7         ChannelHandshakeLimits(Object _dummy, long ptr) { super(ptr); }
8         @Override @SuppressWarnings("deprecation")
9         protected void finalize() throws Throwable {
10                 bindings.ChannelHandshakeLimits_free(ptr); super.finalize();
11         }
12
13         public ChannelHandshakeLimits(ChannelHandshakeLimits orig) {
14                 super(bindings.ChannelHandshakeLimits_clone(orig == null ? 0 : orig.ptr & ~1));
15                 this.ptrs_to.add(orig);
16         }
17
18         public long get_min_funding_satoshis(ChannelHandshakeLimits this_ptr) {
19                 long ret = bindings.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1);
20                 this.ptrs_to.add(this_ptr);
21                 return ret;
22         }
23
24         public void set_min_funding_satoshis(ChannelHandshakeLimits this_ptr, long val) {
25                 bindings.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
26                 this.ptrs_to.add(this_ptr);
27         }
28
29         public long get_max_htlc_minimum_msat(ChannelHandshakeLimits this_ptr) {
30                 long ret = bindings.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
31                 this.ptrs_to.add(this_ptr);
32                 return ret;
33         }
34
35         public void set_max_htlc_minimum_msat(ChannelHandshakeLimits this_ptr, long val) {
36                 bindings.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
37                 this.ptrs_to.add(this_ptr);
38         }
39
40         public long get_min_max_htlc_value_in_flight_msat(ChannelHandshakeLimits this_ptr) {
41                 long ret = bindings.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
42                 this.ptrs_to.add(this_ptr);
43                 return ret;
44         }
45
46         public void set_min_max_htlc_value_in_flight_msat(ChannelHandshakeLimits this_ptr, long val) {
47                 bindings.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
48                 this.ptrs_to.add(this_ptr);
49         }
50
51         public long get_max_channel_reserve_satoshis(ChannelHandshakeLimits this_ptr) {
52                 long ret = bindings.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1);
53                 this.ptrs_to.add(this_ptr);
54                 return ret;
55         }
56
57         public void set_max_channel_reserve_satoshis(ChannelHandshakeLimits this_ptr, long val) {
58                 bindings.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
59                 this.ptrs_to.add(this_ptr);
60         }
61
62         public short get_min_max_accepted_htlcs(ChannelHandshakeLimits this_ptr) {
63                 short ret = bindings.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr == null ? 0 : this_ptr.ptr & ~1);
64                 this.ptrs_to.add(this_ptr);
65                 return ret;
66         }
67
68         public void set_min_max_accepted_htlcs(ChannelHandshakeLimits this_ptr, short val) {
69                 bindings.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
70                 this.ptrs_to.add(this_ptr);
71         }
72
73         public long get_min_dust_limit_satoshis(ChannelHandshakeLimits this_ptr) {
74                 long ret = bindings.ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1);
75                 this.ptrs_to.add(this_ptr);
76                 return ret;
77         }
78
79         public void set_min_dust_limit_satoshis(ChannelHandshakeLimits this_ptr, long val) {
80                 bindings.ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
81                 this.ptrs_to.add(this_ptr);
82         }
83
84         public long get_max_dust_limit_satoshis(ChannelHandshakeLimits this_ptr) {
85                 long ret = bindings.ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1);
86                 this.ptrs_to.add(this_ptr);
87                 return ret;
88         }
89
90         public void set_max_dust_limit_satoshis(ChannelHandshakeLimits this_ptr, long val) {
91                 bindings.ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
92                 this.ptrs_to.add(this_ptr);
93         }
94
95         public int get_max_minimum_depth(ChannelHandshakeLimits this_ptr) {
96                 int ret = bindings.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr == null ? 0 : this_ptr.ptr & ~1);
97                 this.ptrs_to.add(this_ptr);
98                 return ret;
99         }
100
101         public void set_max_minimum_depth(ChannelHandshakeLimits this_ptr, int val) {
102                 bindings.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
103                 this.ptrs_to.add(this_ptr);
104         }
105
106         public boolean get_force_announced_channel_preference(ChannelHandshakeLimits this_ptr) {
107                 boolean ret = bindings.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr == null ? 0 : this_ptr.ptr & ~1);
108                 this.ptrs_to.add(this_ptr);
109                 return ret;
110         }
111
112         public void set_force_announced_channel_preference(ChannelHandshakeLimits this_ptr, boolean val) {
113                 bindings.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
114                 this.ptrs_to.add(this_ptr);
115         }
116
117         public short get_their_to_self_delay(ChannelHandshakeLimits this_ptr) {
118                 short ret = bindings.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr == null ? 0 : this_ptr.ptr & ~1);
119                 this.ptrs_to.add(this_ptr);
120                 return ret;
121         }
122
123         public void set_their_to_self_delay(ChannelHandshakeLimits this_ptr, short val) {
124                 bindings.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
125                 this.ptrs_to.add(this_ptr);
126         }
127
128         public ChannelHandshakeLimits(long min_funding_satoshis_arg, long max_htlc_minimum_msat_arg, long min_max_htlc_value_in_flight_msat_arg, long max_channel_reserve_satoshis_arg, short min_max_accepted_htlcs_arg, long min_dust_limit_satoshis_arg, long max_dust_limit_satoshis_arg, int max_minimum_depth_arg, boolean force_announced_channel_preference_arg, short their_to_self_delay_arg) {
129                 super(bindings.ChannelHandshakeLimits_new(min_funding_satoshis_arg, max_htlc_minimum_msat_arg, min_max_htlc_value_in_flight_msat_arg, max_channel_reserve_satoshis_arg, min_max_accepted_htlcs_arg, min_dust_limit_satoshis_arg, max_dust_limit_satoshis_arg, max_minimum_depth_arg, force_announced_channel_preference_arg, their_to_self_delay_arg));
130         }
131
132         public ChannelHandshakeLimits() {
133                 super(bindings.ChannelHandshakeLimits_default());
134         }
135
136 }