更新時間:2019-11-20
描述
用戶創(chuàng)建預(yù)約會議。
前提條件
業(yè)務(wù)流程
在創(chuàng)建TsdkBookConfInfo對象后,需要從該對象調(diào)用方法來設(shè)置必填參數(shù)和可選參數(shù)。
//Java code public int bookConference(BookConferenceInfo bookConferenceInfo) { Log.i(TAG, "bookConference."); if (bookConferenceInfo == null) { Log.e(TAG, "booKConferenceInfo obj is null"); return -1; } TsdkBookConfInfo bookConfInfo = new TsdkBookConfInfo(); if(bookConferenceInfo.isInstantConference()) { bookConfInfo.setConfType(TsdkConfType.TSDK_E_CONF_INSTANT); bookConfInfo.setIsAutoProlong(1); } else { bookConfInfo.setConfType(TsdkConfType.TSDK_E_CONF_RESERVED); } bookConfInfo.setSubject(bookConferenceInfo.getSubject()); bookConfInfo.setConfMediaType(bookConferenceInfo.getMediaType()); bookConfInfo.setStartTime(bookConferenceInfo.getStartTime()); bookConfInfo.setDuration(bookConferenceInfo.getDuration()); bookConfInfo.setSize(bookConferenceInfo.getSize()); bookConfInfo.setIsAutoRecord(bookConferenceInfo.getIs_auto()? 1:0); bookConfInfo.setRecordMode(bookConferenceInfo.getRecordType()); List<TsdkAttendeeBaseInfo> attendeeList = ConfConvertUtil.memberListToAttendeeList(bookConferenceInfo.getMemberList()); bookConfInfo.setAttendeeList(attendeeList); bookConfInfo.setAttendeeNum(attendeeList.size()); //The other parameters are optional, using the default value bookConfInfo.setLanguage(TsdkConfLanguage.TSDK_E_CONF_LANGUAGE_EN_US); int result = TsdkManager.getInstance().getConferenceManager().bookConference(bookConfInfo); if (result != 0) { Log.e(TAG, "bookReservedConf result ->" + result); return result; } return 0; } |
如果會議成功預(yù)約,其他用戶可以通過查詢會議列表或其他第三方方式獲取該會議的信息。
//Java code public void handleBookConfResult(TsdkCommonResult result, TsdkConfBaseInfo confBaseInfo){ Log.i(TAG, "onBookReservedConfResult"); if ((result == null) || (confBaseInfo == null)) { Log.e(TAG, "book conference is failed, unknown error."); mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.BOOK_CONF_FAILED, -1); return; } if (result.getResult() != TupConfParam.CONF_RESULT.TUP_SUCCESS) { Log.e(TAG, "book conference is failed, return ->" + result.getResult()); mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.BOOK_CONF_FAILED, result.getResult()); return; } Log.i(TAG, "book conference is success."); mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.BOOK_CONF_SUCCESS, result.getResult()); } |
注意事項(xiàng)
無。
描述
用戶創(chuàng)建立即開始的會議,會議創(chuàng)建成功后,會議創(chuàng)建者自動入會,其他與會者將收到入會邀請。
前提條件
業(yè)務(wù)流程
在創(chuàng)建TsdkBookConfInfo對象后,需要從該對象調(diào)用方法來設(shè)置必填參數(shù)和可選參數(shù)。
//Java code public int bookConference(BookConferenceInfo bookConferenceInfo) { Log.i(TAG, "bookConference."); if (bookConferenceInfo == null) { Log.e(TAG, "booKConferenceInfo obj is null"); return -1; } TsdkBookConfInfo bookConfInfo = new TsdkBookConfInfo(); if(bookConferenceInfo.isInstantConference()) { bookConfInfo.setConfType(TsdkConfType.TSDK_E_CONF_INSTANT); bookConfInfo.setIsAutoProlong(1); } else { bookConfInfo.setConfType(TsdkConfType.TSDK_E_CONF_RESERVED); } bookConfInfo.setSubject(bookConferenceInfo.getSubject()); bookConfInfo.setConfMediaType(bookConferenceInfo.getMediaType()); bookConfInfo.setStartTime(bookConferenceInfo.getStartTime()); bookConfInfo.setDuration(bookConferenceInfo.getDuration()); bookConfInfo.setSize(bookConferenceInfo.getSize()); bookConfInfo.setIsAutoRecord(bookConferenceInfo.getIs_auto()? 1:0); bookConfInfo.setRecordMode(bookConferenceInfo.getRecordType()); List<TsdkAttendeeBaseInfo> attendeeList = ConfConvertUtil.memberListToAttendeeList(bookConferenceInfo.getMemberList()); bookConfInfo.setAttendeeList(attendeeList); bookConfInfo.setAttendeeNum(attendeeList.size()); //The other parameters are optional, using the default value bookConfInfo.setLanguage(TsdkConfLanguage.TSDK_E_CONF_LANGUAGE_EN_US); int result = TsdkManager.getInstance().getConferenceManager().bookConference(bookConfInfo); if (result != 0) { Log.e(TAG, "bookReservedConf result ->" + result); return result; } return 0; } |
//Java code public void handleBookConfResult(TsdkCommonResult result, TsdkConfBaseInfo confBaseInfo){ Log.i(TAG, "onBookReservedConfResult"); if ((result == null) || (confBaseInfo == null)) { Log.e(TAG, "book conference is failed, unknown error."); mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.BOOK_CONF_FAILED, -1); return; } if (result.getResult() != TupConfParam.CONF_RESULT.TUP_SUCCESS) { Log.e(TAG, "book conference is failed, return ->" + result.getResult()); mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.BOOK_CONF_FAILED, result.getResult()); return; } Log.i(TAG, "book conference is success."); mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.BOOK_CONF_SUCCESS, result.getResult()); } |
//Java code public void handleJoinConfResult(TsdkConference tsdkConference, TsdkCommonResult commonResult, TsdkJoinConfIndInfo tsdkJoinConfIndInfo Log.i(TAG, "handleJoinConfResult"); if ((tsdkConference == null) || (commonResult == null)) { return; } int result = commonResult.getResult(); if (result == 0) { this.currentConference = tsdkConference; this.memberList = null; this.self = null; TsdkCall tsdkCall = tsdkConference.getCall(); if (null != tsdkCall) { Session newSession = CallMgr.getInstance().getCallSessionByCallID(tsdkCall.getCallInfo().getCallId()); if (null == newSession) { newSession = new Session(tsdkCall); CallMgr.getInstance().putCallSessionToMap(newSession); } if (tsdkCall.getCallInfo().getIsVideoCall() == 1) { VideoMgr.getInstance().initVideoWindow(tsdkCall.getCallInfo().getCallId()); } } mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.JOIN_CONF_SUCCESS, tsdkConference.getHandle() + ""); } else { mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.JOIN_CONF_FAILED, result); } } |
詳細(xì)流程參見會議信息及會議狀態(tài)更新描述。
//Java code public void handleGetDataConfParamsResult(TsdkConference tsdkConference, TsdkCommonResult commonResult){ Log.i(TAG, "handleJoinConfResult"); if ((tsdkConference == null) || (commonResult == null)) { return; } int result = commonResult.getResult(); mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.GET_DATA_CONF_PARAM_RESULT, result); } |
//Java code public int joinDataConf() { if (null == currentConference) { Log.e(TAG, "join data conf failed, currentConference is null "); return -1; } int result = currentConference.joinDataConference(); return result; } |
在加入數(shù)據(jù)會議后,通過TsdkNotify對象中的onEvtInfoAndStatusUpdate()方法向UI上報會議信息及狀態(tài)更新事件,UI刷新會議狀態(tài)和成員列表。
//Java code public void handleJoinDataConfResult(TsdkConference tsdkConference, TsdkCommonResult commonResult){ Log.i(TAG, "handleJoinDataConfResult"); if ((tsdkConference == null) || (commonResult == null)) { return; } int result = commonResult.getResult(); mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.JOIN_DATA_CONF_RESULT, result); } |
注意事項(xiàng)
無。
描述
用戶查詢自己“創(chuàng)建”的和“待參加”的預(yù)約會議信息。
前提條件
業(yè)務(wù)流程
在創(chuàng)建TsdkQueryConfListReq對象后,需要從該對象調(diào)用方法來設(shè)置參數(shù)。
//Java code public int queryMyConfList(ConfConstant.ConfRight myRight) { Log.i(TAG, "query my conf list."); TsdkConfRight tupConfRight; switch (myRight) { case MY_CREATE: tupConfRight = TsdkConfRight.TSDK_E_CONF_RIGHT_CREATE; break; case MY_JOIN: tupConfRight = TsdkConfRight.TSDK_E_CONF_RIGHT_JOIN; break; case MY_CREATE_AND_JOIN: tupConfRight = TsdkConfRight.TSDK_E_CONF_RIGHT_CREATE_JOIN; break; default: tupConfRight = TsdkConfRight.TSDK_E_CONF_RIGHT_CREATE_JOIN; break; } TsdkQueryConfListReq queryReq = new TsdkQueryConfListReq(); queryReq.setPageSize(ConfConstant.PAGE_SIZE); queryReq.setPageIndex(1); queryReq.setIsIncludeEnd(0); queryReq.setConfRight(tupConfRight); int result = TsdkManager.getInstance().getConferenceManager().queryConferenceList(queryReq); if (result != 0) { Log.e(TAG, "getConfList result ->" + result); return result; } return 0; } |
//Java code public void handleQueryConfListResult(TsdkCommonResult result, TsdkConfListInfo confList){ Log.i(TAG, "onGetConfListResult"); if (result == null) { Log.e(TAG, "get conference list is failed, unknown error."); mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.QUERY_CONF_LIST_FAILED, -1); return; } else if (result.getResult() != 0) { Log.e(TAG, "get conference list is failed, return ->" + result.getReasonDescription()); mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.QUERY_CONF_LIST_FAILED, result.getResult()); return; } List<ConfBaseInfo> confBaseInfoList = new ArrayList<>(); List<TsdkConfBaseInfo> tsdkConfBaseInfos = confList.getConfInfoList(); if (null != tsdkConfBaseInfos) { for (TsdkConfBaseInfo confInfo : tsdkConfBaseInfos) { ConfBaseInfo confBaseInfo = new ConfBaseInfo(); confBaseInfo.setSize(confInfo.getSize()); confBaseInfo.setConfID(confInfo.getConfId()); confBaseInfo.setSubject(confInfo.getSubject()); confBaseInfo.setAccessNumber(confInfo.getAccessNumber()); confBaseInfo.setChairmanPwd(confInfo.getChairmanPwd()); confBaseInfo.setGuestPwd(confInfo.getGuestPwd()); confBaseInfo.setSchedulerNumber(confInfo.getScheduserAccount()); confBaseInfo.setSchedulerName(confInfo.getScheduserName()); confBaseInfo.setStartTime(confInfo.getStartTime()); confBaseInfo.setEndTime(confInfo.getEndTime()); confBaseInfo.setMediaType(ConfConvertUtil.convertConfMediaType(confInfo.getConfMediaType())); confBaseInfo.setConfState(ConfConvertUtil.convertConfctrlConfState(confInfo.getConfState())); confBaseInfoList.add(confBaseInfo); } } mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.QUERY_CONF_LIST_SUCCESS, confBaseInfoList); } |
注意事項(xiàng)
無。
描述
用戶查詢指定會議的詳細(xì)信息。
前提條件
業(yè)務(wù)流程
在創(chuàng)建TsdkQueryConfDetailReq對象后,需要從該對象調(diào)用方法來設(shè)置參數(shù)。
//Java code public int queryConfDetail(String confID) { Log.i(TAG, "query conf detail"); TsdkQueryConfDetailReq queryReq = new TsdkQueryConfDetailReq(); queryReq.setConfId(confID); int result = TsdkManager.getInstance().getConferenceManager().queryConferenceDetail(queryReq); if (result != 0) { Log.e(TAG, "getConfInfo result ->" + result); return result; } return result; } |
//Java code public void handleQueryConfDetailResult(TsdkCommonResult result, TsdkConfDetailInfo tsdkConfDetailInfo){ Log.i(TAG, "onGetConfInfoResult"); if ((result == null) || (tsdkConfDetailInfo == null)) { Log.e(TAG, "get conference detail is failed, unknown error."); mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.QUERY_CONF_DETAIL_FAILED, -1); return; } if (result.getResult() != TupConfParam.CONF_RESULT.TUP_SUCCESS) { Log.e(TAG, "get conference detail is failed, return ->" + result.getResult()); mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.QUERY_CONF_DETAIL_FAILED, result.getResult()); return; } ConfDetailInfo confDetailInfo = new ConfDetailInfo(); confDetailInfo.setSize(tsdkConfDetailInfo.getConfInfo().getSize()); confDetailInfo.setConfID(tsdkConfDetailInfo.getConfInfo().getConfId()); confDetailInfo.setSubject(tsdkConfDetailInfo.getConfInfo().getSubject()); confDetailInfo.setAccessNumber(tsdkConfDetailInfo.getConfInfo().getAccessNumber()); confDetailInfo.setChairmanPwd(tsdkConfDetailInfo.getConfInfo().getChairmanPwd()); confDetailInfo.setGuestPwd(tsdkConfDetailInfo.getConfInfo().getGuestPwd()); confDetailInfo.setSchedulerNumber(tsdkConfDetailInfo.getConfInfo().getScheduserAccount()); confDetailInfo.setSchedulerName(tsdkConfDetailInfo.getConfInfo().getScheduserName()); confDetailInfo.setStartTime(tsdkConfDetailInfo.getConfInfo().getStartTime()); confDetailInfo.setEndTime(tsdkConfDetailInfo.getConfInfo().getEndTime()); confDetailInfo.setMediaType(ConfConvertUtil.convertConfMediaType(tsdkConfDetailInfo.getConfInfo().getConfMediaType())); confDetailInfo.setConfState(ConfConvertUtil.convertConfctrlConfState(tsdkConfDetailInfo.getConfInfo().getConfState())); List<Member> memberList = ConfConvertUtil.convertAttendeeInfoList(tsdkConfDetailInfo.getAttendeeList()); confDetailInfo.setMemberList(memberList); mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.QUERY_CONF_DETAIL_SUCCESS, confDetailInfo); } |
注意事項(xiàng)
無。