X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FResult_NoneChannelMonitorUpdateErrZ.java;h=05cf131ced11c574520e015d1f9dc1cd8cf5d224;hb=d87886bb194886ef86d3597a5cdc142b6ccc89e9;hp=446857026ac44de7f339b8e0cd5f7cd2d8fe5f53;hpb=c3ae2d6897e5a809459c8d9a72a4b3aa0052c8c8;p=ldk-java diff --git a/src/main/java/org/ldk/structs/Result_NoneChannelMonitorUpdateErrZ.java b/src/main/java/org/ldk/structs/Result_NoneChannelMonitorUpdateErrZ.java index 44685702..05cf131c 100644 --- a/src/main/java/org/ldk/structs/Result_NoneChannelMonitorUpdateErrZ.java +++ b/src/main/java/org/ldk/structs/Result_NoneChannelMonitorUpdateErrZ.java @@ -4,6 +4,8 @@ import org.ldk.impl.bindings; import org.ldk.enums.*; import org.ldk.util.*; import java.util.Arrays; +import java.lang.ref.Reference; +import javax.annotation.Nullable; public class Result_NoneChannelMonitorUpdateErrZ extends CommonBase { private Result_NoneChannelMonitorUpdateErrZ(Object _dummy, long ptr) { super(ptr); } @@ -12,7 +14,7 @@ public class Result_NoneChannelMonitorUpdateErrZ extends CommonBase { } static Result_NoneChannelMonitorUpdateErrZ constr_from_ptr(long ptr) { - if (bindings.LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(ptr)) { + if (bindings.CResult_NoneChannelMonitorUpdateErrZ_is_ok(ptr)) { return new Result_NoneChannelMonitorUpdateErrZ_OK(null, ptr); } else { return new Result_NoneChannelMonitorUpdateErrZ_Err(null, ptr); @@ -25,18 +27,19 @@ public class Result_NoneChannelMonitorUpdateErrZ extends CommonBase { } public static final class Result_NoneChannelMonitorUpdateErrZ_Err extends Result_NoneChannelMonitorUpdateErrZ { - public final LDKChannelMonitorUpdateErr err; + public final ChannelMonitorUpdateErr err; private Result_NoneChannelMonitorUpdateErrZ_Err(Object _dummy, long ptr) { super(_dummy, ptr); - this.err = bindings.LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(ptr); + this.err = bindings.CResult_NoneChannelMonitorUpdateErrZ_get_err(ptr); } } /** * Creates a new CResult_NoneChannelMonitorUpdateErrZ in the success state. */ - public static Result_NoneChannelMonitorUpdateErrZ constructor_ok() { + public static Result_NoneChannelMonitorUpdateErrZ ok() { long ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_ok(); + if (ret >= 0 && ret <= 4096) { return null; } Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -44,18 +47,37 @@ public class Result_NoneChannelMonitorUpdateErrZ extends CommonBase { /** * Creates a new CResult_NoneChannelMonitorUpdateErrZ in the error state. */ - public static Result_NoneChannelMonitorUpdateErrZ constructor_err(LDKChannelMonitorUpdateErr e) { + public static Result_NoneChannelMonitorUpdateErrZ err(org.ldk.enums.ChannelMonitorUpdateErr e) { long ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_err(e); + Reference.reachabilityFence(e); + if (ret >= 0 && ret <= 4096) { return null; } Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret); return ret_hu_conv; } + /** + * Checks if the given object is currently in the success state + */ + public boolean is_ok() { + boolean ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_is_ok(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + long clone_ptr() { + long ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + /** * Creates a new CResult_NoneChannelMonitorUpdateErrZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ public Result_NoneChannelMonitorUpdateErrZ clone() { long ret = bindings.CResult_NoneChannelMonitorUpdateErrZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret); return ret_hu_conv; }