1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 public class ChannelInfo extends CommonBase {
7 ChannelInfo(Object _dummy, long ptr) { super(ptr); }
8 @Override @SuppressWarnings("deprecation")
9 protected void finalize() throws Throwable {
10 bindings.ChannelInfo_free(ptr); super.finalize();
13 public ChannelFeatures get_features(ChannelInfo this_ptr) {
14 ChannelFeatures ret = new ChannelFeatures(null, bindings.ChannelInfo_get_features(this_ptr == null ? 0 : this_ptr.ptr & ~1));
15 this.ptrs_to.add(this_ptr);
19 public void set_features(ChannelInfo this_ptr, ChannelFeatures val) {
20 bindings.ChannelInfo_set_features(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
21 this.ptrs_to.add(this_ptr);
22 this.ptrs_to.add(val);
25 public byte[] get_node_one(ChannelInfo this_ptr) {
26 byte[] ret = bindings.ChannelInfo_get_node_one(this_ptr == null ? 0 : this_ptr.ptr & ~1);
27 this.ptrs_to.add(this_ptr);
31 public void set_node_one(ChannelInfo this_ptr, byte[] val) {
32 bindings.ChannelInfo_set_node_one(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
33 this.ptrs_to.add(this_ptr);
36 public DirectionalChannelInfo get_one_to_two(ChannelInfo this_ptr) {
37 DirectionalChannelInfo ret = new DirectionalChannelInfo(null, bindings.ChannelInfo_get_one_to_two(this_ptr == null ? 0 : this_ptr.ptr & ~1));
38 this.ptrs_to.add(this_ptr);
42 public void set_one_to_two(ChannelInfo this_ptr, DirectionalChannelInfo val) {
43 bindings.ChannelInfo_set_one_to_two(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
44 this.ptrs_to.add(this_ptr);
45 this.ptrs_to.add(val);
48 public byte[] get_node_two(ChannelInfo this_ptr) {
49 byte[] ret = bindings.ChannelInfo_get_node_two(this_ptr == null ? 0 : this_ptr.ptr & ~1);
50 this.ptrs_to.add(this_ptr);
54 public void set_node_two(ChannelInfo this_ptr, byte[] val) {
55 bindings.ChannelInfo_set_node_two(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
56 this.ptrs_to.add(this_ptr);
59 public DirectionalChannelInfo get_two_to_one(ChannelInfo this_ptr) {
60 DirectionalChannelInfo ret = new DirectionalChannelInfo(null, bindings.ChannelInfo_get_two_to_one(this_ptr == null ? 0 : this_ptr.ptr & ~1));
61 this.ptrs_to.add(this_ptr);
65 public void set_two_to_one(ChannelInfo this_ptr, DirectionalChannelInfo val) {
66 bindings.ChannelInfo_set_two_to_one(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
67 this.ptrs_to.add(this_ptr);
68 this.ptrs_to.add(val);
71 public ChannelAnnouncement get_announcement_message(ChannelInfo this_ptr) {
72 ChannelAnnouncement ret = new ChannelAnnouncement(null, bindings.ChannelInfo_get_announcement_message(this_ptr == null ? 0 : this_ptr.ptr & ~1));
73 this.ptrs_to.add(this_ptr);
77 public void set_announcement_message(ChannelInfo this_ptr, ChannelAnnouncement val) {
78 bindings.ChannelInfo_set_announcement_message(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
79 this.ptrs_to.add(this_ptr);
80 this.ptrs_to.add(val);
83 // Skipped ChannelInfo_write
84 public ChannelInfo(byte[] ser) {
85 super(bindings.ChannelInfo_read(ser));