30d57ecb87e96cc3ce6daa50481bc3e43a258d22
[ldk-java] / ts / structs / Pong.ts
1
2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
4
5 public class Pong extends CommonBase {
6         Pong(Object _dummy, long ptr) { super(ptr); }
7         @Override @SuppressWarnings("deprecation")
8         protected void finalize() throws Throwable {
9                 super.finalize();
10                 if (ptr != 0) { bindings.Pong_free(ptr); }
11         }
12
13         public Pong clone() {
14                 uint32_t ret = bindings.Pong_clone(this.ptr);
15                 Pong ret_hu_conv = new Pong(null, ret);
16                 return ret_hu_conv;
17         }
18
19         public short get_byteslen() {
20                 short ret = bindings.Pong_get_byteslen(this.ptr);
21                 return ret;
22         }
23
24         public void set_byteslen(short val) {
25                 bindings.Pong_set_byteslen(this.ptr, val);
26         }
27
28         public static Pong constructor_new(short byteslen_arg) {
29                 uint32_t ret = bindings.Pong_new(byteslen_arg);
30                 Pong ret_hu_conv = new Pong(null, ret);
31                 return ret_hu_conv;
32         }
33
34         public byte[] write() {
35                 byte[] ret = bindings.Pong_write(this.ptr);
36                 return ret;
37         }
38
39         public static Result_PongDecodeErrorZ constructor_read(byte[] ser) {
40                 uint32_t ret = bindings.Pong_read(ser);
41                 Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);
42                 return ret_hu_conv;
43         }
44
45 }