X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FErrorAction.ts;h=ff12a1ded092d7a55610e74d05695a207b875270;hb=e2aa598aa07fde645c4fab04df6f49db84a5e6db;hp=25bf0917d9c2ca34b92e7db45c14cb5fc43bf485;hpb=c3ae2d6897e5a809459c8d9a72a4b3aa0052c8c8;p=ldk-java diff --git a/ts/structs/ErrorAction.ts b/ts/structs/ErrorAction.ts index 25bf0917..ff12a1de 100644 --- a/ts/structs/ErrorAction.ts +++ b/ts/structs/ErrorAction.ts @@ -16,6 +16,9 @@ export default class ErrorAction extends CommonBase { if (raw_val instanceof bindings.LDKErrorAction.IgnoreError) { return new IgnoreError(this.ptr, raw_val); } + if (raw_val instanceof bindings.LDKErrorAction.IgnoreAndLog) { + return new IgnoreAndLog(this.ptr, raw_val); + } if (raw_val instanceof bindings.LDKErrorAction.SendErrorMessage) { return new SendErrorMessage(this.ptr, raw_val); } @@ -38,6 +41,13 @@ export class IgnoreError extends ErrorAction { super(null, ptr); } } +export class IgnoreAndLog extends ErrorAction { + public ignore_and_log: Level; + private constructor(ptr: number, obj: bindings.LDKErrorAction.IgnoreAndLog) { + super(null, ptr); + this.ignore_and_log = obj.ignore_and_log; + } +} export class SendErrorMessage extends ErrorAction { public msg: ErrorMessage; private constructor(ptr: number, obj: bindings.LDKErrorAction.SendErrorMessage) { @@ -48,6 +58,11 @@ export class SendErrorMessage extends ErrorAction { this.msg = msg_hu_conv; } } + public number clone_ptr() { + number ret = bindings.ErrorAction_clone_ptr(this.ptr); + return ret; + } + public ErrorAction clone() { number ret = bindings.ErrorAction_clone(this.ptr); ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret); @@ -55,4 +70,32 @@ export class SendErrorMessage extends ErrorAction { return ret_hu_conv; } + public static ErrorAction constructor_disconnect_peer(ErrorMessage msg) { + number ret = bindings.ErrorAction_disconnect_peer(msg == null ? 0 : msg.ptr & ~1); + ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; + } + + public static ErrorAction constructor_ignore_error() { + number ret = bindings.ErrorAction_ignore_error(); + ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; + } + + public static ErrorAction constructor_ignore_and_log(Level a) { + number ret = bindings.ErrorAction_ignore_and_log(a); + ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; + } + + public static ErrorAction constructor_send_error_message(ErrorMessage msg) { + number ret = bindings.ErrorAction_send_error_message(msg == null ? 0 : msg.ptr & ~1); + ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; + } + }