Create structs and traits that are (a bit) more human-friendly!
[ldk-java] / src / main / java / org / ldk / structs / ChannelUpdate.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5
6 public class ChannelUpdate extends CommonBase {
7         ChannelUpdate(Object _dummy, long ptr) { super(ptr); }
8         @Override @SuppressWarnings("deprecation")
9         protected void finalize() throws Throwable {
10                 bindings.ChannelUpdate_free(ptr); super.finalize();
11         }
12
13         public ChannelUpdate(ChannelUpdate orig) {
14                 super(bindings.ChannelUpdate_clone(orig.ptr & ~1));
15                 this.ptrs_to.add(orig);
16         }
17
18         // Skipped ChannelUpdate_get_signature
19         // Skipped ChannelUpdate_set_signature
20         public UnsignedChannelUpdate get_contents(ChannelUpdate this_ptr) {
21                 UnsignedChannelUpdate ret = new UnsignedChannelUpdate(null, bindings.ChannelUpdate_get_contents(this_ptr.ptr & ~1));
22                 this.ptrs_to.add(this_ptr);
23                 return ret;
24         }
25
26         public void set_contents(ChannelUpdate this_ptr, UnsignedChannelUpdate val) {
27                 bindings.ChannelUpdate_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 ChannelUpdate_new
33         // Skipped ChannelUpdate_write
34         // Skipped ChannelUpdate_read
35 }