主頁(yè) > 服務(wù)與支持 > 開發(fā)平臺(tái) > 客戶端SDK參考 > iOS Native SDK > 會(huì)議 會(huì)議管理
更新時(shí)間:2019-11-20
描述
用戶創(chuàng)建預(yù)約會(huì)議。
前提是鑒權(quán)登錄成功和會(huì)議環(huán)境參數(shù)已設(shè)置。
業(yè)務(wù)流程
-(BOOL)tsdkConfctrlBookConf:(NSArray *)attendeeArray mediaType:(EC_CONF_MEDIATYPE)mediaType startTime:(NSDate *)startTime confLen:(int)confLen subject:(NSString *)subject { TSDK_S_BOOK_CONF_INFO *bookConfInfoUportal = (TSDK_S_BOOK_CONF_INFO *)malloc(sizeof(TSDK_S_BOOK_CONF_INFO)); memset_s(bookConfInfoUportal, sizeof(TSDK_S_BOOK_CONF_INFO), 0, sizeof(TSDK_S_BOOK_CONF_INFO)); if (subject.length > 0 && subject != nil) { strcpy(bookConfInfoUportal->subject, [subject UTF8String]); } bookConfInfoUportal->conf_type = TSDK_E_CONF_INSTANT; if (startTime != nil) { NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; NSString *startTimeStr = [dateFormatter stringFromDate:startTime]; NSString *utcStr = [self getUTCFormateLocalDate:startTimeStr]; DDLogInfo(@"start time : %@, utc time: %@",startTimeStr,utcStr); strcpy(bookConfInfoUportal->start_time, [utcStr UTF8String]); bookConfInfoUportal->duration = confLen; bookConfInfoUportal->conf_type = TSDK_E_CONF_RESERVED; } if (attendeeArray.count == 0) { bookConfInfoUportal->size = 5; bookConfInfoUportal->attendee_num = 0; bookConfInfoUportal->attendee_list = NULL; }else{ bookConfInfoUportal->size = (TSDK_UINT32)attendeeArray.count * 2; bookConfInfoUportal->attendee_num = (TSDK_UINT32)attendeeArray.count; bookConfInfoUportal->attendee_list = [self returnAttendeeWithArray:attendeeArray]; } bookConfInfoUportal->conf_media_type = (TSDK_E_CONF_MEDIA_TYPE)mediaType; bookConfInfoUportal->is_hd_conf = TSDK_FALSE; bookConfInfoUportal->is_multi_stream_conf = TSDK_FALSE; bookConfInfoUportal->is_auto_record = TSDK_FALSE; bookConfInfoUportal->is_auto_prolong = TSDK_TRUE; bookConfInfoUportal->is_auto_mute = TSDK_FALSE; bookConfInfoUportal->welcome_prompt = TSDK_E_CONF_WARNING_DEFAULT; bookConfInfoUportal->enter_prompt = TSDK_E_CONF_WARNING_DEFAULT; bookConfInfoUportal->leave_prompt = TSDK_E_CONF_WARNING_DEFAULT; bookConfInfoUportal->reminder = TSDK_E_CONF_REMINDER_NONE; bookConfInfoUportal->language = TSDK_E_CONF_LANGUAGE_ZH_CN; TSDK_RESULT ret = tsdk_book_conference(bookConfInfoUportal); DDLogInfo(@"tsdk_book_conference result : %d",ret); free(bookConfInfoUportal); return ret == TSDK_SUCCESS ? YES : NO; }
如果會(huì)議成功預(yù)約,其他用戶可以通過“查詢會(huì)議列表”或其他第三方方式獲取該會(huì)議的信息:
case TSDK_E_CONF_EVT_BOOK_CONF_RESULT: { DDLogInfo(@"TSDK_E_CONF_EVT_BOOK_CONF_RESULT"); BOOL result = notify.param1 == TSDK_SUCCESS; if (!result) { DDLogError(@"TSDK_E_CONF_EVT_BOOK_CONF_RESULT,error:%@",[NSString stringWithUTF8String:(TSDK_CHAR *)notify.data]); return; } TSDK_S_CONF_BASE_INFO *confListInfo = (TSDK_S_CONF_BASE_INFO *)notify.data; }
注意事項(xiàng)
無。
描述
用戶創(chuàng)建立即會(huì)議。
立即會(huì)議創(chuàng)建成功后,用戶的SIP號(hào)碼自動(dòng)入會(huì),用戶作為會(huì)議主席召集其他與會(huì)者加入會(huì)議。
前提條件
業(yè)務(wù)流程
在創(chuàng)建即時(shí)會(huì)議時(shí),會(huì)議方數(shù)(size)、會(huì)議類型(conf_type),媒體類型(conf_media_type)和與會(huì)者信息(attendee_num&attendee_list)必選,其他參數(shù)可選。
-(BOOL)tsdkConfctrlBookConf:(NSArray *)attendeeArray mediaType:(EC_CONF_MEDIATYPE)mediaType startTime:(NSDate *)startTime confLen:(int)confLen subject:(NSString *)subject { TSDK_S_BOOK_CONF_INFO *bookConfInfoUportal = (TSDK_S_BOOK_CONF_INFO *)malloc(sizeof(TSDK_S_BOOK_CONF_INFO)); memset_s(bookConfInfoUportal, sizeof(TSDK_S_BOOK_CONF_INFO), 0, sizeof(TSDK_S_BOOK_CONF_INFO)); if (subject.length > 0 && subject != nil) { strcpy(bookConfInfoUportal->subject, [subject UTF8String]); } bookConfInfoUportal->conf_type = TSDK_E_CONF_INSTANT; if (startTime != nil) { NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"]; NSString *startTimeStr = [dateFormatter stringFromDate:startTime]; NSString *utcStr = [self getUTCFormateLocalDate:startTimeStr]; DDLogInfo(@"start time : %@, utc time: %@",startTimeStr,utcStr); strcpy(bookConfInfoUportal->start_time, [utcStr UTF8String]); bookConfInfoUportal->duration = confLen; bookConfInfoUportal->conf_type = TSDK_E_CONF_RESERVED; } if (attendeeArray.count == 0) { bookConfInfoUportal->size = 5; bookConfInfoUportal->attendee_num = 0; bookConfInfoUportal->attendee_list = NULL; }else{ bookConfInfoUportal->size = (TSDK_UINT32)attendeeArray.count * 2; bookConfInfoUportal->attendee_num = (TSDK_UINT32)attendeeArray.count; bookConfInfoUportal->attendee_list = [self returnAttendeeWithArray:attendeeArray]; } bookConfInfoUportal->conf_media_type = (TSDK_E_CONF_MEDIA_TYPE)mediaType; bookConfInfoUportal->is_hd_conf = TSDK_FALSE; bookConfInfoUportal->is_multi_stream_conf = TSDK_FALSE; bookConfInfoUportal->is_auto_record = TSDK_FALSE; bookConfInfoUportal->is_auto_prolong = TSDK_TRUE; bookConfInfoUportal->is_auto_mute = TSDK_FALSE; bookConfInfoUportal->welcome_prompt = TSDK_E_CONF_WARNING_DEFAULT; bookConfInfoUportal->enter_prompt = TSDK_E_CONF_WARNING_DEFAULT; bookConfInfoUportal->leave_prompt = TSDK_E_CONF_WARNING_DEFAULT; bookConfInfoUportal->reminder = TSDK_E_CONF_REMINDER_NONE; bookConfInfoUportal->language = TSDK_E_CONF_LANGUAGE_ZH_CN; TSDK_RESULT ret = tsdk_book_conference(bookConfInfoUportal); DDLogInfo(@"tsdk_book_conference result : %d",ret); free(bookConfInfoUportal); return ret == TSDK_SUCCESS ? YES : NO; }
case TSDK_E_CONF_EVT_BOOK_CONF_RESULT: { DDLogInfo(@"TSDK_E_CONF_EVT_BOOK_CONF_RESULT"); BOOL result = notify.param1 == TSDK_SUCCESS; if (!result) { DDLogError(@"TSDK_E_CONF_EVT_BOOK_CONF_RESULT,error:%@",[NSString stringWithUTF8String:(TSDK_CHAR *)notify.data]); return; } TSDK_S_CONF_BASE_INFO *confListInfo = (TSDK_S_CONF_BASE_INFO *)notify.data; }
case TSDK_E_CONF_EVT_JOIN_CONF_RESULT: { DDLogInfo(@"TSDK_E_CONF_EVT_JOIN_CONF_RESULT"); BOOL result = notify.param2 == TSDK_SUCCESS; if (!result) { DDLogError(@"TSDK_E_CONF_EVT_JOIN_CONF_RESULT,error:%@",[NSString stringWithUTF8String:(TSDK_CHAR *)notify.data]); return; } _confHandle = notify.param1; TSDK_S_JOIN_CONF_IND_INFO *confInfo = (TSDK_S_JOIN_CONF_IND_INFO *)notify.data; _currentCallId = confInfo->call_id; dispatch_async(dispatch_get_main_queue(), ^{ // go conference [self goConferenceRunView:nil]; [self respondsECConferenceDelegateWithType:CONF_E_CONNECT result:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:TUP_CALL_REMOVE_CALL_VIEW_NOTIFY object:nil]; }); } break;
case TSDK_E_CONF_EVT_INFO_AND_STATUS_UPDATE: { DDLogInfo(@"TSDK_E_CONF_EVT_INFO_AND_STATUS_UPDATE"); [self handleAttendeeUpdateNotify:notify]; } break;
case TSDK_E_CONF_EVT_GET_DATACONF_PARAM_RESULT: { DDLogInfo(@"TSDK_E_CONF_EVT_GET_DATACONF_PARAM_RESULT"); BOOL result = notify.param2 == TSDK_SUCCESS; if (!result) { DDLogError(@"TSDK_E_CONF_EVT_GET_DATACONF_PARAM_RESULT,error:%@",[NSString stringWithUTF8String:(TSDK_CHAR *)notify.data]); return; } dispatch_async(dispatch_get_main_queue(), ^{ [self joinDataConference]; [self startHeartBeatTimer]; }); } break;
-(void)joinDataConference { TSDK_RESULT result = tsdk_join_data_conference(_confHandle); DDLogInfo(@"tsdk_join_data_conference ret: %d", result); }
在加入數(shù)據(jù)會(huì)議后,會(huì)向UI上報(bào)會(huì)議信息及狀態(tài)更新事件TSDK_E_CONF_EVT_INFO_AND_STATUS_UPDATE,UI刷新會(huì)議成員列表和會(huì)議信息。
case TSDK_E_CONF_EVT_JOIN_DATA_CONF_RESULT: { DDLogInfo(@"TSDK_E_CONF_EVT_JOIN_DATA_CONF_RESULT"); NSDictionary *resultInfo = nil; BOOL isSuccess = notify.param2 == TSDK_SUCCESS; resultInfo = @{ UCCONF_RESULT_KEY :[NSNumber numberWithBool:isSuccess] }; [self respondsECConferenceDelegateWithType:DATA_CONF_JOIN_RESOULT result:resultInfo]; } break;
注意事項(xiàng)
無。
描述
用戶查詢自己“創(chuàng)建”的和“待參加”的預(yù)約會(huì)議信息。
前提條件
業(yè)務(wù)流程
1、會(huì)議權(quán)限(conf_right)用于指定要查詢的會(huì)議權(quán)限類型,包含查詢創(chuàng)建的會(huì)議、待參加的會(huì)議或創(chuàng)建和待參加的會(huì)議,可選填;
2、請(qǐng)求會(huì)議列表頁(yè)索引(page_index),取值從1開始,建議與應(yīng)用程序與會(huì)議列表的頁(yè)簽對(duì)應(yīng),必須要有明確值;
3、會(huì)議列表每頁(yè)的會(huì)議個(gè)數(shù)(page_size),建議與應(yīng)用程序會(huì)議列表個(gè)數(shù)相同,必須要有明確值。
4、返回來的時(shí)間為UTC時(shí)間,UI進(jìn)行頁(yè)面呈現(xiàn)之前需要將UTC時(shí)間轉(zhuǎn)換為本地時(shí)間。
-(BOOL)obtainConferenceListWithPageIndex:(int)pageIndex pageSize:(int)pageSize { TSDK_S_QUERY_CONF_LIST_REQ conflistInfo; memset(&conflistInfo, 0, sizeof(TSDK_S_QUERY_CONF_LIST_REQ)); conflistInfo.conf_right = TSDK_E_CONF_RIGHT_CREATE_JOIN; conflistInfo.is_include_end = TSDK_FALSE; conflistInfo.page_index = pageIndex; conflistInfo.page_size = pageSize; int result = tsdk_query_conference_list(&conflistInfo); DDLogInfo(@"tsdk_query_conference_list result: %d",result); return result == TSDK_SUCCESS ? YES : NO; }
1、查詢會(huì)議列表只返回會(huì)議的概要信息,如需查詢會(huì)議詳情(包括與會(huì)者信息),需要“查詢會(huì)議詳情”;
2、會(huì)議的主席密碼需要“查詢會(huì)議詳情”獲取。
case TSDK_E_CONF_EVT_QUERY_CONF_LIST_RESULT: { DDLogInfo(@"TSDK_E_CONF_EVT_QUERY_CONF_LIST_RESULT"); BOOL result = notify.param1 == TSDK_SUCCESS; if (!result) { DDLogError(@"TSDK_E_CONF_EVT_QUERY_CONF_LIST_RESULT,error:%@",[NSString stringWithUTF8String:(TSDK_CHAR *)notify.data]); return; } [self handleGetConfListResult:notify]; } break;
注意事項(xiàng)
無。
描述
用戶查詢指定會(huì)議的詳細(xì)信息。
前提條件
業(yè)務(wù)流程
請(qǐng)求消息結(jié)構(gòu)TSDK_S_QUERY_CONF_DETAIL_REQ中,
-(BOOL)obtainConferenceDetailInfoWithConfId:(NSString *)confId Page:(int)pageIndex pageSize:(int)pageSize { if (confId.length == 0) { DDLogInfo(@"current confId is nil"); return NO; } TSDK_S_QUERY_CONF_DETAIL_REQ confInfo; memset(&confInfo, 0, sizeof(TSDK_S_QUERY_CONF_LIST_REQ)); if (confId.length > 0 && confId != nil) { strcpy(confInfo.conf_id, [confId UTF8String]); } confInfo.page_size = pageSize; confInfo.page_index = pageIndex; int getConfInfoRestult = tsdk_query_conference_detail(&confInfo); DDLogInfo(@"tsdk_query_conference_detail result: %d",getConfInfoRestult); return getConfInfoRestult == TSDK_SUCCESS ? YES : NO; }
case TSDK_E_CONF_EVT_QUERY_CONF_DETAIL_RESULT: { DDLogInfo(@"TSDK_E_CONF_EVT_QUERY_CONF_DETAIL_RESULT"); BOOL result = notify.param1 == TSDK_SUCCESS; if (!result) { DDLogError(@"TSDK_E_CONF_EVT_QUERY_CONF_DETAIL_RESULT,error:%@",[NSString stringWithUTF8String:(TSDK_CHAR *)notify.data]); return; } [self handleGetConfInfoResult:notify]; } break;
注意事項(xiàng)
無。