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 // Skipped ChannelInfo_set_features
20 public byte[] get_node_one(ChannelInfo this_ptr) {
21 byte[] ret = bindings.ChannelInfo_get_node_one(this_ptr == null ? 0 : this_ptr.ptr & ~1);
22 this.ptrs_to.add(this_ptr);
26 public void set_node_one(ChannelInfo this_ptr, byte[] val) {
27 bindings.ChannelInfo_set_node_one(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
28 this.ptrs_to.add(this_ptr);
31 public DirectionalChannelInfo get_one_to_two(ChannelInfo this_ptr) {
32 DirectionalChannelInfo ret = new DirectionalChannelInfo(null, bindings.ChannelInfo_get_one_to_two(this_ptr == null ? 0 : this_ptr.ptr & ~1));
33 this.ptrs_to.add(this_ptr);
37 // Skipped ChannelInfo_set_one_to_two
38 public byte[] get_node_two(ChannelInfo this_ptr) {
39 byte[] ret = bindings.ChannelInfo_get_node_two(this_ptr == null ? 0 : this_ptr.ptr & ~1);
40 this.ptrs_to.add(this_ptr);
44 public void set_node_two(ChannelInfo this_ptr, byte[] val) {
45 bindings.ChannelInfo_set_node_two(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
46 this.ptrs_to.add(this_ptr);
49 public DirectionalChannelInfo get_two_to_one(ChannelInfo this_ptr) {
50 DirectionalChannelInfo ret = new DirectionalChannelInfo(null, bindings.ChannelInfo_get_two_to_one(this_ptr == null ? 0 : this_ptr.ptr & ~1));
51 this.ptrs_to.add(this_ptr);
55 // Skipped ChannelInfo_set_two_to_one
56 public ChannelAnnouncement get_announcement_message(ChannelInfo this_ptr) {
57 ChannelAnnouncement ret = new ChannelAnnouncement(null, bindings.ChannelInfo_get_announcement_message(this_ptr == null ? 0 : this_ptr.ptr & ~1));
58 this.ptrs_to.add(this_ptr);
62 public void set_announcement_message(ChannelInfo this_ptr, ChannelAnnouncement val) {
63 bindings.ChannelInfo_set_announcement_message(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
64 this.ptrs_to.add(this_ptr);
65 this.ptrs_to.add(val);
68 // Skipped ChannelInfo_write
69 public ChannelInfo(byte[] ser) {
70 super(bindings.ChannelInfo_read(ser));