package com.gh.gamecenter.core.provider

import android.app.Application
import androidx.lifecycle.LiveData
import com.gh.gamecenter.core.callback.OnAccelerateListener
import com.therouter.inject.Singleton
import io.reactivex.Observable
import java.io.File

@Singleton
interface IAcceleratorProvider {

    fun init(isDev: Boolean, application: Application, version: String)

    fun setQyUserToken(token: String, userId: String, finished: (() -> Unit))

    fun deleteQyUserToken(): Boolean

    fun startQyGameAccelerate(gameId: String, pkgName: String, zoneInfo: Any)

    fun stopQyGameAccelerate(appLayerCallStopMsg: String? = null): Boolean

    fun bindAccRelatedListener(pkgName: String, listener: OnAccelerateListener)

    fun unBindAccRelatedListener(listener: OnAccelerateListener)

    fun isCurAccSuccess(): Boolean

    fun getAccLogFileStorageList(): List<File>?

    fun getGameStatusEventLiveData(): LiveData<Pair<String, String>>

    fun loadQyUserPermissionData(userId: String = "", finished: (() -> Unit)? = null)

    fun hasToken(): Boolean
}