IConfideHomeContract.kt 3.28 KB
Newer Older
洪国微 committed
1 2 3 4 5 6 7 8 9
package com.ydl.confide.home.contract

import android.content.Context
import com.ydl.confide.home.bean.ConfideHomeBodyBean
import com.ydl.confide.home.bean.ConfideHomeDataBean
import com.ydl.confide.home.http.ConfideRecommendParam
import com.ydl.ydlcommon.mvp.base.IModel
import com.ydl.ydlcommon.mvp.base.IPresenter
import com.ydl.ydlcommon.mvp.base.IView
洪国微 committed
10
import com.ydl.ydlcommon.mvp.lce.ILceView
洪国微 committed
11 12 13 14 15 16 17 18 19 20 21 22
import com.ydl.ydlcommon.view.DrawableRightTextView
import io.reactivex.Observable

/**
 * @author yuanwai
 * @描述:倾诉首页约束类
 * @Copyright Copyright (c) 2018
 * @Company 壹点灵
 * @date 2018/8/10
 */
interface IConfideHomeContract{
    //View接口
洪国微 committed
23
    interface View : IView,ILceView {
洪国微 committed
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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80

        /**
         * 倾诉首页数据请求结果
         * @param list 数据集合
         */
        fun confideHomeResponse(list : MutableList<ConfideHomeDataBean>)

        /**
         * 倾诉首页数据请求失败
         */
        fun confideHomeRequestFail()

        /**
         * 为你推荐--筛选 请求结果
         */
        fun recommendListResponse(bean : ConfideHomeDataBean)

        /**
         * 为你推荐--翻页 请求结果
         */
        fun recommendListMoreResponse(bean : ConfideHomeDataBean)

        /**
         * 更新section的播放状态
         * 点击列表中的一个播放按钮 其他播放按钮要显示暂停状态
         * @param type
         * @param index 模块中点击播放的索引位置
         * @param recommendId
         */
        fun updataPlayStatu(type : Int?,index : Int,recommendId : Int,isPlaying : Boolean)

        /**
         * 为你推荐列表
         */
        fun recommendList(page : Int)
        /**
         * 排序弹窗
         */
        fun showSortPopupWindow(v_line_top: android.view.View, tvSort: DrawableRightTextView, bodyBean: ConfideHomeBodyBean?)

        /**
         * 性别年龄弹窗
         */
        fun showSexAgePopupWindow(v_line_top: android.view.View, tvSexAge: DrawableRightTextView, bodyBean: ConfideHomeBodyBean?)

        /**
         * 擅长方向弹窗
         */
        fun showGoodPopupWindow(v_line_top: android.view.View, tvGood: DrawableRightTextView, bodyBean: ConfideHomeBodyBean?)

        /**
         * 移动到为你推荐筛选模块 并置顶
         */
        fun moveToFilter()
        /**
         * 显示错误信息
         */
洪国微 committed
81
        fun showError1(msg : String?)
洪国微 committed
82 83 84 85 86 87 88 89 90 91 92 93 94 95

        fun getContext() : Context

        fun showProgress()
    }

    interface Presenter : IPresenter<View> {
        /**
         * 加载本地缓存
         */
        fun loadLocalData(context: Context)
        /**
         * 倾诉首页数据请求
         */
96
        fun confideHomeRequest(isRefresh:Boolean = true)
洪国微 committed
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119

        /**
         * 为你推荐列表(筛选调用)
         */
        fun recommendList(param : ConfideRecommendParam)
        /**
         * 为你推荐列表(翻页调用)
         */
        fun recommendListMore(param : ConfideRecommendParam)
    }

    interface Model: IModel {
        /**
         * 倾诉首页数据请求
         */
        fun confideHomeRequest() : Observable<MutableList<ConfideHomeDataBean>>

        /**
         * 为你推荐列表
         */
        fun recommendList(param : ConfideRecommendParam) : Observable<ConfideHomeDataBean>
    }
}