Skip to content

Instantly share code, notes, and snippets.

@metin-atalay
Last active March 20, 2022 13:40
Show Gist options
  • Save metin-atalay/1db078c75dfd7de1e5ac87c71bca50c3 to your computer and use it in GitHub Desktop.
Save metin-atalay/1db078c75dfd7de1e5ac87c71bca50c3 to your computer and use it in GitHub Desktop.
import Foundation
import UIKit
protocol WeatherListViewProtocol: class {
var presenter: WeatherListPresenterProtocol? { get set }
// PRESENTER -> VIEW
func showWeatherInfo(weathers: WeatherModel)
func showError()
func showLoading()
func hideLoading()
}
protocol WeeatherListWireFrameProtocol: class {
static func createWeatherListModule() -> UIViewController
}
protocol WeatherListPresenterProtocol: class {
var view: WeatherListViewProtocol? { get set }
var interactor: WeatherListInteractorInputProtocol? { get set }
var wireFrame: WeatherListWireFrameProtocol? { get set }
// VIEW -> PRESENTER
func viewDidLoad( cityName: String)
}
protocol WeatherListWireFrameProtocol: class {
static func createWeatherListModule() -> UIViewController
}
protocol WeatherListInteractorOutputProtocol: class {
// INTERACTOR -> PRESENTER
func didRetrieveWeather(_ weatherInfo: WeatherModel)
func onError()
}
protocol WeatherListInteractorInputProtocol: class {
var presenter: WeatherListInteractorOutputProtocol? { get set }
var remoteDatamanager: WeatherListRemoteDataManagerInputProtocol? { get set }
// PRESENTER -> INTERACTOR
func retrieveWeatherList(cityName: String)
}
protocol WeatherListRemoteDataManagerInputProtocol: class {
var remoteRequestHandler: WeatherListRemoteDataManagerOutputProtocol? { get set }
// INTERACTOR -> REMOTEDATAMANAGER
func retrieveWeatherList(cityName: String)
}
protocol WeatherListRemoteDataManagerOutputProtocol: class {
// REMOTEDATAMANAGER -> INTERACTOR
func onWeeatherRetrieved(_ cityInfo: WeatherModel)
func onError()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment