package com.bc_chat.bc_base.ImService

import android.app.Activity
import android.content.Context
import android.os.Bundle
import com.alibaba.android.arouter.facade.template.IProvider
import com.zhaohaoting.framework.utils.observer.Observer
import io.rong.imlib.model.Conversation
import io.rong.imlib.model.MessageContent

/**
 * author：Created by zhaohaoting on 2019/2/25
 * email：526309416@qq.com
 * desc：
 */
interface ImRongService : IProvider {

    /**
     * 初始化融云
     */
    fun initRongIm(context: Context)

    /**
     * 跳转钱包
     */
    fun navigationWallet(activity: Activity)

    /**
     * 退出登录
     */
    fun loginOut(context: Context)

    fun startConversation(context: Context, conversationType: Conversation.ConversationType, targetId: String, title: String, bundle: Bundle?)

    fun loginIM(uid: String?, token: String?, observer1: Observer<Boolean>)

    fun getUnreadMsgCount()

    fun setCurrentUserInfo(uid: String?, token: String?)

    fun clearMessages(conversationType: Conversation.ConversationType, targetId: String, listener: (isSuccess: Boolean) -> Unit)

    fun removeConversation(conversationType: Conversation.ConversationType, targetId: String, listener: (isSuccess: Boolean) -> Unit)

    fun sendMessage(targetId: String, conversationType: Conversation.ConversationType, content: MessageContent, pushContent: String? = null, pushData: String? = null, observer: Observer<Boolean>? = null)

}
