IHotSearchContract.kt 1.02 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
package com.yidianling.consultant.contract

import android.content.Context
import com.ydl.ydlcommon.mvp.base.IModel
import com.ydl.ydlcommon.mvp.base.IPresenter
import com.ydl.ydlcommon.mvp.base.IView
import com.yidianling.consultant.bean.HotSearchBean
import io.reactivex.Observable

/**
 * @author yuanWai
 * @描述: 搜索页面约束类
 * @Copyright Copyright (c) 2019
 * @Company 壹点灵
 * @date 2019/03/19
 */
class IHotSearchContract {

    interface View : IView {
        /**
         * 搜索页接口
         */
        fun searchDataResponse(hotSearchBean: HotSearchBean)

        /**
         * 请求失败
         */
        fun requestFail()
    }

    interface Presenter : IPresenter<View> {
        /**
         * 获取本地缓存
         */
        fun localData(context: Context)

        /**
         * 搜索页接口请求
         */
        fun searchData()
    }

    interface Model : IModel {
        /**
         * 搜索页接口
         */
        fun searchData(): Observable<HotSearchBean>
    }
}