1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
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();
13 public NodeAnnouncement(NodeAnnouncement orig) {
14 super(bindings.NodeAnnouncement_clone(orig.ptr & ~1));
15 this.ptrs_to.add(orig);
18 public byte[] get_signature(NodeAnnouncement this_ptr) {
19 byte[] ret = bindings.NodeAnnouncement_get_signature(this_ptr.ptr & ~1);
20 this.ptrs_to.add(this_ptr);
24 public void set_signature(NodeAnnouncement this_ptr, byte[] val) {
25 bindings.NodeAnnouncement_set_signature(this_ptr.ptr & ~1, val);
26 this.ptrs_to.add(this_ptr);
29 public UnsignedNodeAnnouncement get_contents(NodeAnnouncement this_ptr) {
30 UnsignedNodeAnnouncement ret = new UnsignedNodeAnnouncement(null, bindings.NodeAnnouncement_get_contents(this_ptr.ptr & ~1));
31 this.ptrs_to.add(this_ptr);
35 public void set_contents(NodeAnnouncement this_ptr, UnsignedNodeAnnouncement val) {
36 bindings.NodeAnnouncement_set_contents(this_ptr.ptr & ~1, val.ptr & ~1);
37 this.ptrs_to.add(this_ptr);
38 this.ptrs_to.add(val);
41 public NodeAnnouncement(byte[] signature_arg, UnsignedNodeAnnouncement contents_arg) {
42 super(bindings.NodeAnnouncement_new(signature_arg, contents_arg.ptr & ~1));
43 this.ptrs_to.add(contents_arg);
46 // Skipped NodeAnnouncement_write
47 // Skipped NodeAnnouncement_read