Now we will implement a signup interactor to act as a model that our yet-to-be-implemented signup presenter will communicate with. Create a SignUpInteractor interface within the signup package, as follows:
package com.example.messenger.ui.signupimport com.example.messenger.ui.auth.AuthInteractorinterface SignUpInteractor : AuthInteractor { interface OnSignUpFinishedListener { fun onSuccess() fun onUsernameError() fun onPasswordError() fun onPhoneNumberError() fun onError() } fun signUp(username: String, phoneNumber: String, password: String, listener: OnSignUpFinishedListener) fun getAuthorization(listener: AuthInteractor.onAuthFinishedListener)}
You may have noticed that SignUpInteractor extends AuthInteractor ...