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 // Skipped ChannelInfo_set_features
24 public byte[] get_node_one() {
25 byte[] ret = bindings.ChannelInfo_get_node_one(this.ptr);
29 public void set_node_one(byte[] val) {
30 bindings.ChannelInfo_set_node_one(this.ptr, val);
33 public DirectionalChannelInfo get_one_to_two() {
34 long ret = bindings.ChannelInfo_get_one_to_two(this.ptr);
35 DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
39 // Skipped ChannelInfo_set_one_to_two
40 public byte[] get_node_two() {
41 byte[] ret = bindings.ChannelInfo_get_node_two(this.ptr);
45 public void set_node_two(byte[] val) {
46 bindings.ChannelInfo_set_node_two(this.ptr, val);
49 public DirectionalChannelInfo get_two_to_one() {
50 long ret = bindings.ChannelInfo_get_two_to_one(this.ptr);
51 DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
55 // Skipped ChannelInfo_set_two_to_one
56 public ChannelAnnouncement get_announcement_message() {
57 long ret = bindings.ChannelInfo_get_announcement_message(this.ptr);
58 ChannelAnnouncement ret_hu_conv = new ChannelAnnouncement(null, ret);
62 public void set_announcement_message(ChannelAnnouncement val) {
63 bindings.ChannelInfo_set_announcement_message(this.ptr, val == null ? 0 : val.ptr & ~1);
64 this.ptrs_to.add(val);
67 public byte[] write(ChannelInfo obj) {
68 byte[] ret = bindings.ChannelInfo_write(obj == null ? 0 : obj.ptr & ~1);
69 this.ptrs_to.add(obj);
73 public static ChannelInfo constructor_read(byte[] ser) {
74 long ret = bindings.ChannelInfo_read(ser);
75 ChannelInfo ret_hu_conv = new ChannelInfo(null, ret);