华为云会议 MEETING-场景4:编辑会议:示例代码

时间:2024-10-28 14:49:59

示例代码

1
2
3
4
5
6
7
8
/**
* 获取会议详情
*/
int demoEditConfDlg::GetConfDetail()
{
    int ret =hwmsdkagent::GetConfDetail(GetConfID()); // 使用会议id查询会议详细信息
    return ret;
}

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
/**
* 会议详情回调处理
*/
void demoCallbackProc::OnGetConfDetail(hwmsdk::HwmErrCode ret, const char* reason, const HwmConfDetail* confDetail)
{
    if (confDetail == nullptr)
    {
        return;
    }
    // 此处省略缓存会议详情数据代码
     CS tring codeStr;
    codeStr.Format(_T("%d"), ret);
    string msgStr = CTools::UTF82MultiByte(msg);
    CString tips = _T("OnGetConfDetail code:") + codeStr + _T(", msg:") + CString(msgStr.c_str());
    AfxMessageBox(tips);
}

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
/**
* 编辑会议接口
*/
int demoEditConfDlg::EditConf()
{
    hwmsdkagent::HwmConfDetail confDetail{0}; //从缓存中得到会议详情数据赋予confDetail
    hwmsdkagent::HwmEditConfParam editConfParam{ 0 };
    //根据实际需求拷贝confDetail的数据
    strncpy_s(editConfParam.confId, confDetail.confListInfo.confId, HWM_MAX_CONF_ID_LEN);
    editConfParam.vmrFlag = confDetail.vmrFlag;
    strncpy_s(editConfParam.vmrId, confInfo.vmrId, HWM_MAX_VMR_CONF_ID_LEN);
    // 此处省略部分赋值代码
    editConfParam.timeZone = 56; // 本地时区,用户依据自身情况自己调整,56东八区
    editConfParam.isRecordOn = false; //默认会议不启用允许录制
    editConfParam.isAutoRecordOn = false; //默认会议不启用自动录制
    editConfParam.startTime = 1598398920; //utc时间戳
    editConfParam.duration = 0 * 60 + 30;//会议时长
    editConfParam.joinConfRestrictionType = hwmsdkagent::HwmJoinConfPermissionType::RESTRICTION_CALL_IN_ALL; //取编辑会议上面的允许入会用户类型
    return hwmsdkagent::EditConf(&editConfParam);
}

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
/**
* 编辑会议接口回调
*/
void demoCallbackProc::OnEditConfResult()
{
    CString codeStr;
    codeStr.Format(_T("%d"), ret);
    string msgStr = CTools::UTF82MultiByte(msg);
    CString tips = _T("OnEditConfResult code:") + codeStr + _T(", msg:") + CString(msgStr.c_str());
    AfxMessageBox(tips);
}

OnConfList事件通知跟预约会议场景相同,请参考预约会议的示例代码

support.huaweicloud.com/sdkreference-meeting/win_demo_0006.html