2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
5 public class ChannelInfo extends CommonBase {
6 ChannelInfo(Object _dummy, long ptr) { super(ptr); }
7 @Override @SuppressWarnings("deprecation")
8 protected void finalize() throws Throwable {
10 if (ptr != 0) { bindings.ChannelInfo_free(ptr); }
13 public ChannelFeatures get_features() {
14 uint32_t ret = bindings.ChannelInfo_get_features(this.ptr);
15 ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret);
19 public void set_features(ChannelFeatures val) {
20 bindings.ChannelInfo_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
21 this.ptrs_to.add(val);
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 uint32_t ret = bindings.ChannelInfo_get_one_to_two(this.ptr);
35 DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
39 public void set_one_to_two(DirectionalChannelInfo val) {
40 bindings.ChannelInfo_set_one_to_two(this.ptr, val == null ? 0 : val.ptr & ~1);
41 this.ptrs_to.add(val);
44 public byte[] get_node_two() {
45 byte[] ret = bindings.ChannelInfo_get_node_two(this.ptr);
49 public void set_node_two(byte[] val) {
50 bindings.ChannelInfo_set_node_two(this.ptr, val);
53 public DirectionalChannelInfo get_two_to_one() {
54 uint32_t ret = bindings.ChannelInfo_get_two_to_one(this.ptr);
55 DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
59 public void set_two_to_one(DirectionalChannelInfo val) {
60 bindings.ChannelInfo_set_two_to_one(this.ptr, val == null ? 0 : val.ptr & ~1);
61 this.ptrs_to.add(val);
64 public ChannelAnnouncement get_announcement_message() {
65 uint32_t ret = bindings.ChannelInfo_get_announcement_message(this.ptr);
66 ChannelAnnouncement ret_hu_conv = new ChannelAnnouncement(null, ret);
70 public void set_announcement_message(ChannelAnnouncement val) {
71 bindings.ChannelInfo_set_announcement_message(this.ptr, val == null ? 0 : val.ptr & ~1);
72 this.ptrs_to.add(val);
75 public byte[] write() {
76 byte[] ret = bindings.ChannelInfo_write(this.ptr);
80 public static ChannelInfo constructor_read(byte[] ser) {
81 uint32_t ret = bindings.ChannelInfo_read(ser);
82 ChannelInfo ret_hu_conv = new ChannelInfo(null, ret);