package com.yidianling.user.http

import android.app.Activity
import com.google.gson.internal.LinkedTreeMap
import com.umeng.socialize.bean.SHARE_MEDIA
import com.ydl.ydlcommon.data.http.BaseAPIResponse
import com.ydl.ydlcommon.data.http.BaseResponse
import com.yidianling.router.user.UserResponse
import com.yidianling.user.bean.CheckPhonePassBean
import com.yidianling.user.http.request.*
import com.yidianling.user.http.response.CheckPassword
import com.yidianling.user.http.response.CountryResponse
import com.yidianling.user.http.response.ExistResponse
import io.reactivex.Observable

/**
 * author : Zhangwenchao
 * e-mail : zhangwch@yidianling.com
 * time   : 2018/02/02
 */
interface UserHttp {

    fun login(param: LoginParam): Observable<BaseResponse<UserResponse>>

    fun countryList(): Observable<BaseResponse<CountryResponse>>

    fun phoneExist(param: ExistParam): Observable<BaseResponse<ExistResponse>>

    fun code(param: CodeParam): Observable<BaseResponse<Any>>

    fun bindPhone(param: BindPhoneParam): Observable<BaseResponse<UserResponse>>

    fun forget(param: ForgetParam): Observable<BaseResponse<Any>>

    fun register(param: RegisterParam): Observable<BaseResponse<Any>>

    fun channelId(param: ChannelIdParam): Observable<BaseResponse<LinkedTreeMap<String, String>>>

    fun thirdPartLogin(param: ThirdLoginParam): Observable<BaseAPIResponse<UserResponse>>

    fun setUserInfo(param: UserInfoParam): Observable<BaseResponse<Any>>

    fun uploadHead(param: HeadParam): Observable<BaseResponse<Any>>

    fun checkPhonePass(cmd: CheckPhonePassBean): Observable<BaseResponse<CheckPassword>>

    fun bindQQ(param: BindQQ): Observable<BaseResponse<Any>>

    fun bindWX(param: BindWX): Observable<BaseResponse<Any>>

    fun logout(param: Logout): Observable<BaseResponse<Any>>

    fun checkPwd(param: CheckPwd): Observable<BaseResponse<Any>>

    fun changePhone(param: ChangePhone): Observable<BaseResponse<Any>>

    fun privacyAgree(uid: String): Observable<BaseResponse<Any>>

    fun thirdPartJavaLogin(param: ThirdLoginParam): Observable<BaseResponse<UserResponse>>
    // 友盟第三方登录
    fun umLogin(activity: Activity, media: SHARE_MEDIA): Observable<ThirdLoginParam>

    fun unBindThirdLogin(param: UnBindThirdLoginParam): Observable<BaseResponse<Any>>
}