package com.yidianling.router.im

import android.app.Activity
import android.content.Context
import android.support.v7.app.AppCompatActivity
import com.yidianling.router.iRouter.BaseRouter

/**
 * author : Zhangwenchao
 * e-mail : zhangwch@yidianling.com
 * time   : 2018/04/23
 *
 * im 模块对外提供方法的接口
 */
interface IIMRouter : BaseRouter {

    // 打开与小壹聊天界面
    fun startP2PXiaoYi(context: Context)

    // 打开私聊界面
    fun startP2PSession(context: AppCompatActivity, toUid: String)

    fun setAccount(account: String)

    fun setChattingAccountAll()

    fun setChattingAccountNone()

    fun login(info: IMLoginInfo, callback: IMRequestCallback<IMLoginInfo>?)

    /**
     * 绑定手机后，重新登录IM
     */
    fun imLogin(info: IMLoginInfo)

    fun logout()

    fun clear()
    /**
     * 创建一条普通文本消息
     * @param sessionId   聊天对象ID
     * @param content     文本消息内容
     */
    fun createTextMessage(sessionId: String?, content: String, callback: IMRequestCallback<Void>)

    fun sendSubscriptionTimeMessage(sessionId: String?, content: String, callback: IMRequestCallback<Void>)

    fun showSelector(activity: Activity, requestCode: Int)

    fun sendTestResultMessage(uid: String, content: String, title: String?, head: String?, url: String?, id: Int, share_url: String?, callback: IMRequestCallback<Void>)

    fun startChat(context : AppCompatActivity ,toUid : String ,flag : Int , canTalk : Int)
}