7676cae3051952892f79503781f7c101a6818565
[ldk-java] / src / main / java / org / ldk / structs / ChannelConfig.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5
6 public class ChannelConfig extends CommonBase {
7         ChannelConfig(Object _dummy, long ptr) { super(ptr); }
8         @Override @SuppressWarnings("deprecation")
9         protected void finalize() throws Throwable {
10                 bindings.ChannelConfig_free(ptr); super.finalize();
11         }
12
13         public ChannelConfig(ChannelConfig orig) {
14                 super(bindings.ChannelConfig_clone(orig == null ? 0 : orig.ptr & ~1));
15                 this.ptrs_to.add(orig);
16         }
17
18         public int get_fee_proportional_millionths(ChannelConfig this_ptr) {
19                 int ret = bindings.ChannelConfig_get_fee_proportional_millionths(this_ptr == null ? 0 : this_ptr.ptr & ~1);
20                 this.ptrs_to.add(this_ptr);
21                 return ret;
22         }
23
24         public void set_fee_proportional_millionths(ChannelConfig this_ptr, int val) {
25                 bindings.ChannelConfig_set_fee_proportional_millionths(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
26                 this.ptrs_to.add(this_ptr);
27         }
28
29         public boolean get_announced_channel(ChannelConfig this_ptr) {
30                 boolean ret = bindings.ChannelConfig_get_announced_channel(this_ptr == null ? 0 : this_ptr.ptr & ~1);
31                 this.ptrs_to.add(this_ptr);
32                 return ret;
33         }
34
35         public void set_announced_channel(ChannelConfig this_ptr, boolean val) {
36                 bindings.ChannelConfig_set_announced_channel(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
37                 this.ptrs_to.add(this_ptr);
38         }
39
40         public boolean get_commit_upfront_shutdown_pubkey(ChannelConfig this_ptr) {
41                 boolean ret = bindings.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr == null ? 0 : this_ptr.ptr & ~1);
42                 this.ptrs_to.add(this_ptr);
43                 return ret;
44         }
45
46         public void set_commit_upfront_shutdown_pubkey(ChannelConfig this_ptr, boolean val) {
47                 bindings.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
48                 this.ptrs_to.add(this_ptr);
49         }
50
51         public ChannelConfig(int fee_proportional_millionths_arg, boolean announced_channel_arg, boolean commit_upfront_shutdown_pubkey_arg) {
52                 super(bindings.ChannelConfig_new(fee_proportional_millionths_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg));
53         }
54
55         public ChannelConfig() {
56                 super(bindings.ChannelConfig_default());
57         }
58
59         // Skipped ChannelConfig_write
60         public ChannelConfig(byte[] ser) {
61                 super(bindings.ChannelConfig_read(ser));
62         }
63
64 }