Create structs and traits that are (a bit) more human-friendly!
[ldk-java] / src / main / java / org / ldk / structs / NodeAnnouncement.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5
6 public class NodeAnnouncement extends CommonBase {
7         NodeAnnouncement(Object _dummy, long ptr) { super(ptr); }
8         @Override @SuppressWarnings("deprecation")
9         protected void finalize() throws Throwable {
10                 bindings.NodeAnnouncement_free(ptr); super.finalize();
11         }
12
13         public NodeAnnouncement(NodeAnnouncement orig) {
14                 super(bindings.NodeAnnouncement_clone(orig.ptr & ~1));
15                 this.ptrs_to.add(orig);
16         }
17
18         // Skipped NodeAnnouncement_get_signature
19         // Skipped NodeAnnouncement_set_signature
20         public UnsignedNodeAnnouncement get_contents(NodeAnnouncement this_ptr) {
21                 UnsignedNodeAnnouncement ret = new UnsignedNodeAnnouncement(null, bindings.NodeAnnouncement_get_contents(this_ptr.ptr & ~1));
22                 this.ptrs_to.add(this_ptr);
23                 return ret;
24         }
25
26         public void set_contents(NodeAnnouncement this_ptr, UnsignedNodeAnnouncement val) {
27                 bindings.NodeAnnouncement_set_contents(this_ptr.ptr & ~1, val.ptr & ~1);
28                 this.ptrs_to.add(this_ptr);
29                 this.ptrs_to.add(val);
30         }
31
32         // Skipped NodeAnnouncement_new
33         // Skipped NodeAnnouncement_write
34         // Skipped NodeAnnouncement_read
35 }