d886689d383bb0b8865dd1ec7c01d54175b54c8a
[ldk-java] / src / main / java / org / ldk / structs / CommitmentUpdate.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5
6 public class CommitmentUpdate extends CommonBase {
7         CommitmentUpdate(Object _dummy, long ptr) { super(ptr); }
8         @Override @SuppressWarnings("deprecation")
9         protected void finalize() throws Throwable {
10                 bindings.CommitmentUpdate_free(ptr); super.finalize();
11         }
12
13         public CommitmentUpdate(CommitmentUpdate orig) {
14                 super(bindings.CommitmentUpdate_clone(orig.ptr & ~1));
15                 this.ptrs_to.add(orig);
16         }
17
18         // Skipped CommitmentUpdate_set_update_add_htlcs
19         // Skipped CommitmentUpdate_set_update_fulfill_htlcs
20         // Skipped CommitmentUpdate_set_update_fail_htlcs
21         // Skipped CommitmentUpdate_set_update_fail_malformed_htlcs
22         public UpdateFee get_update_fee(CommitmentUpdate this_ptr) {
23                 UpdateFee ret = new UpdateFee(null, bindings.CommitmentUpdate_get_update_fee(this_ptr.ptr & ~1));
24                 this.ptrs_to.add(this_ptr);
25                 return ret;
26         }
27
28         public void set_update_fee(CommitmentUpdate this_ptr, UpdateFee val) {
29                 bindings.CommitmentUpdate_set_update_fee(this_ptr.ptr & ~1, val.ptr & ~1);
30                 this.ptrs_to.add(this_ptr);
31                 this.ptrs_to.add(val);
32         }
33
34         public CommitmentSigned get_commitment_signed(CommitmentUpdate this_ptr) {
35                 CommitmentSigned ret = new CommitmentSigned(null, bindings.CommitmentUpdate_get_commitment_signed(this_ptr.ptr & ~1));
36                 this.ptrs_to.add(this_ptr);
37                 return ret;
38         }
39
40         public void set_commitment_signed(CommitmentUpdate this_ptr, CommitmentSigned val) {
41                 bindings.CommitmentUpdate_set_commitment_signed(this_ptr.ptr & ~1, val.ptr & ~1);
42                 this.ptrs_to.add(this_ptr);
43                 this.ptrs_to.add(val);
44         }
45
46         // Skipped CommitmentUpdate_new
47 }