package com.ydl.audioim.api

import android.app.Activity
import android.content.Context
import com.alibaba.android.arouter.facade.template.IProvider

/**
 * Created by Ykai on 2022/7/26.
 */
interface IAudioImService : IProvider{

    /**
     * YDLavManager初始化方法
     */
    fun yDLAvManagerInit(context: Context, appId: String)

    /**
     * 获取rtm是否在线
     */
    fun getIsOnlineRtm(): Boolean

    /**
     * rtm登录返回并登录状态
     */
    fun loginRtm(userId: String?, event: (isSuccess: Boolean, msg: String?) -> Unit)


    /**
     * rtm登录
     */
    fun loginRtm(userId: String?)

    /**
     * rtm退出登录
     */
    fun logoutRtm()

    /**
     * 拨打语音电话转axb弹窗
     */
    fun openAxbDialog(activity: Activity?, type: Int, phoneNumber: String?)

    fun openPermissionRejectDialog(activity: Activity?, callback: (() -> Unit))

    /**
     * 事件上报
     */
    fun callEventSave(status: String, res: String, session: String?, line: String)

    fun initRtcNetQuality()

    fun initAgoraRtc(context: Context)

    fun reportCallEvent(type: String, name: String, desc: String, retCode: Int?)

    fun callCheck(context: Context, calleeUid: String? = null, delay: Long = 0)
}