destroyLocalData method

Future<bool> destroyLocalData(
  1. String basePath,
  2. String? mediaCacheBasePath,
  3. String username,
  4. String defaultHomeserverName,
)

destroy the local data of a session

Implementation

Future<bool> destroyLocalData(
  String basePath,
  String? mediaCacheBasePath,
  String username,
  String defaultHomeserverName,
) {
  final tmp0 = basePath;
  final tmp4 = mediaCacheBasePath;
  final tmp10 = username;
  final tmp14 = defaultHomeserverName;
  var tmp1 = 0;
  var tmp2 = 0;
  var tmp3 = 0;
  var tmp5 = 0;
  var tmp7 = 0;
  var tmp8 = 0;
  var tmp9 = 0;
  var tmp11 = 0;
  var tmp12 = 0;
  var tmp13 = 0;
  var tmp15 = 0;
  var tmp16 = 0;
  var tmp17 = 0;
  final tmp0_0 = utf8.encode(tmp0);
  tmp2 = tmp0_0.length;

  final ffi.Pointer<ffi.Uint8> tmp1_0 = this.__allocate(tmp2 * 1, 1);
  final Uint8List tmp1_1 = tmp1_0.asTypedList(tmp2);
  tmp1_1.setAll(0, tmp0_0);
  tmp1 = tmp1_0.address;
  tmp3 = tmp2;
  if (tmp4 == null) {
    tmp5 = 0;
  } else {
    tmp5 = 1;
    final tmp6 = tmp4;
    final tmp6_0 = utf8.encode(tmp6);
    tmp8 = tmp6_0.length;

    final ffi.Pointer<ffi.Uint8> tmp7_0 = this.__allocate(tmp8 * 1, 1);
    final Uint8List tmp7_1 = tmp7_0.asTypedList(tmp8);
    tmp7_1.setAll(0, tmp6_0);
    tmp7 = tmp7_0.address;
    tmp9 = tmp8;
  }
  final tmp10_0 = utf8.encode(tmp10);
  tmp12 = tmp10_0.length;

  final ffi.Pointer<ffi.Uint8> tmp11_0 = this.__allocate(tmp12 * 1, 1);
  final Uint8List tmp11_1 = tmp11_0.asTypedList(tmp12);
  tmp11_1.setAll(0, tmp10_0);
  tmp11 = tmp11_0.address;
  tmp13 = tmp12;
  final tmp14_0 = utf8.encode(tmp14);
  tmp16 = tmp14_0.length;

  final ffi.Pointer<ffi.Uint8> tmp15_0 = this.__allocate(tmp16 * 1, 1);
  final Uint8List tmp15_1 = tmp15_0.asTypedList(tmp16);
  tmp15_1.setAll(0, tmp14_0);
  tmp15 = tmp15_0.address;
  tmp17 = tmp16;
  final tmp18 = _destroyLocalData(
    tmp1,
    tmp2,
    tmp3,
    tmp5,
    tmp7,
    tmp8,
    tmp9,
    tmp11,
    tmp12,
    tmp13,
    tmp15,
    tmp16,
    tmp17,
  );
  final tmp20 = tmp18;
  final ffi.Pointer<ffi.Void> tmp20_0 = ffi.Pointer.fromAddress(tmp20);
  final tmp20_1 = _Box(this, tmp20_0, "__destroy_local_data_future_drop");
  tmp20_1._finalizer = this._registerFinalizer(tmp20_1);
  final tmp19 = _nativeFuture(tmp20_1, this.__destroyLocalDataFuturePoll);
  return tmp19;
}