Properly set CVec_u8Z to a byte[] which adds a ton more fn's
[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
6 public class ChannelInfo extends CommonBase {
7         ChannelInfo(Object _dummy, long ptr) { super(ptr); }
8         @Override @SuppressWarnings("deprecation")
9         protected void finalize() throws Throwable {
10                 super.finalize();
11                 bindings.ChannelInfo_free(ptr);
12         }
13
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);
17                 return ret;
18         }
19
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);
24                 return ret;
25         }
26
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);
30         }
31
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);
35                 return ret;
36         }
37
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);
42                 return ret;
43         }
44
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);
48         }
49
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);
53                 return ret;
54         }
55
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);
60                 return ret;
61         }
62
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);
67         }
68
69         public byte[] write(ChannelInfo obj) {
70                 byte[] ret = bindings.ChannelInfo_write(obj == null ? 0 : obj.ptr & ~1);
71                 this.ptrs_to.add(obj);
72                 return ret;
73         }
74
75         public ChannelInfo(byte[] ser) {
76                 super(bindings.ChannelInfo_read(ser));
77         }
78
79 }