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 {
11 bindings.ChannelInfo_free(ptr);
14 public ChannelFeatures get_features(ChannelInfo this_ptr) {
15 ChannelFeatures ret = new ChannelFeatures(null, bindings.ChannelInfo_get_features(this_ptr == null ? 0 : this_ptr.ptr & ~1));
16 this.ptrs_to.add(this_ptr);
20 // Skipped ChannelInfo_set_features
21 public byte[] get_node_one(ChannelInfo this_ptr) {
22 byte[] ret = bindings.ChannelInfo_get_node_one(this_ptr == null ? 0 : this_ptr.ptr & ~1);
23 this.ptrs_to.add(this_ptr);
27 public void set_node_one(ChannelInfo this_ptr, byte[] val) {
28 bindings.ChannelInfo_set_node_one(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
29 this.ptrs_to.add(this_ptr);
32 public DirectionalChannelInfo get_one_to_two(ChannelInfo this_ptr) {
33 DirectionalChannelInfo ret = new DirectionalChannelInfo(null, bindings.ChannelInfo_get_one_to_two(this_ptr == null ? 0 : this_ptr.ptr & ~1));
34 this.ptrs_to.add(this_ptr);
38 // Skipped ChannelInfo_set_one_to_two
39 public byte[] get_node_two(ChannelInfo this_ptr) {
40 byte[] ret = bindings.ChannelInfo_get_node_two(this_ptr == null ? 0 : this_ptr.ptr & ~1);
41 this.ptrs_to.add(this_ptr);
45 public void set_node_two(ChannelInfo this_ptr, byte[] val) {
46 bindings.ChannelInfo_set_node_two(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
47 this.ptrs_to.add(this_ptr);
50 public DirectionalChannelInfo get_two_to_one(ChannelInfo this_ptr) {
51 DirectionalChannelInfo ret = new DirectionalChannelInfo(null, bindings.ChannelInfo_get_two_to_one(this_ptr == null ? 0 : this_ptr.ptr & ~1));
52 this.ptrs_to.add(this_ptr);
56 // Skipped ChannelInfo_set_two_to_one
57 public ChannelAnnouncement get_announcement_message(ChannelInfo this_ptr) {
58 ChannelAnnouncement ret = new ChannelAnnouncement(null, bindings.ChannelInfo_get_announcement_message(this_ptr == null ? 0 : this_ptr.ptr & ~1));
59 this.ptrs_to.add(this_ptr);
63 public void set_announcement_message(ChannelInfo this_ptr, ChannelAnnouncement val) {
64 bindings.ChannelInfo_set_announcement_message(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
65 this.ptrs_to.add(this_ptr);
66 this.ptrs_to.add(val);
69 // Skipped ChannelInfo_write
70 public ChannelInfo(byte[] ser) {
71 super(bindings.ChannelInfo_read(ser));