You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

47 lines
1.1 KiB

//
// AddressSearchPresenter.swift
// GME Remit
//
// Created by InKwon Devik Kim on 22/04/2019.
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved.
//
import Foundation
class SearchAddressPresenter {
// MARK: Properties
weak var view: SearchAddressViewInterface?
var interactor: SearchAddressInteractorInput?
var wireframe: SearchAddressWireframeInput?
// MARK: Converting entities
}
// MARK: AddressSearch module interface
extension SearchAddressPresenter: SearchAddressModuleInterface {
func fetchAddress(
pageIndex: Int,
interval: Int,
keyword: String
) {
self.view?.startLoading()
self.interactor?.fetchAddress(pageIndex: pageIndex, interval: interval, keyword: keyword)
}
}
// MARK: AddressSearch interactor output interface
extension SearchAddressPresenter: SearchAddressInteractorOutput {
func setJusoModel(with model: JusoResult?) {
self.view?.endLoading()
self.view?.setJusoModel(with: model)
}
func failure(with error: Error) {
self.view?.endLoading()
self.view?.failure(with: error)
}
}