3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
8 export default class ChannelInfo extends CommonBase {
9 constructor(_dummy: object, ptr: number) {
14 protected finalize() {
18 bindings.ChannelInfo_free(this.ptr);
21 public ChannelFeatures get_features() {
22 number ret = bindings.ChannelInfo_get_features(this.ptr);
23 const ret_hu_conv: ChannelFeatures = new ChannelFeatures(null, ret);
27 public void set_features(ChannelFeatures val) {
28 bindings.ChannelInfo_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
29 this.ptrs_to.add(val);
32 public Uint8Array get_node_one() {
33 Uint8Array ret = bindings.ChannelInfo_get_node_one(this.ptr);
37 public void set_node_one(Uint8Array val) {
38 bindings.ChannelInfo_set_node_one(this.ptr, val);
41 public DirectionalChannelInfo get_one_to_two() {
42 number ret = bindings.ChannelInfo_get_one_to_two(this.ptr);
43 const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret);
47 public void set_one_to_two(DirectionalChannelInfo val) {
48 bindings.ChannelInfo_set_one_to_two(this.ptr, val == null ? 0 : val.ptr & ~1);
49 this.ptrs_to.add(val);
52 public Uint8Array get_node_two() {
53 Uint8Array ret = bindings.ChannelInfo_get_node_two(this.ptr);
57 public void set_node_two(Uint8Array val) {
58 bindings.ChannelInfo_set_node_two(this.ptr, val);
61 public DirectionalChannelInfo get_two_to_one() {
62 number ret = bindings.ChannelInfo_get_two_to_one(this.ptr);
63 const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret);
67 public void set_two_to_one(DirectionalChannelInfo val) {
68 bindings.ChannelInfo_set_two_to_one(this.ptr, val == null ? 0 : val.ptr & ~1);
69 this.ptrs_to.add(val);
72 public ChannelAnnouncement get_announcement_message() {
73 number ret = bindings.ChannelInfo_get_announcement_message(this.ptr);
74 const ret_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, ret);
78 public void set_announcement_message(ChannelAnnouncement val) {
79 bindings.ChannelInfo_set_announcement_message(this.ptr, val == null ? 0 : val.ptr & ~1);
80 this.ptrs_to.add(val);
83 public Uint8Array write() {
84 Uint8Array ret = bindings.ChannelInfo_write(this.ptr);
88 public static ChannelInfo constructor_read(Uint8Array ser) {
89 number ret = bindings.ChannelInfo_read(ser);
90 const ret_hu_conv: ChannelInfo = new ChannelInfo(null, ret);