CoursePresenterImpl

com.talkfun.cloudlivepublish.presenter.CoursePresenterImpl

描述:课程列表相关处理类

初始化

ICourse.CoursePresenter presenter = new CoursePresenterImpl();

成员方法说明

void loadCourses(final ICourse.LoadCoursesCallback callback)

描述:加载直播课程列表数据

ex:

coursePresenter.loadCourses(new ICourse.LoadCoursesCallback() {
    @Override
    public void onLoadCoursesSuccess(List<CourseBean> list) {
    //加载成功返回课程列表
    ...
    }

    @Override
    public void onNoCourseData() {
    //没有课程列表数据
    ...
    }
});

void checkAllowedToLive(final CourseBean data, final ICourse.CheckAllowToLiveCallback callback)

描述:进入课程检测是否允许进入直播

ex:

coursePresenter.checkAllowedToLive(courseData, new ICourse.CheckAllowToLiveCallback() {
    @Override
    public void onAllowedToLive(CourseBean courseBean) {
    //允许进入直播
    ...
    }

    @Override
    public void notAllowedToLive(int code,String msg) {
    //当该帐号已经在直播时不允许进入直播
    ...
    }
});

void cancel()

描述:取消请求


void destroy()

描述:资源释放

results matching ""

    No results matching ""