X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FErrorAction.ts;h=a2f28ba8b5355db9cdef0426eaa4bc4ef6255651;hb=d294ad273a3d99aa2857efb10b225a2e20c84a16;hp=25bf0917d9c2ca34b92e7db45c14cb5fc43bf485;hpb=c45b91b3165ba0ff774d12d357188cae979574d3;p=ldk-java diff --git a/ts/structs/ErrorAction.ts b/ts/structs/ErrorAction.ts index 25bf0917..a2f28ba8 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) { @@ -55,4 +65,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; + } + }