requestRegistrationTokenViaEmail method

Future<RegistrationTokenViaEmailResponse> requestRegistrationTokenViaEmail(
  1. String basePath,
  2. String mediaCacheBasePath,
  3. String username,
  4. String defaultHomeserverName,
  5. String defaultHomeserverUrl,
  6. String email,
)

Request the registration token via email

Implementation

Future<RegistrationTokenViaEmailResponse> requestRegistrationTokenViaEmail(
  String basePath,
  String mediaCacheBasePath,
  String username,
  String defaultHomeserverName,
  String defaultHomeserverUrl,
  String email,
) {
  final tmp0 = basePath;
  final tmp4 = mediaCacheBasePath;
  final tmp8 = username;
  final tmp12 = defaultHomeserverName;
  final tmp16 = defaultHomeserverUrl;
  final tmp20 = email;
  var tmp1 = 0;
  var tmp2 = 0;
  var tmp3 = 0;
  var tmp5 = 0;
  var tmp6 = 0;
  var tmp7 = 0;
  var tmp9 = 0;
  var tmp10 = 0;
  var tmp11 = 0;
  var tmp13 = 0;
  var tmp14 = 0;
  var tmp15 = 0;
  var tmp17 = 0;
  var tmp18 = 0;
  var tmp19 = 0;
  var tmp21 = 0;
  var tmp22 = 0;
  var tmp23 = 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;
  final tmp4_0 = utf8.encode(tmp4);
  tmp6 = tmp4_0.length;

  final ffi.Pointer<ffi.Uint8> tmp5_0 = this.__allocate(tmp6 * 1, 1);
  final Uint8List tmp5_1 = tmp5_0.asTypedList(tmp6);
  tmp5_1.setAll(0, tmp4_0);
  tmp5 = tmp5_0.address;
  tmp7 = tmp6;
  final tmp8_0 = utf8.encode(tmp8);
  tmp10 = tmp8_0.length;

  final ffi.Pointer<ffi.Uint8> tmp9_0 = this.__allocate(tmp10 * 1, 1);
  final Uint8List tmp9_1 = tmp9_0.asTypedList(tmp10);
  tmp9_1.setAll(0, tmp8_0);
  tmp9 = tmp9_0.address;
  tmp11 = tmp10;
  final tmp12_0 = utf8.encode(tmp12);
  tmp14 = tmp12_0.length;

  final ffi.Pointer<ffi.Uint8> tmp13_0 = this.__allocate(tmp14 * 1, 1);
  final Uint8List tmp13_1 = tmp13_0.asTypedList(tmp14);
  tmp13_1.setAll(0, tmp12_0);
  tmp13 = tmp13_0.address;
  tmp15 = tmp14;
  final tmp16_0 = utf8.encode(tmp16);
  tmp18 = tmp16_0.length;

  final ffi.Pointer<ffi.Uint8> tmp17_0 = this.__allocate(tmp18 * 1, 1);
  final Uint8List tmp17_1 = tmp17_0.asTypedList(tmp18);
  tmp17_1.setAll(0, tmp16_0);
  tmp17 = tmp17_0.address;
  tmp19 = tmp18;
  final tmp20_0 = utf8.encode(tmp20);
  tmp22 = tmp20_0.length;

  final ffi.Pointer<ffi.Uint8> tmp21_0 = this.__allocate(tmp22 * 1, 1);
  final Uint8List tmp21_1 = tmp21_0.asTypedList(tmp22);
  tmp21_1.setAll(0, tmp20_0);
  tmp21 = tmp21_0.address;
  tmp23 = tmp22;
  final tmp24 = _requestRegistrationTokenViaEmail(
    tmp1,
    tmp2,
    tmp3,
    tmp5,
    tmp6,
    tmp7,
    tmp9,
    tmp10,
    tmp11,
    tmp13,
    tmp14,
    tmp15,
    tmp17,
    tmp18,
    tmp19,
    tmp21,
    tmp22,
    tmp23,
  );
  final tmp26 = tmp24;
  final ffi.Pointer<ffi.Void> tmp26_0 = ffi.Pointer.fromAddress(tmp26);
  final tmp26_1 = _Box(
      this, tmp26_0, "__request_registration_token_via_email_future_drop");
  tmp26_1._finalizer = this._registerFinalizer(tmp26_1);
  final tmp25 = _nativeFuture(
      tmp26_1, this.__requestRegistrationTokenViaEmailFuturePoll);
  return tmp25;
}