package com.gh.gamecenter.home.test_v2

import com.gh.gamecenter.feature.entity.GameEntity

/**
 * @author : liujiarui
 * date : 2023/3/10
 * description : 首页-新游开测-游戏下载进度更新辅助
 */
interface HomeGameTestV2DownloadStateUpdateHelper {
    /**
     * 模块所处的父列表索引
     */
    var mParentPosition: Int

    /**
     * 游戏列表新增回调
     */
    var mOnGameListAddCallback: (Int, List<GameEntity>) -> Unit

    /**
     * 设置模块在父列表的索引
     */
    fun setParentPosition(parentPosition: Int) {
        mParentPosition = parentPosition
    }

    /**
     *  设置游戏列表新增回调
     */
    fun setOnGameListAddCallback(callback: (Int, List<GameEntity>) -> Unit) {
        mOnGameListAddCallback = callback
    }

    /**
     * 通知外部有游戏列表添加
     */
    fun notifyParentAddGameList(gameList: List<GameEntity>) {
        mOnGameListAddCallback(mParentPosition, gameList)
    }

}