1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 public class RouteHint extends CommonBase {
7 RouteHint(Object _dummy, long ptr) { super(ptr); }
8 @Override @SuppressWarnings("deprecation")
9 protected void finalize() throws Throwable {
11 bindings.RouteHint_free(ptr);
14 public RouteHint(RouteHint orig) {
15 super(bindings.RouteHint_clone(orig == null ? 0 : orig.ptr & ~1));
16 this.ptrs_to.add(orig);
19 public byte[] get_src_node_id(RouteHint this_ptr) {
20 byte[] ret = bindings.RouteHint_get_src_node_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
21 this.ptrs_to.add(this_ptr);
25 public void set_src_node_id(RouteHint this_ptr, byte[] val) {
26 bindings.RouteHint_set_src_node_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
27 this.ptrs_to.add(this_ptr);
30 public long get_short_channel_id(RouteHint this_ptr) {
31 long ret = bindings.RouteHint_get_short_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
32 this.ptrs_to.add(this_ptr);
36 public void set_short_channel_id(RouteHint this_ptr, long val) {
37 bindings.RouteHint_set_short_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
38 this.ptrs_to.add(this_ptr);
41 public RoutingFees get_fees(RouteHint this_ptr) {
42 RoutingFees ret = new RoutingFees(null, bindings.RouteHint_get_fees(this_ptr == null ? 0 : this_ptr.ptr & ~1));
43 this.ptrs_to.add(this_ptr);
47 public void set_fees(RouteHint this_ptr, RoutingFees val) {
48 bindings.RouteHint_set_fees(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
49 this.ptrs_to.add(this_ptr);
50 this.ptrs_to.add(val);
53 public short get_cltv_expiry_delta(RouteHint this_ptr) {
54 short ret = bindings.RouteHint_get_cltv_expiry_delta(this_ptr == null ? 0 : this_ptr.ptr & ~1);
55 this.ptrs_to.add(this_ptr);
59 public void set_cltv_expiry_delta(RouteHint this_ptr, short val) {
60 bindings.RouteHint_set_cltv_expiry_delta(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
61 this.ptrs_to.add(this_ptr);
64 public long get_htlc_minimum_msat(RouteHint this_ptr) {
65 long ret = bindings.RouteHint_get_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
66 this.ptrs_to.add(this_ptr);
70 public void set_htlc_minimum_msat(RouteHint this_ptr, long val) {
71 bindings.RouteHint_set_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
72 this.ptrs_to.add(this_ptr);
75 public RouteHint(byte[] src_node_id_arg, long short_channel_id_arg, RoutingFees fees_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg) {
76 super(bindings.RouteHint_new(src_node_id_arg, short_channel_id_arg, fees_arg == null ? 0 : fees_arg.ptr & ~1, cltv_expiry_delta_arg, htlc_minimum_msat_arg));
77 this.ptrs_to.add(fees_arg);