4aaf250bc3db60d00859d9960bdeccd33c61fdca
[ldk-java] / ts / structs / ChannelInfo.ts
1
2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
4
5 public class ChannelInfo extends CommonBase {
6         ChannelInfo(Object _dummy, long ptr) { super(ptr); }
7         @Override @SuppressWarnings("deprecation")
8         protected void finalize() throws Throwable {
9                 super.finalize();
10                 if (ptr != 0) { bindings.ChannelInfo_free(ptr); }
11         }
12
13         public ChannelFeatures get_features() {
14                 uint32_t ret = bindings.ChannelInfo_get_features(this.ptr);
15                 ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret);
16                 return ret_hu_conv;
17         }
18
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);
22         }
23
24         public byte[] get_node_one() {
25                 byte[] ret = bindings.ChannelInfo_get_node_one(this.ptr);
26                 return ret;
27         }
28
29         public void set_node_one(byte[] val) {
30                 bindings.ChannelInfo_set_node_one(this.ptr, val);
31         }
32
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);
36                 return ret_hu_conv;
37         }
38
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);
42         }
43
44         public byte[] get_node_two() {
45                 byte[] ret = bindings.ChannelInfo_get_node_two(this.ptr);
46                 return ret;
47         }
48
49         public void set_node_two(byte[] val) {
50                 bindings.ChannelInfo_set_node_two(this.ptr, val);
51         }
52
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);
56                 return ret_hu_conv;
57         }
58
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);
62         }
63
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);
67                 return ret_hu_conv;
68         }
69
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);
73         }
74
75         public byte[] write() {
76                 byte[] ret = bindings.ChannelInfo_write(this.ptr);
77                 return ret;
78         }
79
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);
83                 return ret_hu_conv;
84         }
85
86 }