]> git.bitcoin.ninja Git - ldk-java/blob - ts/structs/MessageHandler.ts
Remove commented-out code
[ldk-java] / ts / structs / MessageHandler.ts
1
2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
4
5 public class MessageHandler extends CommonBase {
6         MessageHandler(Object _dummy, long ptr) { super(ptr); }
7         @Override @SuppressWarnings("deprecation")
8         protected void finalize() throws Throwable {
9                 super.finalize();
10                 if (ptr != 0) { bindings.MessageHandler_free(ptr); }
11         }
12
13         public ChannelMessageHandler get_chan_handler() {
14                 uint32_t ret = bindings.MessageHandler_get_chan_handler(this.ptr);
15                 ChannelMessageHandler ret_hu_conv = new ChannelMessageHandler(null, ret);
16                 ret_hu_conv.ptrs_to.add(this);
17                 return ret_hu_conv;
18         }
19
20         public void set_chan_handler(ChannelMessageHandler val) {
21                 bindings.MessageHandler_set_chan_handler(this.ptr, val == null ? 0 : val.ptr);
22                 this.ptrs_to.add(val);
23         }
24
25         public RoutingMessageHandler get_route_handler() {
26                 uint32_t ret = bindings.MessageHandler_get_route_handler(this.ptr);
27                 RoutingMessageHandler ret_hu_conv = new RoutingMessageHandler(null, ret);
28                 ret_hu_conv.ptrs_to.add(this);
29                 return ret_hu_conv;
30         }
31
32         public void set_route_handler(RoutingMessageHandler val) {
33                 bindings.MessageHandler_set_route_handler(this.ptr, val == null ? 0 : val.ptr);
34                 this.ptrs_to.add(val);
35         }
36
37         public static MessageHandler constructor_new(ChannelMessageHandler chan_handler_arg, RoutingMessageHandler route_handler_arg) {
38                 uint32_t ret = bindings.MessageHandler_new(chan_handler_arg == null ? 0 : chan_handler_arg.ptr, route_handler_arg == null ? 0 : route_handler_arg.ptr);
39                 MessageHandler ret_hu_conv = new MessageHandler(null, ret);
40                 ret_hu_conv.ptrs_to.add(chan_handler_arg);
41                 ret_hu_conv.ptrs_to.add(route_handler_arg);
42                 return ret_hu_conv;
43         }
44
45 }