3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
8 export default class FilesystemPersister extends CommonBase {
9 constructor(_dummy: object, ptr: number) {
14 protected finalize() {
18 bindings.FilesystemPersister_free(this.ptr);
21 public static FilesystemPersister constructor_new(String path_to_channel_data) {
22 number ret = bindings.FilesystemPersister_new(path_to_channel_data);
23 const ret_hu_conv: FilesystemPersister = new FilesystemPersister(null, ret);
24 ret_hu_conv.ptrs_to.add(ret_hu_conv);
28 public String get_data_dir() {
29 String ret = bindings.FilesystemPersister_get_data_dir(this.ptr);
33 public Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ read_channelmonitors(KeysInterface keys_manager) {
34 number ret = bindings.FilesystemPersister_read_channelmonitors(this.ptr, keys_manager == null ? 0 : keys_manager.ptr);
35 Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ ret_hu_conv = Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.constr_from_ptr(ret);
36 this.ptrs_to.add(keys_manager);
40 public Persist as_Persist() {
41 number ret = bindings.FilesystemPersister_as_Persist(this.ptr);
42 Persist ret_hu_conv = new Persist(null, ret);
43 ret_hu_conv.ptrs_to.add(this);