1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 public class ChannelConfig extends CommonBase {
7 ChannelConfig(Object _dummy, long ptr) { super(ptr); }
8 @Override @SuppressWarnings("deprecation")
9 protected void finalize() throws Throwable {
11 bindings.ChannelConfig_free(ptr);
14 public ChannelConfig(ChannelConfig orig) {
15 super(bindings.ChannelConfig_clone(orig == null ? 0 : orig.ptr & ~1));
16 this.ptrs_to.add(orig);
19 public int get_fee_proportional_millionths(ChannelConfig this_ptr) {
20 int ret = bindings.ChannelConfig_get_fee_proportional_millionths(this_ptr == null ? 0 : this_ptr.ptr & ~1);
21 this.ptrs_to.add(this_ptr);
25 public void set_fee_proportional_millionths(ChannelConfig this_ptr, int val) {
26 bindings.ChannelConfig_set_fee_proportional_millionths(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
27 this.ptrs_to.add(this_ptr);
30 public boolean get_announced_channel(ChannelConfig this_ptr) {
31 boolean ret = bindings.ChannelConfig_get_announced_channel(this_ptr == null ? 0 : this_ptr.ptr & ~1);
32 this.ptrs_to.add(this_ptr);
36 public void set_announced_channel(ChannelConfig this_ptr, boolean val) {
37 bindings.ChannelConfig_set_announced_channel(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
38 this.ptrs_to.add(this_ptr);
41 public boolean get_commit_upfront_shutdown_pubkey(ChannelConfig this_ptr) {
42 boolean ret = bindings.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr == null ? 0 : this_ptr.ptr & ~1);
43 this.ptrs_to.add(this_ptr);
47 public void set_commit_upfront_shutdown_pubkey(ChannelConfig this_ptr, boolean val) {
48 bindings.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
49 this.ptrs_to.add(this_ptr);
52 public ChannelConfig(int fee_proportional_millionths_arg, boolean announced_channel_arg, boolean commit_upfront_shutdown_pubkey_arg) {
53 super(bindings.ChannelConfig_new(fee_proportional_millionths_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg));
56 public ChannelConfig() {
57 super(bindings.ChannelConfig_default());
60 public byte[] write(ChannelConfig obj) {
61 byte[] ret = bindings.ChannelConfig_write(obj == null ? 0 : obj.ptr & ~1);
62 this.ptrs_to.add(obj);
66 public ChannelConfig(byte[] ser) {
67 super(bindings.ChannelConfig_read(ser));