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 {
10 bindings.RouteHint_free(ptr); super.finalize();
13 public RouteHint(RouteHint orig) {
14 super(bindings.RouteHint_clone(orig == null ? 0 : orig.ptr & ~1));
15 this.ptrs_to.add(orig);
18 public byte[] get_src_node_id(RouteHint this_ptr) {
19 byte[] ret = bindings.RouteHint_get_src_node_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
20 this.ptrs_to.add(this_ptr);
24 public void set_src_node_id(RouteHint this_ptr, byte[] val) {
25 bindings.RouteHint_set_src_node_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
26 this.ptrs_to.add(this_ptr);
29 public long get_short_channel_id(RouteHint this_ptr) {
30 long ret = bindings.RouteHint_get_short_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
31 this.ptrs_to.add(this_ptr);
35 public void set_short_channel_id(RouteHint this_ptr, long val) {
36 bindings.RouteHint_set_short_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
37 this.ptrs_to.add(this_ptr);
40 public RoutingFees get_fees(RouteHint this_ptr) {
41 RoutingFees ret = new RoutingFees(null, bindings.RouteHint_get_fees(this_ptr == null ? 0 : this_ptr.ptr & ~1));
42 this.ptrs_to.add(this_ptr);
46 public void set_fees(RouteHint this_ptr, RoutingFees val) {
47 bindings.RouteHint_set_fees(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
48 this.ptrs_to.add(this_ptr);
49 this.ptrs_to.add(val);
52 public short get_cltv_expiry_delta(RouteHint this_ptr) {
53 short ret = bindings.RouteHint_get_cltv_expiry_delta(this_ptr == null ? 0 : this_ptr.ptr & ~1);
54 this.ptrs_to.add(this_ptr);
58 public void set_cltv_expiry_delta(RouteHint this_ptr, short val) {
59 bindings.RouteHint_set_cltv_expiry_delta(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
60 this.ptrs_to.add(this_ptr);
63 public long get_htlc_minimum_msat(RouteHint this_ptr) {
64 long ret = bindings.RouteHint_get_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
65 this.ptrs_to.add(this_ptr);
69 public void set_htlc_minimum_msat(RouteHint this_ptr, long val) {
70 bindings.RouteHint_set_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
71 this.ptrs_to.add(this_ptr);
74 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) {
75 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));
76 this.ptrs_to.add(fees_arg);