package com.yidianling.user.api.service

import android.app.Activity
import android.content.Context
import android.content.Intent
import com.alibaba.android.arouter.facade.template.IProvider
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.api.bean.UserSettingBean

/**
 * author : Zhangwenchao
 * e-mail : zhangwch@yidianling.com
 * time   : 2018/04/13
 */
interface IUserService : IProvider {

    // 是否已登录
    fun isLogin(): Boolean

    fun isFirstLogin(): Boolean

    fun setFirstLogin(first: Boolean)

    fun isSafePrivacyClicked(): Boolean

    fun putSafePrivacyClicked(clicked: Boolean)

    fun setUserResponse(userInfo: UserResponseBean?)

    fun getUserInfo(): UserResponseBean.UserInfo?

    fun getUserResponse() : UserResponseBean?

    fun getUserSetting(): UserSettingBean?

    fun isBindPhone(): Boolean

    fun putUnlockCheckSuccessTime(time: Long)

    fun getChatTeamHisShow(): Boolean

    fun setChatTeamHisShowed(showed : Boolean)

    // 跳转到隐私界面的 Activity
    fun privacyIntent(activity: Activity): Intent

    fun loginWayIntent(context: Context): Intent

    fun inputPhoneIntent(activity: Activity, smsAction: String): Intent

    fun safeTipViewGone(): Boolean

    fun setTrendsSafeTip(status: Boolean)

    fun errorAgainTime(): Long

    fun isFirstStart(): Boolean

    fun updateUserInfoSp(userInfo: UserResponseBean.UserInfo?)

    fun updateUserSetingSp(userSetting: UserSettingBean?)

    fun clearUserInfo()

}