package com.yonge.cooleshow.biz.dal.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yonge.cooleshow.biz.dal.dao.ImNetworkRoomDao;
import com.yonge.cooleshow.biz.dal.dto.*;
import com.yonge.cooleshow.biz.dal.entity.ImNetworkRoom;
import com.yonge.cooleshow.biz.dal.enums.UserRoleEnum;
import com.yonge.cooleshow.common.entity.HttpResponseResult;

import java.util.List;

/**
 * 网络教室房间(ImNetworkRoom)表服务接口
 *
 * @author zx
 * @since 2022-03-30 16:36:36
 */
public interface ImNetworkRoomService extends IService<ImNetworkRoom> {

    ImNetworkRoomDao getDao();

    //加入网络教室
    HttpResponseResult<ImNetworkRoomResult> joinRoom(Long courseScheduleId) throws Exception;

    //加入网络教室成功
    void joinRoomSuccess(String roomId,Long userId) throws Exception;

    //加入网络教室失败
    void joinRoomFailure(String roomId);

    //退出房间成功
    void quitRoomSuccess(String roomId, Long userId) throws Exception;

    //控制用户节拍器
    void sendImPlayMidiMessage(ImNetworkCustomMessage customMessage) throws Exception;

    //老师通知学员下载伴奏
    void pushDownloadMusicSheetMsg(ImNetworkMusicSheetDto musicSheetDto) throws Exception;

    //移动端用来渲染页面
    void display(ImNetworkDisplayDataDto displayData) throws Exception;

    //批量控制学员设备开关
    void batchControlDevice(ImNetworkDeviceControlDto deviceControl) throws Exception;

    //控制学员设备开关
    void controlDevice(ImNetworkDeviceControlDto deviceControl) throws Exception;

    //学员同意打开，麦克风、摄像头等权限请求
    void approveControlDevice(ImNetworkDeviceControlDto deviceControl) throws Exception;

    //学员拒绝打开，麦克风、摄像头等权限请求
    void rejectControlDevice(ImNetworkDeviceControlDto deviceControl) throws Exception;

    //学员伴奏下载状态回调
    void musicSheetDownNotify(ImNetworkMusicSheetDto musicSheetDto) throws Exception;

    //学员设备状态同步
    void deviceStatusSync(ImNetworkDeviceControlDto deviceStatusSync) throws Exception;

    //查询不在教室的学员
    List<BasicUserInfo> queryNoJoinStu(Long roomId);
}

