e76ff9e760e5223a9ad435dc6ed7542d9f0a2284
[ldk-java] / src / main / java / org / ldk / structs / NodeInfo.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5
6 public class NodeInfo extends CommonBase {
7         NodeInfo(Object _dummy, long ptr) { super(ptr); }
8         @Override @SuppressWarnings("deprecation")
9         protected void finalize() throws Throwable {
10                 bindings.NodeInfo_free(ptr); super.finalize();
11         }
12
13         // Skipped NodeInfo_set_channels
14         public RoutingFees get_lowest_inbound_channel_fees(NodeInfo this_ptr) {
15                 RoutingFees ret = new RoutingFees(null, bindings.NodeInfo_get_lowest_inbound_channel_fees(this_ptr == null ? 0 : this_ptr.ptr & ~1));
16                 this.ptrs_to.add(this_ptr);
17                 return ret;
18         }
19
20         public void set_lowest_inbound_channel_fees(NodeInfo this_ptr, RoutingFees val) {
21                 bindings.NodeInfo_set_lowest_inbound_channel_fees(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
22                 this.ptrs_to.add(this_ptr);
23                 this.ptrs_to.add(val);
24         }
25
26         public NodeAnnouncementInfo get_announcement_info(NodeInfo this_ptr) {
27                 NodeAnnouncementInfo ret = new NodeAnnouncementInfo(null, bindings.NodeInfo_get_announcement_info(this_ptr == null ? 0 : this_ptr.ptr & ~1));
28                 this.ptrs_to.add(this_ptr);
29                 return ret;
30         }
31
32         public void set_announcement_info(NodeInfo this_ptr, NodeAnnouncementInfo val) {
33                 bindings.NodeInfo_set_announcement_info(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
34                 this.ptrs_to.add(this_ptr);
35                 this.ptrs_to.add(val);
36         }
37
38         // Skipped NodeInfo_new
39         // Skipped NodeInfo_write
40         public NodeInfo(byte[] ser) {
41                 super(bindings.NodeInfo_read(ser));
42         }
43
44 }