1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class ChannelInfo extends CommonBase {
10 ChannelInfo(Object _dummy, long ptr) { super(ptr); }
11 @Override @SuppressWarnings("deprecation")
12 protected void finalize() throws Throwable {
14 if (ptr != 0) { bindings.ChannelInfo_free(ptr); }
17 public ChannelFeatures get_features() {
18 long ret = bindings.ChannelInfo_get_features(this.ptr);
19 ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret);
23 public void set_features(ChannelFeatures val) {
24 bindings.ChannelInfo_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
25 this.ptrs_to.add(val);
28 public byte[] get_node_one() {
29 byte[] ret = bindings.ChannelInfo_get_node_one(this.ptr);
33 public void set_node_one(byte[] val) {
34 bindings.ChannelInfo_set_node_one(this.ptr, val);
37 public DirectionalChannelInfo get_one_to_two() {
38 long ret = bindings.ChannelInfo_get_one_to_two(this.ptr);
39 DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
43 public void set_one_to_two(DirectionalChannelInfo val) {
44 bindings.ChannelInfo_set_one_to_two(this.ptr, val == null ? 0 : val.ptr & ~1);
45 this.ptrs_to.add(val);
48 public byte[] get_node_two() {
49 byte[] ret = bindings.ChannelInfo_get_node_two(this.ptr);
53 public void set_node_two(byte[] val) {
54 bindings.ChannelInfo_set_node_two(this.ptr, val);
57 public DirectionalChannelInfo get_two_to_one() {
58 long ret = bindings.ChannelInfo_get_two_to_one(this.ptr);
59 DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
63 public void set_two_to_one(DirectionalChannelInfo val) {
64 bindings.ChannelInfo_set_two_to_one(this.ptr, val == null ? 0 : val.ptr & ~1);
65 this.ptrs_to.add(val);
68 public ChannelAnnouncement get_announcement_message() {
69 long ret = bindings.ChannelInfo_get_announcement_message(this.ptr);
70 ChannelAnnouncement ret_hu_conv = new ChannelAnnouncement(null, ret);
74 public void set_announcement_message(ChannelAnnouncement val) {
75 bindings.ChannelInfo_set_announcement_message(this.ptr, val == null ? 0 : val.ptr & ~1);
76 this.ptrs_to.add(val);
79 public byte[] write() {
80 byte[] ret = bindings.ChannelInfo_write(this.ptr);
84 public static ChannelInfo constructor_read(byte[] ser) {
85 long ret = bindings.ChannelInfo_read(ser);
86 ChannelInfo ret_hu_conv = new ChannelInfo(null, ret);