]> git.bitcoin.ninja Git - ldk-java/blob - src/main/java/org/ldk/structs/ChannelInfo.java
Fix race in tests
[ldk-java] / src / main / java / org / ldk / structs / ChannelInfo.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5 import org.ldk.util.*;
6 import java.util.Arrays;
7
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class ChannelInfo extends CommonBase {
10         ChannelInfo(Object _dummy, long ptr) { super(ptr); }
11         @Override @SuppressWarnings("deprecation")
12         protected void finalize() throws Throwable {
13                 super.finalize();
14                 if (ptr != 0) { bindings.ChannelInfo_free(ptr); }
15         }
16
17         public ChannelFeatures get_features() {
18                 long ret = bindings.ChannelInfo_get_features(this.ptr);
19                 ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret);
20                 return ret_hu_conv;
21         }
22
23         // Skipped ChannelInfo_set_features
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                 long 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         // Skipped ChannelInfo_set_one_to_two
40         public byte[] get_node_two() {
41                 byte[] ret = bindings.ChannelInfo_get_node_two(this.ptr);
42                 return ret;
43         }
44
45         public void set_node_two(byte[] val) {
46                 bindings.ChannelInfo_set_node_two(this.ptr, val);
47         }
48
49         public DirectionalChannelInfo get_two_to_one() {
50                 long ret = bindings.ChannelInfo_get_two_to_one(this.ptr);
51                 DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
52                 return ret_hu_conv;
53         }
54
55         // Skipped ChannelInfo_set_two_to_one
56         public ChannelAnnouncement get_announcement_message() {
57                 long ret = bindings.ChannelInfo_get_announcement_message(this.ptr);
58                 ChannelAnnouncement ret_hu_conv = new ChannelAnnouncement(null, ret);
59                 return ret_hu_conv;
60         }
61
62         public void set_announcement_message(ChannelAnnouncement val) {
63                 bindings.ChannelInfo_set_announcement_message(this.ptr, val == null ? 0 : val.ptr & ~1);
64                 this.ptrs_to.add(val);
65         }
66
67         public byte[] write(ChannelInfo obj) {
68                 byte[] ret = bindings.ChannelInfo_write(obj == null ? 0 : obj.ptr & ~1);
69                 this.ptrs_to.add(obj);
70                 return ret;
71         }
72
73         public static ChannelInfo constructor_read(byte[] ser) {
74                 long ret = bindings.ChannelInfo_read(ser);
75                 ChannelInfo ret_hu_conv = new ChannelInfo(null, ret);
76                 return ret_hu_conv;
77         }
78
79 }